# J621 Self-hosted media library and e621 archive manager, rebuilt as a **React SPA + Django REST API**. ## Structure ``` backend/ Django 6 + DRF API (SQLite in dev, MariaDB in production) frontend/ Vite + React + TypeScript SPA ``` ## Development ### Backend ```bash cd backend source venv/bin/activate python manage.py migrate python manage.py scan_files # index the watched folder python manage.py runserver ``` Copy `.env.example` to `.env` and set `WATCHED_FOLDER` before scanning. ### Frontend ```bash cd frontend npm install npm run dev # http://localhost:5173, proxies /api to :8000 ``` ### Production Not wired up yet — planned: Nginx serving the SPA build, `/media` and `/library` media directly, and proxying `/api` to Waitress/Django. See `frontend/` design docs for the UI specification.