This repository contains the Pawthos system: a FastAPI backend with a React (TypeScript + Tailwind) frontend for pet, medical, vaccination, appointments, reports/alerts, and administrative record management.
Pawthos/
backend/ # FastAPI app, SQLAlchemy models, Alembic migrations
core/ # auth, config, database, models, schemas
routers/ # feature routers (auth, users, pets, medical, etc.)
alembic/ # migrations and config
main.py # FastAPI app entrypoint (run with uvicorn)
frontend/ # React app (CRA + TypeScript + Tailwind)
public/ # static assets, redirects (SPA routing)
src/ # UI, hooks, services, router
documentation/ # this guide and feature docs
Pawthos folder is the repository root on GitHub. Access it at: https://github.com/<your-username-or-org>/Pawthos (replace with your actual GitHub path).cd backend
pip install -r requirements.txt
env.example to .env (in backend/)DATABASE_URL: Your PostgreSQL connection stringSECRET_KEY: A secure random string for JWT tokensSMTP_USER: Your Gmail address (for sending OTP)SMTP_PASS: Your Gmail App Password (not your Gmail login password)backend/):
alembic upgrade head
uvicorn main:app --reload --port 8000
cd ../frontend
npm install
npm start
Backend: http://localhost:8000
Frontend: http://localhost:3000
Authorization: Bearer <token>core/models.py – SQLAlchemy modelscore/schemas.py – Pydantic schemascore/database.py – engine/sessioncore/auth.py – hashing and helpersrouters/* – feature endpoints (auth, users, pets, medical, vaccination, appointments, reports/alerts, animal control, shipping permits, meat inspection)From backend/:
alembic revision -m "<message>" # generate new migration after model changes
alembic upgrade head # apply
alembic downgrade -1 # rollback last
cd frontend
npm run build
Serve frontend/build/ with a static host and enable SPA fallback to index.html for unknown routes. See documentation/frontend-README.md for examples (Netlify, Vercel, Nginx, Apache).
backend/venv/, frontend/build/http://localhost:3000 by defaultcore/models.py# Backend
cd backend
pip install -r requirements.txt
alembic upgrade head
uvicorn main:app --reload --port 8000
# Frontend
cd ../frontend
npm install
npm start