1. Project Goal
We are upgrading an existing e-commerce platform into a scalable, modern, production-grade system. The goal is to improve performance, architecture, security, and maintainability.
2. Current Stack (For Reference)
- Next.js 12 (Pages Router)
- Redux Toolkit + React Query
- Custom JWT Authentication
- Stripe (basic integration)
- Sanity CMS
- Monolithic structure (frontend + backend combined)
3. Target Stack (Must Use)
- Next.js 14+ (App Router, Server Components)
- TypeScript (strict mode)
- State Management: React Query + Zustand
- Backend: NestJS or Next.js Route Handlers
- Database: PostgreSQL + Prisma ORM
- Authentication: Auth.js (NextAuth) or equivalent
- Payments: Stripe with webhook integration
- CMS: Sanity (existing)
4. Core Requirements
- Build scalable architecture (separate frontend and backend)
- Implement secure authentication system
- Integrate Stripe with proper server-side validation
- Design clean API structure (REST or GraphQL)
- Ensure SEO optimization and performance
- Follow clean code and modular design principles
5. Performance Requirements
- Use Server Components where applicable
- Optimize images and loading speed
- Implement caching strategies
- Ensure mobile-first responsive design
6. Security Requirements
- Secure authentication and session handling
- Validate Stripe webhooks properly
- Protect APIs against common vulnerabilities
- No sensitive logic on client-side
7. Code Quality Expectations
- Strict TypeScript usage
- Reusable components and hooks
- Clear folder structure
- Basic testing (unit and/or integration)
- Proper error handling
8. Deliverables
- Clean and documented codebase
- Setup instructions
- Scalable architecture design
- Production-ready deployment
9. Evaluation Criteria
- Understanding of modern Next.js (App Router)
- Ability to design scalable systems
- Experience with Stripe and authentication
- Code quality and structure
- Communication and clarity
