-
Copy the environment template and configure:
cp backend/.env.example backend/.env # Edit backend/.env and fill in your values -
Build and run all services:
docker compose up --build
-
Access the services:
- Backend API: http://localhost:8000
- Frontend: http://localhost:5173
- API Documentation: http://localhost:8000/docs
The backend and frontend run on a shared internal network (ghostid-net) and expose the specified ports to your host machine.
- Push this repo to GitHub (
gostid) - Railway → New Project → Deploy from GitHub
- Root directory:
backend/ - Start command:
uvicorn main:app --host 0.0.0.0 --port $PORT - Environment variables from
backend/.env.example - After Kaggle training, ensure
backend/ml/ghostid_encoder.onnxis committed or uploaded
- Import repo on Vercel
- Root directory:
frontend/ - Build:
npm run build· Output:dist/ - Env:
VITE_API_URL=https://your-backend.up.railway.app
# Terminal 1 — API
cd backend && pip install -r requirements.txt && python main.py
# Terminal 2 — UI
cd frontend && npm install && npm run dev- Run
ml/notebooks/ghostid_v3_training.ipynbon Kaggle - Copy
ghostid_encoder.onnx+scaler_params.json→backend/ml/ - Copy analysis PNGs →
ml/analysis/ - Re-run CI — ONNX validation job should pass