Skip to content

Commit 19be94f

Browse files
committed
u
1 parent 5648132 commit 19be94f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ npm run preview
4848
### Key Technical Components
4949

5050
**511.org API Integration** - Two-tier architecture:
51+
5152
- **Server-side** (`src/pages/api/511.ts`):
5253
- Vercel serverless API route with `prerender: false`
5354
- 9 API keys with automatic rotation and rate limit handling
@@ -61,23 +62,27 @@ npm run preview
6162
- Endpoints used: `gtfsoperators`, `VehicleMonitoring`
6263

6364
**Map System** (Leaflet-based):
65+
6466
- **Leaflet** Maps integration (v1.9.4) with routing plugin
6567
- CDN-loaded scripts in Layout.astro (unpkg.com)
6668
- Real-time vehicle tracking with markers and popups
6769
- Custom color coding per agency and route (SF Muni has special line colors)
6870
- Leaflet Routing Machine for directions functionality
6971

7072
**Transit Fare Data** (`public/data/price.json`):
73+
7174
- Structured by agency ID with route-specific or zone-based pricing
7275
- Format: `{agency: {id, name, routes: {route: price} OR zones: {zone: price}}}`
7376

7477
**Script Loading Pattern** (`src/layouts/Layout.astro`):
78+
7579
- **Main scripts** auto-loaded on every page: `cookies`, `index`, `authentication`, `511Request`, `notificationManager`, `settings`
7680
- Loaded as `.astro` components from `src/scripts/` (not `public/scripts/`)
7781
- All scripts use `is:inline` attribute to prevent Astro processing
7882
- Page-specific scripts via `scripts` prop: `[{name: 'tracker', location: 'head'|undefined}]`
7983

8084
**Settings System** (`public/scripts/settings.js`):
85+
8186
- LocalStorage-based with key `'settings'`
8287
- Current features: theme switching (system/light/dark)
8388
- Pattern: `setSetting(name, value, type, key)` + `applySettings()`
@@ -132,5 +137,6 @@ npm run preview
132137
- **prettier-plugin-astro** ^0.12.0 - Code formatting
133138

134139
External APIs:
140+
135141
- 511.org Transit API (Bay Area transit data)
136142
- Bing Maps API (mapping and directions)

0 commit comments

Comments
 (0)