d04730edd820c5452f87d2c1b8cfcde16d947ad6
NautilusDesk Backend (FastAPI Starter)
FastAPI starter with PostgreSQL, JWT auth, and a clean project structure.
Quickstart
- Create a virtualenv and install deps:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Create your
.envfile:
cp .env.example .env
-
Start Postgres (example docker-compose below), or point to your own DB in
.env. -
Run the API:
uvicorn app.main:app --reload
Docker Postgres (optional)
version: "3.9"
services:
db:
image: postgres:16
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nautilusdesk
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
Auth flow
POST /api/v1/auth/registerwith JSON{ "email": "user@example.com", "password": "secret" }POST /api/v1/auth/loginwith form fieldsusername(email) +password- Use
Authorization: Bearer <token>for protected routes
Endpoints
GET /api/v1/healthPOST /api/v1/auth/registerPOST /api/v1/auth/loginGET /api/v1/users/me
Description
Languages
Python
100%