Your frontend and backend are now fully integrated and working!
- ✅ Backend (Node.js + Express) running on port 5000
- ✅ Frontend (React + Vite) running on port 3000
- ✅ API Integration - Frontend successfully communicates with backend
- ✅ Services - Both running via supervisor with auto-restart
- ✅ CORS - Properly configured for cross-origin requests
To enable full functionality, add your API keys to /app/backend/.env:
# Open the .env file
nano /app/backend/.env
# Update this line with your token:
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_actual_token_hereGet your GitHub token:
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Select scopes:
repo,read:user - Copy the token and paste it in
.env
Add either OpenAI or Anthropic key:
# For OpenAI
OPENAI_API_KEY=sk-your_openai_key_here
# OR for Anthropic
ANTHROPIC_API_KEY=sk-ant-your_anthropic_key_hereGITHUB_CLIENT_ID=your_github_oauth_client_id
GITHUB_CLIENT_SECRET=your_github_oauth_client_secretGet OAuth credentials:
- Go to https://github.com/settings/developers
- Click "New OAuth App"
- Set callback URL:
http://localhost:5000/api/auth/github/callback - Copy Client ID and Secret
After adding your keys, restart the backend:
supervisorctl restart backendcurl http://localhost:5000/api/healthcurl "http://localhost:5000/api/repos?username=YOUR_GITHUB_USERNAME"Open your browser to: http://localhost:3000
Backend API (http://localhost:5000/api)
GET /health- Health checkGET /repos?username={user}- Get user repositoriesGET /repos/:owner/:repo- Get specific repo detailsGET /repos/:owner/:repo/structure- Get repo file structurePOST /analyze- Analyze a repositoryGET /analyze/:owner/:repo- Get analysis for a repoGET /pr/:owner/:repo- Get pull requestsGET /suggestions/:owner/:repo- Get AI suggestions
/- Home page/dashboard- User dashboard (lists repos)/repo/:id- Repository details/analysis/:id- Analysis results
# Check status
supervisorctl status
# Restart services
supervisorctl restart backend
supervisorctl restart frontend
supervisorctl restart all
# View logs
tail -f /var/log/supervisor/backend.out.log
tail -f /var/log/supervisor/frontend.out.log- Check if backend is running:
supervisorctl status backend - Check backend logs:
tail -n 50 /var/log/supervisor/backend.err.log - Verify .env file exists:
ls -la /app/backend/.env
- Verify your token in
/app/backend/.env - Check rate limits: https://api.github.com/rate_limit
- Ensure token has correct scopes
# Check what's using ports
lsof -i :5000
lsof -i :3000- Add your GitHub token to start analyzing repos
- Add AI keys to enable intelligent suggestions
- Test the dashboard at http://localhost:3000/dashboard
- Customize the frontend or backend as needed
- Backend:
/app/backend/ - Frontend:
/app/frontend/ - Backend .env:
/app/backend/.env - Frontend .env:
/app/frontend/.env - Supervisor config:
/etc/supervisor/conf.d/reposensei.conf
Your website is ready! Just add your API keys and you're good to go! 🚀