Coder is a modern frontend generator built specifically for Next.js applications. It helps developers quickly scaffold, design, and manage UI components with a focus on speed, scalability, and developer experience.
Application interface - Main dashboard
Code generation and project management
AI-powered development workflow
User interface and features overview
- AI-powered code interpretation using E2B sandboxes
- User authentication with Clerk
- Project management
- Real-time messaging
- Database persistence with PostgreSQL and Prisma
- Node.js (v18 or higher)
- PostgreSQL database
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd coder
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory with the following variables:# Database Configuration DATABASE_URL=postgresql://username:password@localhost:5432/database_name # Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_publishable_key CLERK_SECRET_KEY=sk_test_your_secret_key # Google Gemini API GEMINI_API_KEY=your_gemini_api_key # E2B Sandbox API E2B_API_KEY=your_e2b_api_key
-
Database Setup
Generate Prisma client and run migrations:
npx prisma generate npx prisma db push
-
Run the development server
npm run dev
The application will be available at http://localhost:3000
| Variable | Description | Where to get |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Your PostgreSQL database |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk publishable key for authentication | Clerk Dashboard |
CLERK_SECRET_KEY |
Clerk secret key for server-side authentication | Clerk Dashboard |
GEMINI_API_KEY |
Google Gemini API key for AI features | Google AI Studio |
E2B_API_KEY |
E2B API key for code sandboxes | E2B Platform |
For local development, you can use either:
-
Local PostgreSQL (recommended for development):
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/coder_dev
-
Cloud Database (Neon, Supabase, etc.):
DATABASE_URL=postgresql://user:password@host:port/database?sslmode=require
- Sign up at clerk.com
- Create a new application
- Copy the publishable and secret keys from the dashboard
- Go to Google AI Studio
- Create an API key for Gemini
- Add billing information if required
- Sign up at e2b.dev
- Generate an API key from your dashboard
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpx prisma studio- Open Prisma Studio for database managementnpx prisma db push- Push schema changes to databasenpx prisma generate- Generate Prisma clientnpx inngest-cli@latest dev -u http://localhost:3000/api/inngest- Run Inngest development server
src/
├── app/ # Next.js app directory
├── components/ # React components
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries
├── modules/ # Feature modules
└── middleware.js # Next.js middleware
prisma/
└── schema.prisma # Database schema
public/ # Static assets
The application uses PostgreSQL with Prisma ORM. Key models include:
- User: User accounts linked to Clerk
- Project: User projects
- Message: Chat messages with AI
-
Database connection errors
- Ensure PostgreSQL is running
- Check DATABASE_URL format
- Verify database exists
-
Clerk authentication issues
- Verify API keys are correct
- Check if domain is configured in Clerk dashboard
-
E2B sandbox errors
- Ensure API key is valid
- Check E2B service status
- Check the logs in the terminal for detailed error messages
- Ensure all environment variables are properly set
- Verify all external services are configured correctly
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
[Add your license information here]



