Skip to content

Martinhdeez/zenith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

193 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zenith Project

Welcome to Zenith! This is a modern platform that includes a FastAPI backend, a PostgreSQL database (with pgvector), and a React+Vite frontend.

FastAPI PostgreSQL React Vite Docker GitHub Git Linux Python JavaScript HTML CSS Alembic Pytest


Zenith preview

Zenith Zenith Zenith Zenith


🚀 Setup & Configuration

1. Clone the repository

git clone <repo-url>
cd zenith

2. Configure environment variables

Backend Variables: Create your development .env.dev file by copying the example provided in the backend/ directory.

cp backend/.env.example backend/.env.dev

Make 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)

� Docker Containers Management (Backend & DB)

We use Docker to orchestrate the backend and the database. The simplest way is to navigate into the docker directory before running the commands.

Start the containers

To build the images with your most recent updates and start the containers in the background, run:

cd docker
docker compose up -d --build

Note: The first time it may take a while as it downloads and builds everything. Once up, the backend is accessible at http://localhost:8000 and the Database at localhost:5432.

Restart the containers

If you want to quickly restart the containers (for example, after changing an environment variable):

cd docker
docker compose restart

To restart only a specific service:

docker compose restart backend
# or
docker compose restart db

Remove the containers (Stop and Delete)

To stop the services and completely remove all the containers and the default network:

cd docker
docker compose down

If 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 all

🌐 Deploy Frontend

The frontend is a Vite + React application. It's meant to be executed locally via Node.

Prerequisites

Make sure you have Node.js installed on your machine.

Start the local development server

cd frontend

# Install project dependencies
npm install

# Start the Vite development server
npm run dev

The frontend should now be running at http://localhost:5173.


🧪 Testing the Backend

You can run your backend tests directly inside the running Docker container (zenith_backend).

Run all tests

docker exec -it zenith_backend pytest app/ -v

Run specific tests

You 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 -v

Database Migrations (Backend)

We use Alembic for our database migrations inside the backend Docker container.

Apply Migrations

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"

Creating New Migrations

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"

📚 Documentation

About

HackUDC 2026 Winner (KELEA Challenge) — Fullstack platform with FastAPI, PostgreSQL (pgvector), React + Vite, and Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors