---
alwaysApply: true
---

# Project Structure Rules

1. Backend:
   - [src/services/](mdc:src/services/) - ALL database access
   - [src/app/api/](mdc:src/app/api/) - API routes using services

2. Frontend:
   - [src/clients/](mdc:src/clients/) - HTTP clients
   - [src/components/](mdc:src/components/) - React components (organized by domain)
   - [src/hooks/](mdc:src/hooks/) - React hooks

3. Shared:
   - [src/lib/](mdc:src/lib/) - Types and utilities
   - [scripts/](mdc:scripts/) - Utility scripts

Key Files:

- [src/services/database.ts](mdc:src/services/database.ts) - Database pool
- [src/clients/base/http-client.ts](mdc:src/clients/base/http-client.ts) - Base HTTP client
- [src/lib/types.ts](mdc:src/lib/types.ts) - Shared types

❌ FORBIDDEN:

- Database access outside src/services/
- HTTP calls outside src/clients/
- Business logic in src/components/
