PostOffice is a full-stack web application designed for storing and managing file metadata and contents securely. It features a React (Vite) frontend and a Python (FastAPI) backend. The backend manages file storage locally and stores metadata in a database (default SQLite, but supports PostgreSQL), leveraging Supabase Auth for user authentication.
- Frontend: React, Vite, TailwindCSS
- Backend: Python, FastAPI, SQLModel (SQLite/PostgreSQL)
- Authentication: Supabase Auth (JWT via JWKS)
- Infrastructure: Docker, NGINX
The easiest way to run the entire application is via Docker and Docker Compose. This starts up the frontend, the API backend, and an NGINX reverse proxy.
-
Create a
.envfile in thebackend/directory following the instructions inbackend/README.mdto configure your Supabase instance. -
Build and start the containers from the root directory:
docker-compose up --build
-
Access the application:
- Frontend UI: http://localhost
- Backend API: http://localhost/api/
frontend/- React application. Includes proxy setup to map/apito the backend.backend/- FastAPI service usinguvfor dependency management. Seebackend/README.mdfor detailed Supabase configuration, DB setup, and endpoints.nginx/- NGINX configuration for routing HTTP traffic correctly between the frontend container and the backend API container.
If you prefer to run services individually outside of Docker:
Backend:
cd backend
uv sync
uv run fastapi dev app/main.pyFrontend:
cd frontend
npm install
npm run dev