89b24d4c34
- Add tsconfig.json (server) + client/tsconfig.{json,app.json,node.json}
so typecheck and tsc -b actually work.
- Fix npm test to run Playwright (was running vitest on Playwright specs);
typecheck now covers both server and client.
- Mount routes before app.listen, add error handler, mount optional
@tonycodes/auth-express middleware when AUTH_SECRET is set.
- Add /api/trips (GET/POST/PATCH/DELETE) backed by an in-memory store
that gracefully degrades when DATABASE_URL is unset.
- Add prisma/seed.ts skeleton and server/types/express.d.ts for req.auth.
- Rewrite Grok prompt for combo-aware planning: charge+eat,
stay+destination-charging, eat+viewpoint, etc., with amenities,
cuisine, priceLevel, duration, day titles and trip highlights.
- Extend Stop schema + normalization to preserve all enrichment fields.
- New StopCard component renders combo pill, description, meta row
(charge / stop / battery / cuisine / £-level) and amenity icons;
map popups show the same enriched detail; timeline gains day titles
and a HIGHLIGHTS sidebar.
- Fix server TS errors (vehicle accepted as string | {name,rangeKm},
JSON parse results typed).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
41 lines
1.5 KiB
Bash
41 lines
1.5 KiB
Bash
# Tesla Roadtrip - Environment Configuration
|
|
# Copy this file to .env and fill in the values
|
|
|
|
# === xAI API Key (used for production deploys and when FORCE_XAI_API=true) ===
|
|
# Get one at https://console.x.ai
|
|
# This is NOT needed for normal local development (we prefer your personal Grok CLI)
|
|
XAI_API_KEY=xai-YourKeyHere
|
|
|
|
# === App configuration ===
|
|
APP_URL=http://localhost:5173
|
|
API_URL=http://localhost:3000
|
|
|
|
# === Auth service (from auth.tony.codes) ===
|
|
# Only needed if testing authenticated user features locally
|
|
# AUTH_SECRET=your-auth-secret-here
|
|
# AUTH_URL=https://auth.tony.codes
|
|
|
|
# =====================================================================
|
|
# Grok Provider Control (NEW)
|
|
# =====================================================================
|
|
#
|
|
# By default on your machine we prefer the LOCAL PERSONAL GROK CLI
|
|
# (~/.grok/bin/grok) authenticated with YOUR account (Heavy).
|
|
# This is free, uses web_search + high effort, and gives the best
|
|
# development experience.
|
|
#
|
|
# The XAI_API_KEY above is mainly for the deployed site on Dokku.
|
|
#
|
|
# FORCE_XAI_API=true
|
|
# → Ignore the local CLI completely and use the xAI API.
|
|
# → Useful when you want to test the exact production code path locally.
|
|
# Example: FORCE_XAI_API=true ./scripts/dev.sh
|
|
#
|
|
# GROK_BIN=/custom/path/to/grok
|
|
# → Override the location of the local grok binary (rarely needed).
|
|
#
|
|
# GROK_ENABLED=false
|
|
# → Completely disable the local CLI (forces xAI API or dumb fallback).
|
|
#
|
|
# =====================================================================
|