chore: refactor project structure and clean up unused components
- Updated `TODO.md` to reflect new testing tasks and final structure expectations. - Simplified TypeScript path mappings in `tsconfig.json` for better clarity. - Revised business logic separation rules in `.cursor/rules` to align with new directory structure. - Deleted unused client components and services to streamline the codebase. - Adjusted import paths in scripts to match the new structure.
This commit is contained in:
@@ -5,26 +5,26 @@ alwaysApply: true
|
||||
# Project Structure Rules
|
||||
|
||||
1. Backend:
|
||||
- [services/](mdc:services/) - ALL database access
|
||||
- [app/api/](mdc:app/api/) - API routes using services
|
||||
- [src/services/](mdc:src/services/) - ALL database access
|
||||
- [src/app/api/](mdc:src/app/api/) - API routes using services
|
||||
|
||||
2. Frontend:
|
||||
- [clients/](mdc:clients/) - HTTP clients
|
||||
- [components/](mdc:components/) - React components (organized by domain)
|
||||
- [hooks/](mdc:hooks/) - React hooks
|
||||
- [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:
|
||||
- [lib/](mdc:lib/) - Types and utilities
|
||||
- [src/lib/](mdc:src/lib/) - Types and utilities
|
||||
- [scripts/](mdc:scripts/) - Utility scripts
|
||||
|
||||
Key Files:
|
||||
|
||||
- [services/database.ts](mdc:services/database.ts) - Database pool
|
||||
- [clients/base/http-client.ts](mdc:clients/base/http-client.ts) - Base HTTP client
|
||||
- [lib/types.ts](mdc:lib/types.ts) - Shared types
|
||||
- [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 services/
|
||||
- HTTP calls outside clients/
|
||||
- Business logic in components/
|
||||
- Database access outside src/services/
|
||||
- HTTP calls outside src/clients/
|
||||
- Business logic in src/components/
|
||||
|
||||
Reference in New Issue
Block a user