This is a Next.js project bootstrapped with create-next-app
.
- Real-time collaborative code editing
- Built-in code execution with multiple language support (using Piston API)
- Live video and chat capabilities
- User authentication and room management
Create a .env.local
file in the root directory with the following variables:
# NextAuth Configuration
NEXTAUTH_SECRET=your_nextauth_secret_here
NEXTAUTH_URL=http://localhost:3000
# Database Configuration (if using MongoDB)
MONGODB_URI=your_mongodb_connection_string_here
# Liveblocks Configuration
LIVEBLOCKS_SECRET_KEY=your_liveblocks_secret_key_here
This project uses the Piston API for code execution, which is:
- Free to use with generous limits
- No API key required
- Supports 30+ programming languages
- Fast and reliable execution
First, install the dependencies:
npm install
# or
yarn install
# or
pnpm install
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
/api/languages
- Returns supported programming languages for Piston API/api/execute
- Executes code using Piston API/api/auth/[...nextauth]
- NextAuth authentication routes/api/room/*
- Room management endpoints
The code execution feature supports the following languages:
- JavaScript (Node.js)
- Python (2.7 & 3.8)
- Java
- C/C++
- C#
- Go
- Rust
- PHP
- Ruby
- TypeScript
- And many more...
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.