Phase 7: MIT license, portfolio README, Docker, cross-platform start
- LICENSE: MIT - README: rewritten as portfolio-grade docs (features with code pointers, architecture, Docker/Windows/macOS quick starts, BYO-model table) - Dockerfile (3-stage: SPA build, pip wheels, slim runtime) + compose with a /data volume; .dockerignore keeps secrets and local data out - database.py: AIDND_DB_PATH env override so deployments can relocate the SQLite file; documented in backend/.env.example - start.sh: macOS/Linux dev script with first-run setup Verified locally: production SPA build served by the backend (deep links OK), DB created at the override path. Docker image itself untested here (Docker not installed); flagged in plan/07. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFsGHju9szibJJa2YJcdbg
This commit is contained in:
co-authored by
Claude Fable 5
parent
466d7bc0e4
commit
22630c8411
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# macOS/Linux equivalent of start.ps1: backend (FastAPI, :8000) and frontend
|
||||
# dev server (Vite, :5173). Ctrl-C stops both.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ ! -d backend/.venv ]; then
|
||||
echo "First-time setup: creating backend/.venv and installing dependencies..."
|
||||
python3 -m venv backend/.venv
|
||||
backend/.venv/bin/pip install -r backend/requirements.txt
|
||||
fi
|
||||
if [ ! -d frontend/node_modules ]; then
|
||||
echo "First-time setup: npm install..."
|
||||
(cd frontend && npm install)
|
||||
fi
|
||||
|
||||
(cd backend && .venv/bin/uvicorn app.main:app --port 8000 --reload) &
|
||||
BACKEND_PID=$!
|
||||
trap 'kill "$BACKEND_PID" 2>/dev/null' EXIT
|
||||
|
||||
echo "Backend: http://localhost:8000 (API docs: http://localhost:8000/docs)"
|
||||
echo "Frontend: http://localhost:5173"
|
||||
cd frontend && npm run dev
|
||||
Reference in New Issue
Block a user