What problem does it solve?
Backend development often involves complex interactions between services, databases, and authentication, leading to potential inconsistencies and security vulnerabilities. This Skill provides a comprehensive guide to building scalable, secure, and maintainable backend systems for the Lighthouse Journey Timeline, ensuring consistency and reducing common pitfalls.
Core Features & Use Cases
- Structured API Development: Guides on using Express.js, TypeScript, Drizzle ORM, and Awilix for dependency injection, promoting a clean and modular architecture.
- CRITICAL Zod Validation: Emphasizes Zod for robust validation across all layers (controller, service, repository, DTO), ensuring end-to-end type safety and preventing runtime errors.
- Authentication & Permissions: Details a secure JWT implementation, comprehensive auth middleware, and a robust permission cascade pattern for granular access control.
- Use Case: When implementing a new API endpoint, such as
/api/v2/timeline/nodes, this skill guides you through defining Zod schemas, creating controllers, services, and repositories, implementing authentication, and ensuring proper error handling and testing.
Quick Start
I need to implement a new backend API endpoint for the Lighthouse Journey Timeline. Guide me through the process, including Zod validation, service layer integration, and testing, following the established patterns.