Complete setup instructions for somm.dev development and deployment.
- Python 3.12+
- Node.js 20+
- MongoDB (local or Atlas)
- GitHub account with CLI access
git clone https://github.com/Two-Weeks-Team/somm.dev.git
cd somm.devcd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtcp .env.example .env
# Edit .env with your actual valuesRequired variables:
MONGODB_URI: MongoDB connection stringVERTEX_API_KEY: Vertex AI Express API keyGITHUB_TOKEN: Generate at https://github.com/settings/tokens (needsreposcope)
uvicorn main:app --reload --port 8000Backend will be available at: http://localhost:8000
cd frontend
npm installcp .env.example .env.local
# Default values should work for local developmentnpm run devFrontend will be available at: http://localhost:3000
Set these secrets in your GitHub repository (Settings → Secrets → Actions):
| Secret | Description | How to Get |
|---|---|---|
VERTEX_API_KEY |
Vertex AI Express API key | Google Cloud Console |
GITHUB_TOKEN |
GitHub PAT | https://github.com/settings/tokens |
FLY_API_TOKEN |
Fly.io token | flyctl auth token |
VERCEL_TOKEN |
Vercel token | https://vercel.com/account/tokens |
Set via CLI:
gh secret set VERTEX_API_KEY
gh secret set GITHUB_TOKEN# macOS with Homebrew
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community
# Default URI
MONGODB_URI=mongodb://localhost:27017/somm_db- Create account at https://www.mongodb.com/cloud/atlas
- Create a new cluster
- Add your IP to the whitelist
- Create a database user
- Get connection string
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/somm_db- Go to Google Cloud Console
- Enable Vertex AI API
- Create API key for Vertex AI Express
- Copy to
backend/.envasVERTEX_API_KEY
- Go to https://github.com/settings/tokens
- Generate new token (classic)
- Select scopes:
repo(full control of private repositories) - Copy to
backend/.env
- Start MongoDB:
brew services start mongodb-community(if using local) - Start backend:
cd backend && source venv/bin/activate && uvicorn main:app --reload - Start frontend:
cd frontend && npm run dev - Open http://localhost:3000
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm testcd backend
flyctl deploycd frontend
vercel --prodOr push to main branch for automatic deployment via GitHub Actions.
# Kill process on port 8000
lsof -ti:8000 | xargs kill -9
# Kill process on port 3000
lsof -ti:3000 | xargs kill -9# Check MongoDB status
brew services list | grep mongodb
# Restart MongoDB
brew services restart mongodb-community# Reinstall backend dependencies
rm -rf venv
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Reinstall frontend dependencies
rm -rf node_modules package-lock.json
npm installFor issues or questions:
- Check existing issues: https://github.com/Two-Weeks-Team/somm.dev/issues
- Create new issue with detailed description