An invite-only, high-trust rental community platform connecting property hosts with vetted renters. Access is gated by an invite-code system: existing users generate invite codes, and new users must present a valid code to register.
- Backend: Python 3.12 / FastAPI / SQLAlchemy / PostgreSQL
- Frontend: React 18 (Create React App)
- Auth: JWT (HS256) via
python-jose, passwords hashed withpasslib/bcrypt
docker compose upThis starts three services:
| Service | Port |
|---|---|
| PostgreSQL | 5434 |
| Backend | 8001 |
| Frontend | 3000 |
- Python 3.12+
- A running PostgreSQL instance (you can start just the database from Docker with
docker compose up db)
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtSet the required environment variables, or create a backend/.env file (python-dotenv loads it automatically):
export DATABASE_URL="postgresql://vouched_user:vouched_pass@localhost:5434/vouched_db"
export SECRET_KEY="some-dev-secret"
export UPLOAD_DIR="./uploads"Note: When connecting to the Dockerised PostgreSQL from the host, use
localhost:5434. Inside Docker the backend connects todb:5432instead.
uvicorn app.main:app --host 0.0.0.0 --port 8001 --reloadOn first run the backend auto-creates all database tables via Base.metadata.create_all().
curl http://localhost:8001/api/health
# {"status":"ok"}The interactive API docs are available at http://localhost:8001/docs.
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql://vouched_user:vouched_pass@db:5432/vouched_db |
PostgreSQL connection string (host port: 5434) |
SECRET_KEY |
change-me-in-production |
JWT signing key |
UPLOAD_DIR |
/app/uploads |
Directory for uploaded property photos |
ALLOWED_ORIGINS |
http://localhost:3000 |
Comma-separated list of allowed CORS origins |
All routes are prefixed with /api.
| Prefix | Description |
|---|---|
/api/auth |
Login (OAuth2 password flow), JWT tokens |
/api/users |
User profile management |
/api |
Invite code generation, validation, signup |
/api/properties |
Property CRUD, photo uploads, whitelist mgmt |
/api |
Meeting requests (create, list, accept) |
/api/bookings |
Booking requests |
/api/network |
List vouched users in the network |
/api/health |
Health check |
Uploaded photos are served at /static/uploads/<filename>.