This file defines how to behave when working on this project. Follow these guidelines strictly.
- Keep it lightweight - No heavy frameworks or over-engineering
- Simple solutions first - Prefer simple, straightforward code over complex patterns
- Minimal dependencies - Only add packages when absolutely necessary
- Direct and clear - Code should be easy to read and understand
- Framework: Next.js 14+ (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- No ORM - Use direct database queries or lightweight query builders if needed
- No heavy auth libraries - Keep authentication simple
studybuddy/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ └── ...
├── components/ # React components
├── lib/ # Utility functions
└── public/ # Static assets
- Use TypeScript - Type everything properly
- Keep components small - One component per file
- Use Tailwind for styling - No CSS-in-JS libraries
- API routes in app/api/ - Keep them simple and focused
- Utilities in lib/ - Reusable functions only
- ❌ Don't add Prisma or heavy ORMs
- ❌ Don't add complex state management (use React state/context)
- ❌ Don't add unnecessary abstractions
- ❌ Don't over-engineer solutions
- ❌ Don't add packages without asking first
- ✅ Keep code simple and readable
- ✅ Use built-in Next.js features
- ✅ Write clear, self-documenting code
- ✅ Ask before adding new dependencies
- ✅ Follow Next.js App Router patterns
- Use direct SQL queries or a lightweight query builder (like
pgfor PostgreSQL) - Keep database logic in API routes or server components
- No migrations framework - use simple SQL scripts if needed
- Keep it simple - use NextAuth.js only if necessary
- Prefer simple session management
- No complex auth providers unless required
Ask the user before:
- Adding new dependencies
- Creating complex abstractions
- Implementing patterns that add complexity
- Making architectural decisions