Skip to content

Israel-Jauregui/Vouched

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vouched

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.

Tech Stack

  • Backend: Python 3.12 / FastAPI / SQLAlchemy / PostgreSQL
  • Frontend: React 18 (Create React App)
  • Auth: JWT (HS256) via python-jose, passwords hashed with passlib/bcrypt

Getting Started (Docker)

docker compose up

This starts three services:

Service Port
PostgreSQL 5434
Backend 8001
Frontend 3000

Running the Backend Manually

Prerequisites

  • Python 3.12+
  • A running PostgreSQL instance (you can start just the database from Docker with docker compose up db)

Install dependencies

cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Configure environment

Set 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 to db:5432 instead.

Start the dev server

uvicorn app.main:app --host 0.0.0.0 --port 8001 --reload

On first run the backend auto-creates all database tables via Base.metadata.create_all().

Verify it's running

curl http://localhost:8001/api/health
# {"status":"ok"}

The interactive API docs are available at http://localhost:8001/docs.

Environment Variables

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

API Routes

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>.

About

GT SproutGT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors