168 lines
5.6 KiB
Markdown
168 lines
5.6 KiB
Markdown
# Feature-Based Architecture Development Checklist
|
|
|
|
## Domain Analysis & Planning
|
|
|
|
- [ ] Business domain clearly identified and defined
|
|
- [ ] Bounded context boundaries established
|
|
- [ ] Domain entities and relationships mapped
|
|
- [ ] Feature independence validated (minimal cross-feature dependencies)
|
|
- [ ] Ubiquitous language defined for the domain
|
|
- [ ] Business requirements thoroughly documented
|
|
|
|
## Project Structure
|
|
|
|
- [ ] Feature organized in `(features)/({feature-name})/` route group
|
|
- [ ] API layer structured in `api/{entity-name}/` directory
|
|
- [ ] Components organized in `components/` directory within feature
|
|
- [ ] Custom hooks placed in `hooks/` directory within feature
|
|
- [ ] TypeScript types defined in `types/` directory within feature
|
|
- [ ] Feature pages organized in appropriate subdirectories
|
|
|
|
## Schema-First Development
|
|
|
|
- [ ] Zod schema defined for entity validation
|
|
- [ ] TypeScript interfaces derived from Zod schemas
|
|
- [ ] Create, Update, and Search schemas properly defined
|
|
- [ ] Database model interface created (database-agnostic)
|
|
- [ ] API response types properly typed
|
|
- [ ] Schema validation covers all business rules
|
|
|
|
## BaseController Implementation
|
|
|
|
- [ ] Entity controller extends BaseController abstract class
|
|
- [ ] Database-agnostic design maintained
|
|
- [ ] `buildSearchFilter` method implemented for entity-specific search
|
|
- [ ] CRUD operations properly inherited and customized if needed
|
|
- [ ] Error handling follows established patterns
|
|
- [ ] Controller uses Zod schema for validation
|
|
|
|
## API Routes Development
|
|
|
|
- [ ] Collection routes (`/api/{entity}`) implemented
|
|
- [ ] Individual entity routes (`/api/{entity}/[id]`) implemented
|
|
- [ ] HTTP methods properly implemented (GET, POST, PUT, DELETE)
|
|
- [ ] Error handling with proper HTTP status codes
|
|
- [ ] Request/response validation using schemas
|
|
- [ ] Database connection properly managed
|
|
|
|
## Custom Hooks Implementation
|
|
|
|
- [ ] Data fetching hooks follow naming convention (`use{Entities}`)
|
|
- [ ] Mutation hooks follow naming convention (`use{Entity}Mutations`)
|
|
- [ ] Single entity hooks follow naming convention (`use{Entity}`)
|
|
- [ ] Hooks properly handle loading states
|
|
- [ ] Error states handled appropriately
|
|
- [ ] Pagination implemented for list operations
|
|
- [ ] Search functionality integrated
|
|
|
|
## React Components
|
|
|
|
- [ ] Components follow PascalCase naming convention
|
|
- [ ] Form components implemented (`{Entity}Form`)
|
|
- [ ] List components implemented (`{Entity}List`)
|
|
- [ ] Card/detail components implemented (`{Entity}Card`)
|
|
- [ ] Search components implemented (`{Entity}Search`)
|
|
- [ ] Components are properly typed with TypeScript
|
|
- [ ] Tailwind CSS used for styling
|
|
- [ ] Components follow accessibility guidelines
|
|
|
|
## Next.js Pages
|
|
|
|
- [ ] Feature index page implemented (`page.tsx`)
|
|
- [ ] Entity detail pages implemented (`[id]/page.tsx`)
|
|
- [ ] Create new entity page implemented (`new/page.tsx`)
|
|
- [ ] Edit entity page implemented (`[id]/edit/page.tsx`)
|
|
- [ ] Server Components used by default
|
|
- [ ] Client Components only used when necessary
|
|
- [ ] Proper layouts and navigation implemented
|
|
|
|
## Type Safety
|
|
|
|
- [ ] Strict TypeScript configuration enforced
|
|
- [ ] No `any` types used
|
|
- [ ] End-to-end type safety from database to UI
|
|
- [ ] Proper type imports and exports
|
|
- [ ] Interface segregation properly implemented
|
|
- [ ] Generic types used appropriately
|
|
|
|
## Code Quality
|
|
|
|
- [ ] ESLint rules passing without warnings
|
|
- [ ] Prettier formatting applied consistently
|
|
- [ ] No console statements in production code
|
|
- [ ] Import statements properly organized
|
|
- [ ] `@/` alias used for internal imports
|
|
- [ ] Code follows established conventions
|
|
|
|
## Testing
|
|
|
|
- [ ] Unit tests for controller logic
|
|
- [ ] API route integration tests
|
|
- [ ] React component tests
|
|
- [ ] Custom hooks tests
|
|
- [ ] Edge cases covered in tests
|
|
- [ ] Test data and mocks properly implemented
|
|
|
|
## Database Integration
|
|
|
|
- [ ] Database connection abstracted properly
|
|
- [ ] ORM/ODM integration follows patterns
|
|
- [ ] Migration strategy considered
|
|
- [ ] Database queries optimized
|
|
- [ ] Indexes planned for search operations
|
|
- [ ] Data relationships properly modeled
|
|
|
|
## Performance Considerations
|
|
|
|
- [ ] Server Components used for data fetching
|
|
- [ ] Client Components minimized
|
|
- [ ] Database queries optimized
|
|
- [ ] Pagination implemented for large datasets
|
|
- [ ] Caching strategy considered
|
|
- [ ] Bundle size impact assessed
|
|
|
|
## Security
|
|
|
|
- [ ] Input validation on all API endpoints
|
|
- [ ] Authentication/authorization considered
|
|
- [ ] SQL injection prevention (if using SQL database)
|
|
- [ ] XSS prevention in components
|
|
- [ ] CSRF protection implemented
|
|
- [ ] Error messages don't leak sensitive information
|
|
|
|
## Documentation
|
|
|
|
- [ ] Feature purpose and scope documented
|
|
- [ ] API endpoints documented
|
|
- [ ] Component usage examples provided
|
|
- [ ] Business logic explained
|
|
- [ ] Integration points documented
|
|
- [ ] Database schema documented
|
|
|
|
## Integration & Dependencies
|
|
|
|
- [ ] Shared infrastructure properly utilized
|
|
- [ ] Cross-feature dependencies minimized
|
|
- [ ] Integration points well-defined
|
|
- [ ] Shared types and utilities used appropriately
|
|
- [ ] Feature can be developed independently
|
|
- [ ] Feature can be tested in isolation
|
|
|
|
## Deployment Readiness
|
|
|
|
- [ ] Environment variables properly configured
|
|
- [ ] Production build successful
|
|
- [ ] Database migrations ready (if needed)
|
|
- [ ] Performance benchmarks acceptable
|
|
- [ ] Error monitoring configured
|
|
- [ ] Health checks implemented
|
|
|
|
## Review & Quality Assurance
|
|
|
|
- [ ] Code review completed
|
|
- [ ] Architecture review completed
|
|
- [ ] Business logic verified
|
|
- [ ] User experience tested
|
|
- [ ] Accessibility tested
|
|
- [ ] Cross-browser compatibility verified
|