A simple online code editor where you can write and run code in a few programming languages, or play around with HTML, CSS, and JavaScript with a live preview.
- C
- C++
- Java
- Python
- Edit HTML, CSS, and JavaScript in separate tabs
- See the result in a side-by-side preview
- Syntax highlighting
- Multiple color themes
- Adjustable font size and font family
- Toggle line numbers and code wrapping
- Input and output panels for programs
- Next.js 16 App router
- React 19
- TypeScript
- Tailwind CSS
- shadcn/ui
- Ace Editor (react-ace)
- Node.js 18+
- Git
-
Clone the repository:
git clone https://github.com/ankitk26/nextpen.git cd nextpen -
Install dependencies:
npm install # or bun install -
Create a
.env.localfile:cp .env .env.local
Add your JDOODLE API credentials:
JDOODLE_CLIENT_ID=your_client_id JDOODLE_CLIENT_SECRET=your_client_secret
Get your free API credentials at jdoodle
-
Run the development server:
npm run dev # or bun run dev -
Open your browser and navigate to
http://localhost:3000
- Select a language from the dropdown (C, C++, Java, or Python)
- Write your code in the editor
- Enter input if your program needs it
- Click "Run" to execute
- View the output
- Select "Web Development" from the language dropdown
- Edit HTML, CSS, and JavaScript in their respective tabs
- See the result in the preview panel
- Issues: GitHub Issues
- Repository: GitHub