Real-time Toronto Transit Commission service alerts progressive web app.
Live URLs:
| Document | Purpose |
|---|---|
| APP_IMPLEMENTATION.md | Start Here - File inventory, status, architecture |
| SIMPLIFIED_ALERT_SYSTEM.md | v235+ alert-based architecture, is_active logic |
| ETA_SYSTEM.md | Real-time ETA: NTAS API, NextBus, Line 5/6 fallback |
| DATA_POLLING_FREQUENCIES.md | Data refresh rates, cron jobs, API sources |
| IMPLEMENTATION_PLAN.md | Feature roadmap & phase progress |
| DESIGN_SYSTEM.md | UI design tokens, colors, typography |
| alert-categorization-and-threading.md | Edge Function logic, data flow |
| CODEBASE_ACTION_PLAN.md | Code optimization (completed) |
| SECURITY_AUDIT.md | Security review findings |
| Document | Purpose |
|---|---|
| TTC-ROUTE-CONFLICTS.md | Route number conflicts (39/939, etc.) |
| TTC-BUS-ROUTES.md | Bus route reference |
| TTC-STREETCAR-ROUTES.md | Streetcar route reference |
| ROUTE_BADGE_STYLES.md | Route badge color system |
| Layer | Technology |
|---|---|
| Frontend | Svelte 5 + TypeScript + Tailwind CSS + shadcn-svelte |
| Typography | Lexend (dyslexic-friendly) |
| Backend | Supabase (PostgreSQL + Edge Functions + Realtime) |
| Hosting | Cloudflare Pages |
| Data Sources | TTC Live Alerts API, TTC GTFS |
# Clone repository
git clone https://github.com/shabanmohd/ttc-alerts-svelte.git
cd ttc-alerts-svelte
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your Supabase credentials
# Start dev server
npm run dev
# With translation file watching
npm run dev:watch
# Type checking
npm run check
# Production build
npm run build
# Preview production build
npm run preview
src/
āāā lib/
ā āāā components/ # UI components
ā ā āāā alerts/ # Alert display components
ā ā āāā dialogs/ # Modal dialogs
ā ā āāā eta/ # ETA feature components
ā ā āāā layout/ # Header, nav, sidebar
ā ā āāā stops/ # Stop search & bookmarks
ā ā āāā ui/ # shadcn-svelte base components
ā āāā data/ # Static data (routes, stops)
ā āāā i18n/ # Internationalization (en/fr)
ā āāā services/ # API clients, storage
ā āāā stores/ # Svelte stores
ā āāā types/ # TypeScript types
ā āāā utils/ # Utility functions
āāā routes/ # SvelteKit pages
āāā app.html # HTML template
supabase/
āāā functions/ # Edge Functions
ā āāā poll-alerts/ # Alert polling & threading
ā āāā get-eta/ # ETA predictions
ā āāā scrape-maintenance/ # Maintenance scraping
ā āāā submit-feedback/ # Feedback form handler
āāā migrations/ # Database migrations
static/
āāā data/ # GTFS data files
āāā icons/ # PWA icons
āāā manifest.json # PWA manifest
# Required
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=xxx
# Optional (for DeepL translations)
DEEPL_API_KEY=xxx
MIT