A fully functional Replit clone built with Next.js, Monaco Editor, and CodeSandbox Sandpack, featuring real-time code editing, AI-powered code generation via CopilotKit, and seamless MongoDB Atlas integration.
- Real-time code editing with Monaco Editor
- Live preview using CodeSandbox Sandpack
- AI-powered code generation with CopilotKit
- File management with MongoDB Atlas
- Support for static HTML/CSS/JS and React applications
- Seamless developer experience with Tailwind CSS
- Frontend: Next.js (without TypeScript, no
/srcfolder), Tailwind CSS - Editor: Monaco Editor
- Live Preview: CodeSandbox Sandpack
- AI Code Generation: CopilotKit
- Database: MongoDB Atlas
- Backend: Next.js API routes
- Clone the repository:
git clone https://github.com/yourusername/replit-clone.git cd replit-clone - Install dependencies:
npm install
- Create a
.env.localfile and add the following environment variables:MONGODB_URI=your_mongodb_atlas_connection_string GROQ_CLOUD_API_KEY=your_groq_cloud_api_key
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser.
- Prankur Pandey Twitter - @prankurpandeyy
- Prankur Pandey Linkedin - @prankurpandeyy
- Create and manage code files through the File Explorer.
- Write and edit code in Monaco Editor.
- View live previews of static and React files via Sandpack.
- Generate AI-powered code snippets with CopilotKit.
POST /api/files- Create a new fileGET /api/files- Retrieve all filesGET /api/files/:id- Get a specific filePUT /api/files/:id- Update a fileDELETE /api/files/:id- Delete a file
- Implement multi-user collaboration
- Enhance AI capabilities with Groq Cloud
- Add authentication with NextAuth.js
This project is licensed under the MIT License.
- Prankur Pandey - @prankurpandeyy