Welcome to the BDPA Hackathon project! This guide will help you get started contributing to the codebase.
- Project Overview
- Prerequisites
- Quick Start
- Project Structure
- Environment Setup
- Running the Application
- Development Workflow
- Contributing Guidelines
- Troubleshooting
- Additional Resources
This is a career development platform that helps users:
- Analyze resumes and extract skills automatically
- Track target positions and identify skill gaps
- Get personalized learning recommendations from edX
- Connect LinkedIn profiles for enhanced profile data
- Visualize skill trees and career progression paths
Backend:
- FastAPI (Python) - REST API server
- Firebase Admin SDK - Backend database operations
- Google Gemini API - AI-powered skill extraction
- Vosk - Offline speech recognition
- FFmpeg - Audio processing
Frontend:
- Next.js 16 - React framework
- TypeScript - Type safety
- Firebase Client SDK - Authentication & Firestore
- Tailwind CSS - Styling
- React Flow - Skill tree visualization
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- Python (v3.8 or higher) - Download
- Git - Download
- FFmpeg - Required for audio processing
- macOS:
brew install ffmpeg - Linux:
sudo apt-get install ffmpegorsudo yum install ffmpeg - Windows: Download from FFmpeg.org
- macOS:
- VS Code or your preferred IDE
- Postman or curl for API testing
- Firebase CLI (optional) -
npm install -g firebase-tools
git clone <repository-url>
cd BDPA-Hackathon# Navigate to backend directory
cd backend
# Create a virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# macOS/Linux:
source venv/bin/activate
# Windows:
# venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Download Vosk model (if not already present)
# The model will be downloaded automatically on first use, or run:
bash download_vosk_model.sh# Navigate to frontend directory (from project root)
cd frontend
# Install dependencies
npm installSee the Environment Setup section below for detailed instructions.
Quick setup:
- Backend: Create
backend/.envwith required variables - Frontend: Create
frontend/.env.localwith Firebase config
BDPA-Hackathon/
├── backend/ # FastAPI backend server
│ ├── main.py # Main API application
│ ├── resume_analyzer.py # Resume text extraction
│ ├── requirements.txt # Python dependencies
│ ├── recordings/ # Audio recordings storage
│ ├── resumes/ # Uploaded resumes storage
│ └── vosk-model/ # Speech recognition model
│
├── frontend/ # Next.js frontend application
│ ├── app/ # Next.js app directory
│ │ ├── api/ # API routes
│ │ ├── dashboard/ # Dashboard page
│ │ ├── skills-setup/ # Skills setup page
│ │ └── ...
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ ├── lib/ # Utility functions
│ └── package.json # Node dependencies
│
├── firestore.rules # Firestore security rules
└── README.md # This file
Create a backend/.env file with the following variables:
# Gemini API (for skill extraction)
GEMINI_API_KEY=your-gemini-api-key-here
# Firebase Admin SDK (for backend database operations)
FIREBASE_CREDENTIALS={"type":"service_account","project_id":"...","private_key":"...","client_email":"..."}
# LinkedIn OAuth (optional)
LINKEDIN_CLIENT_ID=your-linkedin-client-id
LINKEDIN_CLIENT_SECRET=your-linkedin-client-secret
LINKEDIN_REDIRECT_URI=http://localhost:8000/api/linkedin/callbackGetting API Keys:
-
Gemini API Key:
- Visit Google AI Studio
- Sign in and create an API key
- Copy the key to
GEMINI_API_KEY
-
Firebase Credentials:
- Go to Firebase Console
- Project Settings → Service Accounts
- Generate new private key
- Copy JSON content to
FIREBASE_CREDENTIALS(as a single-line JSON string)
-
LinkedIn OAuth (optional):
- See
LINKEDIN_OAUTH_SETUP.mdfor detailed instructions
- See
Note: See ENVIRONMENT_SETUP.md for more detailed instructions.
Create a frontend/.env.local file:
NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id
NEXT_PUBLIC_FIREBASE_APP_ID=your-app-idGetting Firebase Config:
- See
frontend/FIREBASE_SETUP.mdfor detailed instructions - Firebase Console → Project Settings → Your apps → Web app config
cd backend
# Activate virtual environment (if not already active)
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Run the server
python main.py
# OR
uvicorn main:app --reloadBackend will be available at: http://localhost:8000
- API Documentation:
http://localhost:8000/docs - Health Check:
http://localhost:8000/health
cd frontend
# Run development server
npm run devFrontend will be available at: http://localhost:3000
-
Backend Health Check:
curl http://localhost:8000/health
Should return:
{"status":"healthy"} -
Frontend:
- Open
http://localhost:3000in your browser - You should see the application homepage
- Open
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes:
- Follow existing code style
- Add comments for complex logic
- Update documentation if needed
-
Test your changes:
- Test backend endpoints using
/docsor Postman - Test frontend in browser
- Check for console errors
- Test backend endpoints using
-
Commit your changes:
git add . git commit -m "Description of your changes"
-
Push and create PR:
git push origin feature/your-feature-name
Then create a Pull Request on GitHub.
Python (Backend):
- Follow PEP 8 style guide
- Use type hints where possible
- Add docstrings for functions and classes
- Maximum line length: 100 characters
TypeScript/React (Frontend):
- Use TypeScript for type safety
- Follow React best practices
- Use functional components with hooks
- Prefer named exports over default exports
Backend API Testing:
- Use the interactive docs at
http://localhost:8000/docs - Or use curl/Postman to test endpoints
Frontend Testing:
- Test in browser with React DevTools
- Check browser console for errors
- Test on different screen sizes
- Check existing issues - See if your feature/bug is already reported
- Create an issue - For major changes, create an issue first
- Follow the code style - Match existing patterns
- Write clear commit messages - Use descriptive commit messages
- Update documentation - Update README if needed
- Add tests - If applicable, add tests for your changes
- Ensure builds pass - Make sure backend and frontend start without errors
- Request review - Request review from maintainers
- 🐛 Bug fixes - Fix reported issues
- ✨ New features - Add new functionality
- 📝 Documentation - Improve docs and comments
- 🎨 UI/UX improvements - Enhance user interface
- ⚡ Performance - Optimize code and queries
- 🧪 Testing - Add tests and improve coverage
Issue: Module not found
# Ensure virtual environment is activated
source venv/bin/activate # macOS/Linux
pip install -r requirements.txtIssue: FFmpeg not found
# macOS
brew install ffmpeg
# Linux
sudo apt-get install ffmpeg
# Verify installation
ffmpeg -versionIssue: Vosk model not found
- The model should download automatically
- Or run:
bash backend/download_vosk_model.sh - Or manually download from Vosk Models
Issue: Firebase Admin SDK error
- Verify
FIREBASE_CREDENTIALSis set correctly - Ensure JSON is properly formatted (single line)
- Check service account has Firestore permissions
Issue: Gemini API error
- Verify
GEMINI_API_KEYis set - Check API quota/limits
- System will fallback to manual extraction if Gemini fails
Issue: Firebase not initialized
- Check
.env.localexists infrontend/directory - Verify all
NEXT_PUBLIC_*variables are set - Restart dev server after changing
.env.local
Issue: Module not found
cd frontend
rm -rf node_modules package-lock.json
npm installIssue: Port already in use
# Kill process on port 3000 (frontend)
lsof -ti:3000 | xargs kill -9
# Kill process on port 8000 (backend)
lsof -ti:8000 | xargs kill -9Issue: CORS errors
- Ensure backend CORS is configured (already set to allow all origins in dev)
- Check backend is running on port 8000
- Verify frontend is calling correct backend URL
"Firebase is not initialized"
- Missing or incorrect environment variables
- Check browser console for specific missing variables
"Gemini API not configured"
- Backend will use fallback skill extraction
- Set
GEMINI_API_KEYfor AI-powered extraction
"ffmpeg not found"
- Install FFmpeg (see Prerequisites)
- Required for audio transcription feature
ENVIRONMENT_SETUP.md- Detailed environment variable setupbackend/FastAPI-README.md- Backend API documentationfrontend/FIREBASE_SETUP.md- Firebase configuration guideLINKEDIN_OAUTH_SETUP.md- LinkedIn OAuth setupFIRESTORE_RULES_SETUP.md- Firestore security rulesREADME.md(root) - Database navigation guide
- FastAPI Documentation
- Next.js Documentation
- Firebase Documentation
- Vosk Documentation
- Google Gemini API
Backend API (http://localhost:8000):
GET /- API infoGET /health- Health checkGET /docs- Interactive API documentationPOST /api/recordings- Upload audio recordingPOST /api/resumes- Upload resumePOST /api/skills/process- Extract skills from textPOST /api/skills- Save user skillsGET /api/skills/{user_id}- Get user skillsGET /api/linkedin/authorize- LinkedIn OAuth authorization
If you encounter issues:
- Check existing issues on GitHub
- Review documentation files in the repo
- Check browser console (frontend) or server logs (backend)
- Create an issue with:
- Description of the problem
- Steps to reproduce
- Error messages/logs
- Your environment (OS, Node/Python versions)
You should now be able to:
- ✅ Set up the development environment
- ✅ Run both backend and frontend servers
- ✅ Make changes and test them
- ✅ Contribute to the project
Happy coding! 🚀