Skip to content

A production-ready ASP.NET Core MVC web application for real-world Draught Survey calculations used by ship officers and marine surveyors

Notifications You must be signed in to change notification settings

Peter42306/DraughtSurveyWebApp

Repository files navigation

Draught Survey Web App

A production-ready ASP.NET Core MVC web application used by ship officers and marine surveyors to perform draught survey calculations (estimating cargo quantity on board a vessel).

Project highlights

  • ASP.NET Core MVC application deployed on Linux (Nginx + systemd)
  • End-to-end workflow: create inspection → input data → validation → calculations → Excel export
  • Authentication & authorization:
    • ASP.NET Core Identity
    • Email confirmation, password recovery
    • Roles (User/Admin)
  • Admin panel for inspections, statistics, and feedback management
  • Responsive and mobile-friendly design
  • Server-side data validation & consistency
  • Reuse of vessel master data between inspections (LBP, light ship, draft marks distances, etc.)
  • Hydrostatic tables per vessel (IMO): import/store and reuse for future inspections
  • Excel export using reusable templates (public/private) for reporting and printing
  • Deployed and running in production

Screenshots

Screenshot 2026-01-20 160237

Screenshot 2026-01-20 160316

Screenshot 2026-01-20 160413

Screenshot 2026-01-20 160425

Screenshot 2026-01-20 160454

Screenshot 2026-01-20 160509

Screenshot 2026-01-20 160546

Screenshot 2026-01-20 160630

Screenshot 2026-01-20 160640

Screenshot 2026-01-20 160653

Screenshot 2026-01-20 160701

Technology stack

Backend / Web

  • ASP.NET Core MVC
  • ASP.NET Core Identity + Roles
  • Entity Framework Core (Code First, migrations)
  • PostgreSQL

Frontend

  • Razor Views (MVC)
  • Server-side validation with domain rules
  • Bootstrap-based responsive layout

Infrastructure / Deployment

  • Linux server deployment
  • Nginx reverse proxy
  • Email delivery: SendGrid

Project structure

