This is a specialized Next.js template designed for AI-powered code generation using RooCode. It includes comprehensive configuration files and development rules to maximize the effectiveness of AI-assisted development.
This template comes pre-configured with essential files for RooCode AI development:
.clinerules
- Defines technical stack, development workflows, and coding standards for AI.roomodes
- Configures custom AI modes for different development tasks- Pre-configured development workflows optimized for AI collaboration
- Automated code quality checks and formatting rules that align with AI-generated code
- 🎯 Optimized for AI-assisted development with RooCode
- 🚀 Next.js with App Router for robust routing and server-side rendering
- 💎 TypeScript for type safety
- 🎨 shadcn/ui + Tailwind CSS for beautiful, customizable UI components
- 📦 Zustand for state management
- 🧪 Vitest + React Testing Library for testing
- 📚 Storybook for component documentation
- ✨ ESLint and Prettier for code quality
- 🔍 Pre-commit hooks with lefthook
- 🛠️ Additional tools and libraries:
- Zod for schema validation
- React Hook Form for form management
- Day.js for date handling
- NextAuth.js for authentication
- Pino for logging
- MSW for API mocking
- Playwright for E2E testing
The .clinerules
file defines:
- Technical stack specifications
- Development workflow phases
- Coding standards and best practices
- Testing requirements
- Security guidelines
Custom AI modes for different development tasks:
- PM Mode: Project management and requirements definition
- Architect Mode: System design and architecture planning
- Code Mode: Implementation and testing
- Debug Mode: Problem diagnosis and resolution
- Node.js (LTS version)
- npm
- RooCode extension installed in VS Code
- Clone the repository:
git clone <repository-url>
cd nextjs-roocode-template
- Install dependencies:
npm ci
- Copy the environment file:
cp .env.example .env.local
- Start the development server:
npm run dev
Visit http://localhost:3000 to see your application.
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLintnpm run format
- Format code with Prettiernpm test
- Run tests with Vitestnpm run test:coverage
- Generate test coverage reportnpm run storybook
- Start Storybook development servernpm run tsc
- Check TypeScript types
src/
├── __mocks__/ # Mock definitions
├── __tests__/ # Test files
├── app/ # Next.js App Router files
├── components/ # React components
│ ├── features/ # Feature-specific components
│ ├── layout/ # Layout components
│ └── ui/ # Base UI components
├── env/ # Environment variables definition for t3-env
└── lib/ # Utility functions and shared logic
- Follow the development workflow defined in
.clinerules
- Utilize appropriate AI modes for different development tasks
- Follow the TypeScript coding standards
- Write comprehensive tests for new features
- Update Storybook documentation for UI components
- Ensure ESLint and Prettier rules are followed
- Use shadcn/ui components when possible
- Follow the commit message convention
- Create a feature branch from
main
- Make your changes following the AI development guidelines
- Run tests and ensure all checks pass
- Submit a pull request to
main
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.