<<<<<<< HEAD
Real-time collaborative coding interview platform built for hackathons.
- Node.js 18+
- PostgreSQL (via Supabase)
- Firebase Project (for GitHub OAuth)
- Daily.co Account (for video)
# Clone repository
git clone <your-repo-url>
cd codesync-interview
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm installServer (.env):
PORT=3001
DATABASE_URL="your_supabase_connection_string"
CLIENT_URL=http://localhost:5173
DAILY_API_KEY=your_daily_api_keyClient (.env):
VITE_API_URL=http://localhost:3001
VITE_FIREBASE_API_KEY=your_key
VITE_FIREBASE_AUTH_DOMAIN=your_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idcd server
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed # Seed sample problemsTerminal 1 - Server:
cd server
npm run devTerminal 2 - Client:
cd client
npm run devVisit: http://localhost:5173
/codesync-interview
โโโ /client # React Frontend
โ โโโ /src
โ โ โโโ /components # React components
โ โ โโโ /pages # Page components
โ โ โโโ /context # React Context providers
โ โ โโโ /lib # Utilities & configs
โ โโโ package.json
โ
โโโ /server # Node.js Backend
โ โโโ /routes # API routes
โ โโโ /prisma # Database schema
โ โโโ index.js # Server entry point
โ โโโ package.json
โ
โโโ README.md
โ
Real-time Code Editor - Monaco with live sync
โ
Collaborative Whiteboard - TLDraw integration
โ
Video Chat - Daily.co HD video/audio
โ
Live Chat - Socket.IO messaging
โ
Smart Timer - Interviewer-controlled countdown
โ
GitHub OAuth - Firebase authentication
โ
Problem Library - Pre-seeded coding challenges
cd client
npm run build
# Deploy to Vercel
vercel --prod- Connect GitHub repo
- Set build command:
cd server && npm install && npx prisma generate - Set start command:
node index.js - Add environment variables
Update CLIENT_URL and VITE_API_URL with deployed URLs.
- Frontend: React 18, Vite, Tailwind CSS
- Backend: Node.js, Express, Socket.IO
- Database: PostgreSQL (Supabase)
- Auth: Firebase (GitHub OAuth)
- Video: Daily.co
- Editor: Monaco Editor
- Whiteboard: TLDraw
npm run dev # Start dev server with nodemon
npm run prisma:studio # Open Prisma Studio
npm run seed # Seed databasenpm run dev # Start Vite dev server
npm run build # Production build
npm run preview # Preview production buildSocket.IO not connecting:
- Check
VITE_API_URLmatches server URL - Verify CORS settings in server
Firebase auth failing:
- Ensure GitHub OAuth is configured in Firebase Console
- Add authorized domains in Firebase
whereby video not working:
- Verify whereby API key
- Check browser permissions for camera/mic
- Ensure room URL is generated correctly
Database connection errors:
- Verify Supabase connection string
- Run
npx prisma generateafter schema changes - Check network access in Supabase settings
// POST /api/problems
{
"title": "Problem Title",
"description": "Problem description",
"difficulty": "EASY|MEDIUM|HARD",
"starterCode": "// Starter code template"
}Edit Timer.jsx:
const [timeLeft, setTimeLeft] = useState(45 * 60); // Change 45 to desired minutesTailwind CSS is configured. Edit tailwind.config.js for theme changes.
Setup (30 seconds):
- Sign in with GitHub
- Create new session "Senior Developer Interview"
- Select problem: "Reverse Linked List"
- Copy invite link
Demo Flow (2 minutes):
-
Code Editor Tab
- Show real-time typing sync
- Run code with output panel
- Switch languages
-
Whiteboard Tab
- Draw solution approach
- Show collaborative drawing
-
Video Tab
- Enable camera/mic
- Toggle audio/video controls
-
Chat & Timer
- Send messages
- Start/pause/reset timer
- Show 5-minute warning color change
Closing (30 seconds):
- Highlight key features
- Mention future improvements (code execution, session replay)
- Code execution via Piston API
- Session recording & playback
- Interview analytics dashboard
- AI-powered feedback
- Multi-language support
- Screen sharing
- Collaborative notes
- Calendar integration
MIT License - Built for hackathons and learning
Built by CodePilot Team for 24-hour hackathon challenge
For issues or questions:
- Open GitHub issue
- Check existing documentation
- Review environment variable setup
๏ปฟ# HTF25-Team-038
In this Readme, you will find a guide on how to fork this Repository, add files to it, and make a pull request to contribute your changes.
Go to github.com to log in.
- Open the current repo in a new tab.
- Perform all operations in the newly opened tab, and follow the current tab for instructions.
- In the newly opened tab, on the top-right corner, click on Fork.
- Enter the Repository Name as HTF25-Team-038.
- Then click Create Fork, leaving all other fields as default.
- After a few moments, you can view your forked repo.
- Click on Code and from the dropdown menu copy your web URL of your forked repository.
- Now open terminal on your local machine.
- Run this command to clone the repo:
git clone https://github.com/your-username/HTF25-Team-038.git- While doing it for the first time, create a new branch for your changes:
- Add your files or make modifications to existing files.
- Stage your changes:
- Commit your changes:
- Push your branch to your fork:
git checkout -b branch-namegit add .git commit -m "Descriptive commit message"git push origin branch-name- Click on the Contribute button in your fork and choose Open Pull Request.
- Leave all fields as default, then click Create Pull Request.
- Wait a few moments; your PR is now submitted.
upstream/main