DraughtSurveyWebApp/
├─ DraughtSurveyWebApp/                         # ASP.NET Core MVC application
│
│  ├─ Areas/                                   # Feature-based areas
│  │  └─ Identity/                             # ASP.NET Core Identity UI (auth, profile, login)
│
│  ├─ Controllers/                             # MVC controllers (thin, orchestration layer)
│  │  ├─ Admin/                                # Admin-only controllers
│  │  │  ├─ FeedbackAdminController.cs
│  │  │  └─ StatsController.cs
│  │  │
│  │  ├─ AboutController.cs
│  │  ├─ ApplicationUsersController.cs
│  │  ├─ CargoInputController.cs
│  │  ├─ ContactController.cs
│  │  ├─ DeductiblesInputController.cs
│  │  ├─ DraughtsInputController.cs
│  │  ├─ DraughtSurveyBlockController.cs       # Core survey block logic
│  │  ├─ ExcelTemplateController.cs             # Excel templates CRUD
│  │  ├─ GalleryController.cs
│  │  ├─ HomeController.cs
│  │  ├─ HydrostaticInputController.cs
│  │  ├─ HydrostaticTablesController.cs         # Hydrostatic tables management
│  │  ├─ InspectionsController.cs               # Inspections lifecycle
│  │  └─ VesselInputController.cs
│
│  ├─ Data/                                    # Persistence & bootstrapping
│  │  ├─ ApplicationDbContext.cs                # EF Core DbContext (PostgreSQL)
│  │  └─ DbInitializer.cs                       # Migrations + roles/admin seeding
│
│  ├─ Interfaces/                              # Abstractions
│  │  ├─ IEmailSender.cs
│  │  ├─ IImageService.cs
│  │  └─ IRepository.cs                        # Generic repository abstraction
│
│  ├─ Mappings/                                # Mapping layer
│  │  └─ MappingProfile.cs                     # DTO/ViewModel ↔ Entity mappings
│
│  ├─ Middleware/                              # Custom pipeline extensions
│  │  └─ SessionTrackingMiddleware.cs           # User session tracking
│
│  ├─ Models/                                  # Domain & persistence models
│  │  ├─ ApplicationUser.cs                    # Identity user
│  │  ├─ Inspection.cs
│  │  ├─ DraughtSurveyBlock.cs                 # Central aggregate root
│  │  ├─ CargoInput.cs
│  │  ├─ CargoResult.cs
│  │  ├─ DeductiblesInput.cs
│  │  ├─ DeductiblesResults.cs
│  │  ├─ DraughtsInput.cs
│  │  ├─ DraughtsResults.cs
│  │  ├─ HydrostaticInput.cs
│  │  ├─ HydrostaticResults.cs
│  │  ├─ UserHydrostaticTableHeader.cs
│  │  ├─ UserHydrostaticTableRow.cs
│  │  ├─ ExcelTemplate.cs
│  │  ├─ ExcelExportLog.cs
│  │  ├─ FeedbackTicket.cs
│  │  ├─ Remarks.cs
│  │  ├─ UserSession.cs
│  │  ├─ VesselInput.cs
│  │  ├─ EmailOptions.cs
│  │  ├─ SendGridOptions.cs
│  │  ├─ SmtpSettings.cs
│  │  └─ ErrorViewModel.cs
│
│  ├─ Services/                                # Business & infrastructure services
│  │  ├─ SurveyCalculationsService.cs           # Draught survey calculations
│  │  ├─ Repository.cs                          # EF Core repository implementation
│  │  ├─ ImageService.cs                        # Image storage / gallery logic
│  │  ├─ ExcelExportMapper.cs                   # Mapping entities → Excel export
│  │  ├─ ExcelTemplateFiller.cs                 # Filling Excel templates
│  │  ├─ SendGridEmailSender.cs
│  │  └─ SmtpEmailSender.cs
│
│  ├─ Utils/                                   # Helpers
│  │  └─ Utils.cs
│
│  ├─ ViewModels/                              # MVC ViewModels
│  │  ├─ CargoInputViewModel.cs
│  │  ├─ DeductiblesInputViewModel.cs
│  │  ├─ DraughtsInputViewModel.cs
│  │  ├─ HydrostaticInputViewModel.cs
│  │  ├─ InspectionCreateViewModel.cs
│  │  ├─ InspectionEditViewModel.cs
│  │  ├─ EditSurveyTimesViewModel.cs
│  │  ├─ ExcelTemplateCreateViewModel.cs
│  │  ├─ ExcelTemplateSelectViewModel.cs
│  │  ├─ ExcelTemplateUserSelectTemplate.cs
│  │  ├─ FeedbackTicketViewModel.cs
│  │  └─ VesselInputViewModel.cs
│
│  ├─ Views/                                   # Razor UI
│  │  ├─ About/
│  │  ├─ ApplicationUsers/
│  │  ├─ CargoInput/
│  │  ├─ Contact/
│  │  ├─ DeductiblesInput/
│  │  ├─ DraughtsInput/
│  │  ├─ DraughtSurveyBlock/
│  │  ├─ ExcelTemplate/
│  │  ├─ FeedbackAdmin/
│  │  ├─ Gallery/
│  │  ├─ Home/
│  │  ├─ HydrostaticInput/
│  │  ├─ HydrostaticTables/
│  │  ├─ Inspections/
│  │  ├─ Stats/
│  │  ├─ VesselInput/
│  │  └─ Shared/
│  │     ├─ _Layout.cshtml
│  │     ├─ _LoginPartial.cshtml
│  │     ├─ _ValidationScriptsPartial.cshtml
│  │     └─ Error.cshtml
│
│  ├─ wwwroot/                                # Static assets
│  │  ├─ css/
│  │  ├─ js/
│  │  ├─ lib/
│  │  ├─ images/
│  │  │  ├─ home/
│  │  │  ├─ gallery/
│  │  │  └─ og/
│  │  ├─ favicon.svg
│  │  ├─ robots.txt
│  │  └─ sitemap.xml
│
│  ├─ appdata/                                # Runtime data (DataProtection keys, etc.)
│
│  ├─ Migrations/                             # EF Core migrations
│  ├─ appsettings.json
│  ├─ appsettings.Development.json
│  ├─ appsettings.Production.json
│  ├─ Program.cs                              # DI configuration & middleware pipeline
│  └─ ScaffoldingReadMe.txt
│
└─ DraughtSurveyWebApp.Tests/                  # Test project

Project status

This is a live, deployed, and actively used web application, built as a practical tool for ship officers and marine surveyors to perform draught survey inspections and cargo quantity calculations in real operational conditions.

About

A production-ready ASP.NET Core MVC web application for real-world Draught Survey calculations used by ship officers and marine surveyors

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published