- Fork elmeg-demo codebase for multi-band support - Add data importer infrastructure with base class - Create band-specific importers: - phish.py: Phish.net API v5 - grateful_dead.py: Grateful Stats API - setlistfm.py: Dead & Company, Billy Strings (Setlist.fm) - Add spec-kit configuration for Gemini - Update README with supported bands and architecture
2.2 KiB
2.2 KiB
Elmeg Developer Guide
Tech Stack
- Backend: Python (FastAPI), SQLModel, Alembic, SQLite.
- Frontend: TypeScript (Next.js 15), Tailwind CSS 4, Shadcn UI.
- Containerization: Docker.
Getting Started
Prerequisites
- Python 3.10+
- Node.js 18+
- Docker (optional but recommended)
Backend Setup
-
Navigate to
backend/:cd backend -
Create virtual environment:
python -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Run Migrations:
alembic upgrade head -
Seed Data (Optional):
python seed.py -
Start Server:
uvicorn main:app --reloadAPI will be available at
http://localhost:8000. Swagger Docs athttp://localhost:8000/docs.
Frontend Setup
-
Navigate to
frontend/:cd frontend -
Install dependencies:
npm install -
Start Dev Server:
npm run devApp will be available at
http://localhost:3000.
Project Structure
Backend (/backend)
main.py: Entry point.models.py: Database models (SQLModel).routers/: API route handlers (split by feature).services/: Business logic (e.g., stats calculation).alembic/: Database migrations.
Frontend (/frontend)
app/: Next.js App Router pages.components/: Reusable UI components.ui/: Shadcn UI primitives.social/,shows/,profile/: Feature-specific components.
contexts/: React Contexts (e.g., Preferences).lib/: Utilities.
Key Workflows
Adding a New Model
- Define model in
backend/models.py. - Generate migration:
alembic revision --autogenerate -m "add model". - Apply migration:
alembic upgrade head. - Create CRUD router in
backend/routers/.
Adding a New Page
- Create folder in
frontend/app/(e.g.,my-feature). - Add
page.tsx. - Fetch data from API (use
fetchin Server Components oruseEffectin Client Components).
Testing
- Currently manual testing via Swagger UI and Frontend.
- Future: Add
pytestfor backend andjest/playwrightfor frontend.