- Node.js (v18 or higher)
- MongoDB (for local development)
- Git (for version control)
- Open PowerShell as Administrator
- Run:
npm run install-all - Copy:
copy server\env.example server\.env - Copy:
copy client\env.example client\.env - Start MongoDB service or use Docker
- Run:
npm run dev - Open: http://localhost:3000
-
Install Dependencies
npm run install-all
-
Set up Environment Variables
# Windows copy server\env.example server\.env copy client\env.example client\.env # Linux/Mac cp server/env.example server/.env cp client/env.example client/.env # Edit both .env files with your settings # Default values work for local development
-
Start MongoDB
# Using MongoDB service (Linux/Mac) sudo systemctl start mongod # Windows - Download and install MongoDB Community Server # Or using Docker (all platforms) docker run -d -p 27017:27017 --name mongodb mongo:latest # Or use MongoDB Atlas (cloud) - no local installation needed
-
Start the Application
# This starts both frontend and backend npm run dev -
Access the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
-
Deploy Backend to Render
- Follow DEPLOYMENT.md for detailed instructions
- Backend will be available at your Render URL
-
Deploy Frontend to Vercel
- Follow DEPLOYMENT.md for detailed instructions
- Frontend will be available at your Vercel URL
- Multi-Language Support: JavaScript, Python, Java, C++, C, TypeScript
- Real-time Code Execution: Instant compilation and execution
- Monaco Editor: Advanced code editor with syntax highlighting
- Project Management: Save, load, and organize code projects
- Real-time Collaboration: Work together on projects
- User Authentication: Secure registration and login
- Dark Theme: Beautiful, eye-friendly interface
- Responsive Design: Works on all devices
- Tailwind CSS: Utility-first styling
- Fast Development: Vite for lightning-fast builds
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/syncruncode
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRE=7d
CORS_ORIGIN=http://localhost:3000
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
EXECUTION_TIMEOUT=5000
MAX_FILE_SIZE=10485760VITE_API_URL=http://localhost:5000
VITE_SOCKET_URL=http://localhost:5000For production deployment, update the URLs:
- Server: Change
CORS_ORIGINto your frontend domain - Client: Change
VITE_API_URLandVITE_SOCKET_URLto your backend domain
# Install all dependencies
npm run install-all
# Start development (both frontend and backend)
npm run dev
# Start only backend
npm run server
# Start only frontend
npm run client
# Build for production
npm run build
# Start production server
npm start- Open the application at http://localhost:3000
- Create an account or login
- Select a language (e.g., JavaScript)
- Write some code:
console.log("Hello, World!");
- Click "Run" to execute the code
- Save the project for later access
-
MongoDB Connection Error
- Ensure MongoDB is running
- Check connection string in .env file
- For Windows: Make sure MongoDB service is started
-
JSX Syntax Errors
- All context files should be
.jsxnot.js - Restart the development server after file changes
- All context files should be
-
Code Execution Fails
- Check if required compilers are installed
- Verify file permissions for temp directories
-
Port Already in Use
- Change PORT in .env file
- Kill processes using the ports
- Windows:
netstat -ano | findstr :5000thentaskkill /PID <PID> /F
-
Build Failures
- Check if all dependencies are installed
- Verify Node.js version compatibility
- Run
npm run install-allto reinstall everything
-
Windows-Specific Issues
- Use PowerShell or Command Prompt as Administrator
- Ensure Node.js and npm are properly installed
- Check Windows Defender isn't blocking the application
- Customize the UI: Modify Tailwind configuration
- Add More Languages: Extend language support
- Deploy to Production: Use Render and Vercel
- Add Features: Implement additional functionality
- Monitor Performance: Set up analytics and monitoring
If you encounter any issues:
- Check the console for error messages
- Verify all dependencies are installed
- Ensure MongoDB is running
- Check the README.md for detailed documentation
Happy Coding! 🎉