Seven layers, clear boundaries
I followed the same principles in the logistics platform and in Ders Alanı: each layer has one responsibility, access is checked as close to the resource as possible, and risky work is kept out of the main application.
-
User interface
Screens where each role sees only its own work: a PWA on the driver’s phone, bulk-action workspaces in the office. The interface is never the only gatekeeper of access.
The driver app scans barcodes with the camera; the customer portal lists only that customer’s shipments.
-
Application layer
Thin endpoints that receive requests. They validate input, check the session and CSRF protection, and hand the work to the business layer.
Screens and API endpoints stay thin; rules live in dedicated services.
-
Authorisation
Authentication does not replace authorisation. Access is granted per resource, weighing role, company or institution, and object ownership together.
In Ders Alanı, access to a class and access to its recording are checked separately.
-
Business logic
Status transitions, calculations and constraints live in one place. A rule is written for the business, not for a screen, so the same calculation gives the same answer everywhere.
Shipment status transitions are rule-based and reversible; report card scores are computed only on the server.
-
API integration
Code that talks to external systems is kept apart from the main application. Long-running or risky work, such as browser automation and messaging, runs in its own services with short-lived signed tokens.
Vehicle tracking, routing, WhatsApp and accounting bridges are separate processes.
-
Database
A relational model, versioned migrations and an explicit strategy for concurrent writes. History is never deleted; who changed what, and when, is always known.
Ders Alanı uses revision-based optimistic concurrency; a stale writer is rejected.
-
Infrastructure
Linux servers, Nginx, version-locked deployment, metrics, alerting rules, and backups whose restore is actually rehearsed. Infrastructure details are never published.
Restore-from-backup and rollback procedures are written down and actually tested.