ποΈ Service Pattern
To keep controllers thin and logic testable, we strictly adhere to the Service-Repository Pattern.
ποΈ Database Schema
The core data is stored in MySQL 8. The schema is designed for multi-tenancy (Schools/Stables).
ποΈ Websockets & Events
We use Websockets to enable Sub-second Latency for critical alerts.
ποΈ Security & Authentication
The platform uses a robust security model combining Stateful Session Authentication (via JWT or Opaque tokens) and Role-Based Access Control (RBAC).
ποΈ Middleware
Middleware are hooks that run before or after a request is handled by a controller. They are registered in start/kernel.ts.
ποΈ Error Handling
We generally do not use try/catch in controllers. Instead, we let exceptions bubble up to the Global Exception Handler.
ποΈ Notifications
The platform is designed to alert users within seconds of a critical event (e.g., Horse Cast).
ποΈ Logging & Auditing
We use a dual-layer logging strategy: Application Logs (for Developers) and Audit Logs (for Admins).
ποΈ Validation
We use VineJS for high-performance schema validation.
ποΈ Caching Strategy
To reduce database load and improve response times, we implement caching at multiple layers.
ποΈ Decorators
To keep our code clean and declarative, we use Custom Decorators for cross-cutting concerns like Caching and Error Handling.