Welcome to Zenith! This is a modern platform that includes a FastAPI backend, a PostgreSQL database (with pgvector), and a React+Vite frontend.
Zenith preview
git clone <repo-url>
cd zenithBackend Variables:
Create your development .env.dev file by copying the example provided in the backend/ directory.
cp backend/.env.example backend/.env.devMake sure to review and edit backend/.env.dev with your valid credentials (e.g., PostgreSQL configs, Google/Github client IDs, Firebase config, etc.).
Frontend Variables:
If you need environment variables for the frontend, make sure to set them up inside a .env file in the frontend/ directory.
# Create/Edit frontend/.env with your necessary variables (like VITE_API_URL or Firebase connection variables)We use Docker to orchestrate the backend and the database. The simplest way is to navigate into the docker directory before running the commands.
To build the images with your most recent updates and start the containers in the background, run:
cd docker
docker compose up -d --buildNote: The first time it may take a while as it downloads and builds everything. Once up, the backend is accessible at
http://localhost:8000and the Database atlocalhost:5432.
If you want to quickly restart the containers (for example, after changing an environment variable):
cd docker
docker compose restartTo restart only a specific service:
docker compose restart backend
# or
docker compose restart dbTo stop the services and completely remove all the containers and the default network:
cd docker
docker compose downIf you want to completely wipe out the containers including the persistent data volumes and images (e.g., a total clean reset):
docker compose down -v --rmi allThe frontend is a Vite + React application. It's meant to be executed locally via Node.
Make sure you have Node.js installed on your machine.
cd frontend
# Install project dependencies
npm install
# Start the Vite development server
npm run devThe frontend should now be running at http://localhost:5173.
You can run your backend tests directly inside the running Docker container (zenith_backend).
docker exec -it zenith_backend pytest app/ -vYou can target specific modules or files to reduce execution time during development:
# Run tests for a specific feature (e.g., auth)
docker exec -it zenith_backend pytest app/features/auth/tests/ -v
# Run tests for a specific file
docker exec -it zenith_backend pytest app/features/user/tests/test_user.py -vWe use Alembic for our database migrations inside the backend Docker container.
To ensure that all tables exist based on your most recent models (after your containers are up):
docker exec -it zenith_backend bash -c "cd /app && alembic upgrade head"When your SQLAlchemy models change, follow these steps to regenerate the tables mappings:
# 1. Generate an autogenerated migration script
docker exec -it zenith_backend bash -c "cd /app && alembic revision --autogenerate -m 'description_of_changes'"
# 2. Check the generated script in backend/alembic/versions/
# 3. Apply the migration correctly
docker exec -it zenith_backend bash -c "cd /app && alembic upgrade head"- API Docs (Swagger): http://localhost:8000/docs
- API Docs (ReDoc): http://localhost:8000/redoc



