A production-ready ASP.NET Core MVC web application for truck-based cargo weight control used by cargo surveyors and tally teams during loading and discharging operations at ports, terminals, warehouses, and silos.
The application supports real-time multi-user workflows, tracking each truck from initial weighing through cargo operations to final weighing, with automated totals and PDF reporting.
- Production-ready ASP.NET Core MVC application, deployed on Linux (Nginx + systemd)
- Real-world inspection workflow used during cargo operations (ports / terminals)
- Authentication & authorization:
- ASP.NET Core Identity
- Email confirmation, password recovery
- Roles (User / Admin)
- Admin panel for inspections, statistics, and feedback management
- Multi-user concurrent input (weighbridge operator + cargo operations operator)
- State-driven truck lifecycle tracking:
- Initial weighing
- Cargo operations started / finished
- Final weighing
- Excel-like operational UI, optimized for fast data entry
- Responsive and mobile-friendly design
- Server-side data validation & consistency
- Pagination and server-side filtering for large truck datasets
- PDF export (daily and period-based tally sheets with totals and balances)
- Persistent Data Protection keys (cookies remain valid after restarts)
- Deployed and running in production
- Create inspections with vessel, cargo, location, timezone
- Optional inspection logo and notes
Truck workflow
- Initial and final weight capture
- Automatic net weight calculation
- Plate number autocomplete from historical data
Operational safety logic
- Trucks must pass initial weighing before cargo operations
- Visual separation of truck states
Truck status dashboard
- Waiting for cargo operations
- Under cargo operations
- Waiting for final weighing
- Completed
Team collaboration
- Multiple users working on the same inspection simultaneously
- Shared real-time status visibility
Reporting
- PDF export using QuestPDF
- Export entire inspection or selected date/time range
- Daily summaries and balance figures for selected period or from the beginning
- Create an inspection (vessel, cargo, location, timezone, optional logo & notes)
- At the weighbridge, record initial truck weight
- At the cargo operations point, mark start and finish of loading/discharging
- Perform final weighing at the weighbridge
- Review totals and balance figures
- Export a PDF tally sheet for reporting or handover
Backend / Web
- ASP.NET Core MVC
- ASP.NET Core Identity + Roles
- Entity Framework Core (Code First, migrations)
- PostgreSQL
- AutoMapper
Frontend
- Razor Views (MVC)
- Server-side validation with domain rules
- Bootstrap-based responsive layout
Infrastructure / Deployment
- Linux server deployment
- Nginx reverse proxy
- systemd services
- Persistent Data Protection keys
- Email delivery: SendGrid
- PDF generation: QuestPDF
TrucksWeighingWebApp/
├─ Areas/
│ └─ Identity/ # ASP.NET Core Identity UI
│
├─ Controllers/
│ ├─ Admin/ # Admin-only endpoints
│ ├─ HomeController.cs
│ ├─ InspectionsController.cs # Core inspections workflow
│ ├─ TruckRecordsController.cs # Truck weighing records
│ ├─ GalleryController.cs
│ └─ ContactController.cs
│
├─ Data/
│ └─ ApplicationDbContext.cs # EF Core DbContext
│
├─ DTOs/
│ └─ Export/ # Excel / PDF export DTOs
│
├─ Infrastructure/
│ ├─ Identity/ # Role & admin seeding
│ │ ├─ IdentitySeed.cs
│ │ ├─ RoleNames.cs
│ │ └─ SeedOptions.cs
│ ├─ Telemetry/
│ │ └─ UserSessionMiddleware.cs # Session & activity tracking
│ └─ TimeZone/
│ └─ Tz.cs
│
├─ Interfaces/
│
├─ Mappings/
│ └─ MappingProfile.cs # AutoMapper profiles
│
├─ Models/
│ ├─ ApplicationUser.cs
│ ├─ Inspection.cs
│ ├─ TruckRecord.cs
│ ├─ UserSession.cs
│ ├─ UserLogo.cs
│ ├─ FeedbackTicket.cs
│ ├─ ErrorViewModel.cs
│ └─ SendGridOptions.cs
│
├─ Services/
│ ├─ Auth/
│ │ └─ AppCookieEvents.cs # Login counters
│ ├─ Export/
│ │ ├─ TruckExcelExporter.cs
│ │ └─ TruckPdfExporter.cs
│ ├─ Logos/
│ │ └─ UserLogoService.cs
│ └─ SendGridEmailService.cs
│
├─ ViewModels/
│ ├─ InspectionCreateViewModel.cs
│ ├─ InspectionEditViewModel.cs
│ ├─ TruckRecordCreateViewModel.cs
│ ├─ TruckRecordEditViewModel.cs
│ ├─ PeriodStatsViewModel.cs
│ └─ FeedbackTicketViewModel.cs
│
├─ Views/
│ ├─ Inspections/
│ ├─ TruckRecords/
│ ├─ Gallery/
│ ├─ Stats/
│ ├─ Home/
│ └─ Shared/
│ ├─ _Layout.cshtml
│ ├─ _LoginPartial.cshtml
│ └─ Error.cshtml
│
├─ wwwroot/
│ └─ uploads/
│ └─ logos/ # User-uploaded logos
│
├─ keys/ # Data Protection keys
│
├─ Migrations/
├─ appsettings.json
├─ appsettings.Development.json
├─ appsettings.Production.json
├─ Program.cs # DI + middleware pipeline
└─ TrucksWeighingWebApp.csproj
This is a live, deployed, and actively used application, built as practical tool for the cargo surveyors and tally teams that helps control cargo weight during truck operations at terminals - in ports, warehouses, and silos (loading or discharging).









