Roommate matching platform for college students. Find your perfect living situation through AI-powered compatibility matching.
- FastAPI - Modern Python web framework
- SQLAlchemy - Database ORM
- PostgreSQL - Database (via Supabase)
- Firebase Auth - User authentication
- Alembic - Database migrations
-
Clone the repo
git clone <repo-url> cd meteormate_backend
-
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Install pre-commit hooks
pre-commit install
-
Environment setup
cp .env.example .env # Fill in your actual values -
Database setup
alembic upgrade head
Create a .env file with:
DATABASE_URL=postgresql://user:password@localhost/meteormate
SECRET_KEY=your-super-secret-key-here
FIREBASE_CREDENTIALS_PATH=path/to/firebase-key.json
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
DEBUG=trueRun the server:
uvicorn app.main:app --reloadFormatting:
- Code is auto-formatted on commit using YAPF
- Manual format:
yapf --in-place --recursive .
Database migrations:
# Create new migration
alembic revision --autogenerate -m "description"
# Apply migrations
alembic upgrade headPOST /api/auth/register- Register new userGET /api/auth/me- Get current user
POST /api/survey/- Create roommate preference surveyGET /api/survey/me- Get user's surveyPUT /api/survey/- Update survey
GET /api/matches/potential- Get potential roommate matchesPOST /api/matches/like/{user_id}- Like a potential matchPOST /api/matches/pass/{user_id}- Pass on a matchGET /api/matches/mutual- Get mutual matches
app/
├── api/ # Route handlers
├── models/ # Database models
├── schemas/ # Pydantic schemas
├── services/ # Business logic
├── utils/ # Utility functions
└── main.py # FastAPI app
- Create feature branch
- Make changes
- Pre-commit hooks will format code
- Submit PR
The matching algorithm considers budget overlap, lifestyle compatibility, and shared interests to find the best roommate fits. This will be re-done by the AI dev(s), this is just an interim solution.