Build your own CodePad/HackerRank alternative for $0/month!
OpenCode is a free, open-source real-time collaborative coding platform perfect for conducting technical interviews. Built with Firebase,Firepad, Piston and ACE Editor, it provides a easy to interview setup with zero downpayment!
Feature | CoderPad | HackerRank | OpenCode |
---|---|---|---|
Monthly Cost | $599+ | $819+ | $0 |
Real-time Collaboration | β | β | β |
Code Execution | β | β | β |
Multiple Languages | β | β | β |
Custom Branding | β | β | β |
Self-Hosted | β | β | β |
Open Source | β | β | β |
- π Real-time collaborative editing - See changes instantly
- π 16+ programming languages - JavaScript, Python, Java, C++, and more
βΆοΈ Live code execution - Run code directly in the browser- π₯ Role-based access - Separate interviewer and candidate permissions
- π’ Simple 6-digit codes - Easy session sharing (like Zoom!)
- π Live presence indicators - See who's online
- π¨ Multiple themes - Dark mode included
- π± Zero setup for candidates - Just share the code and start
- Firebase (Free tier) - Real-time database & hosting
- Firepad - Operational transformation for collaboration
- ACE Editor - Industry-standard code editor
- Piston API - Free code execution service
git clone https://github.com/humancto/opencode.git
cd opencode
- Go to Firebase Console β Create Project
- Click βοΈ Settings β Scroll to "Your apps" β Click
</>
Web icon - Copy the config values
# Copy the example config file
cp lib/firebase-sdk.example.js lib/firebase-sdk.js
# Edit lib/firebase-sdk.js and add your Firebase credentials
In Firebase Console β Realtime Database β Create Database β Start in test mode
python3 -m http.server 8000
Done! Access at http://localhost:8000
- Click "I'm an Interviewer"
- Login with default credentials:
- Email:
admin@opencode.com
- Password:
admin123
- Email:
- Click "Create New Session"
- Share the 6-digit code with candidates
- Click "I'm a Candidate"
- Enter your name
- Enter the 6-digit session code from interviewer
- Click "Join Session"
Edit scripts/auth.js
:
const ADMIN_CREDENTIALS = {
email: 'your-email@company.com',
password: 'your-secure-password'
};
Edit index.html
:
<title>YourCompany - Coding Interviews</title>
<h2>YourCompany Code Editor</h2>
Edit scripts/firepad.js
and add to languageConfig
:
const languageConfig = {
// ... existing languages
scala: { mode: 'ace/mode/scala', ext: 'scala' },
// Add more as needed
};
The platform supports all ACE editor themes. Add more options in the theme selector dropdown in index.html
.
For production, update your Firebase Realtime Database rules:
{
"rules": {
"sessions": {
"$sessionId": {
".read": true,
".write": true,
".validate": "newData.hasChildren(['firepad'])"
}
}
}
}
- Use environment variables for sensitive data in production
- Implement proper authentication - Consider Firebase Auth for production
- Add rate limiting to prevent abuse
- Monitor usage to stay within Firebase free tier limits
- Realtime Database: 1GB storage, 10GB/month transfer
- Hosting: 10GB storage, 360MB/day transfer
- Simultaneous connections: 100
This is sufficient for:
- ~100 concurrent interviews
- ~1000 interviews per month
- ~10,000 code executions
- Check your Firebase Realtime Database rules
- Ensure rules are set to allow read/write
- Check browser console for errors
- Verify Firebase credentials are correct
- Ensure you're using HTTPS in production
- Clear browser cache
- Check for JavaScript errors
- Ensure only one tab per session is open
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Video/audio calling integration
- Question bank system
- Automated testing/evaluation
- Multiple files support
- Whiteboard feature
- Recording & playback
- Analytics dashboard
While OpenCode is free, you could:
- Offer hosted version as SaaS ($49/month)
- Provide enterprise support & customization
- Build premium features (AI evaluation, etc.)
- White-label solution for companies
MIT License - feel free to use this for commercial projects!
- Firebase - Real-time database & hosting
- ACE Editor - Code editor
- Piston - Code execution engine
If this project helped you save money or land a great hire, please star it!
- Create an issue for bugs
- Start a discussion for features
- Follow me @humancto
Built with β€οΈ to democratize technical interviews
Saved your company $599/month? Consider buying me a coffee β