A calendar view for Riftbound TCG events.
# Install dependencies
npm install
# Start dev servers (SQLite mode, no geocoding)
./dev.sh
# Or with PostgreSQL + Photon geocoder
./dev.sh --docker --photonFrontend: http://localhost:5173
riftfound/
├── backend/ # Express.js API (port 3001)
├── frontend/ # React + Vite calendar UI (port 5173)
├── scraper/ # Event scraper (distributed across 60min cycles)
├── infrastructure/ # Docker, Photon, Terraform AWS deployment
├── dev.sh # Development script
└── deploy.sh # Production deployment script
| Flag | Description |
|---|---|
| (none) | SQLite mode, no Docker, no geocoding |
--docker |
Start PostgreSQL via docker-compose |
--postgres |
Use PostgreSQL for app (implies --docker) |
--photon |
Start Photon geocoder (first run downloads ~8GB) |
--keep-docker |
Keep Docker services running on exit |
--reset |
Delete all data (DB + Docker volumes) |
--reset-db |
Delete DB only (preserve Photon data) |
npm run dev:backend # Start backend only
npm run dev:frontend # Start frontend only
npm run dev:scraper # Run scraper once
npm test # Run all tests (Vitest)| Endpoint | Description |
|---|---|
GET /api/events |
List events with filtering |
GET /api/events/:id |
Single event |
GET /api/events/info |
Scrape stats |
GET /api/events/geocode?q= |
Geocode location |
page,limit- Paginationsearch- Text searchcity,state,country- Location filterseventType- Event type filter (Summoner Skirmish, Nexus Night)lat,lng,radiusKm- Distance filteringcalendarMode=true- Return all events in 3-month range
- Database: SQLite for dev, DynamoDB for production. Controlled by
DB_TYPEenv var. - Geocoding: Mapbox API (primary) with self-hosted Photon (OSM-based) as fallback for dev.
- Shops table: Geocoded store locations, events reference via
shop_id - Scraper: Runs every 60min cycle, fetches all ~30k events with requests distributed evenly across the cycle to avoid rate limiting
Production runs on AWS serverless with Terraform:
- Frontend: S3 + CloudFront (HTTPS)
- Backend API: Lambda + API Gateway (via CloudFront)
- Scraper: Lambda + EventBridge (hourly)
- Database: DynamoDB
# First time setup
cp deploy.env.example deploy.env
# Edit deploy.env with your AWS values
# Deploy
./deploy.sh frontend # React app to S3/CloudFront
./deploy.sh backend-lambda # Backend API to Lambda
./deploy.sh scraper-lambda # Scraper to Lambda
./deploy.sh lambdas # Both backend and scraper to LambdaSee CLAUDE.md for detailed deployment and infrastructure docs.
Apache License 2.0 - see LICENSE