Look West is a full-stack app that sends a double-opt-in email alert when the sunset near you is likely worth seeing, paired with a curated quote.
Live site: https://golookwest.com
- React signup flow with Google Places autocomplete and browser geolocation
- Convex backend for users, alerts, unsubscribe tokens, and cron scheduling
- Python alert pipeline for sunset scoring and email delivery orchestration
- Resend-powered confirmation and alert emails
- Tested unsubscribe and account flows with Vitest and
convex-test
- React 19 + Vite + TypeScript
- Convex
- Python
- Resend
- Vitest
-
Install dependencies:
npm install uv sync
-
Create local environment variables:
cp .env.example .env
-
Start the Convex backend:
npx convex dev
On first run, Convex will create or connect to a project, generate
convex/_generated/*, and print a deployment URL. Copy that URL into.envasCONVEX_URL. -
Start the frontend:
npm run dev
If you deploy the frontend anywhere other than https://golookwest.com, set
APP_BASE_URL so confirmation, unsubscribe, and change-location links point to the
correct origin.
# Frontend
npm run dev
npm run build
npm run test:once
# Convex
npm run dev:backend
# Generate repo/social preview assets
npm run generate:og
# Alert pipeline
python scripts/alerts/sunset_check.py check
python scripts/alerts/sunset_check.py send
python scripts/alerts/sunset_check.py runSee .env.example for the full baseline. The most important values are:
| Variable | Description |
|---|---|
CONVEX_URL |
Convex deployment URL used by the frontend and scripts |
CONVEX_ADMIN_KEY |
Admin key used by the Python pipeline for internal Convex queries |
APP_BASE_URL |
Public app origin used to build confirmation and unsubscribe links |
EMAIL_BACKGROUND_URL |
Optional override for the email hero image |
SUNSETHUE_API_KEY |
SunsetHue API key for the default scorer |
OPENWEATHERMAP_API_KEY |
API key for the fallback weather-based scorer |
RESEND_API_KEY |
Resend API key for confirmation and alert emails |
RESEND_FROM_EMAIL |
Verified sender address for outgoing email |
OPENROUTER_API_KEY |
API key used for alert message generation |
VITE_GOOGLE_MAPS_API_KEY |
Google Maps API key for location autocomplete |
SUNSET_QUALITY_THRESHOLD |
Minimum score required before sending an alert |
SUNSET_SCORER |
sunsethue or openweathermap |
convex/
alerts.ts
alertEmails.ts
cronActions.ts
crons.ts
emails.ts
prompts.ts
quotes.ts
schema.ts
users.ts
public/
_redirects
background.webp
favicon.svg
apple-touch-icon.png
og.jpg
web-preview.png
scripts/
alerts/
fallback_scorer.py
sunset_check.py
welcome_email_template.html
quotes/
scrape_goodreads.py
generate-og-image.mjs
src/
App.tsx
App.css
main.tsx
useGooglePlacesAutocomplete.ts
- The unsubscribe flow is token-based and requires an explicit confirmation click.
scripts/quotes/scrape_goodreads.pyis a one-time content import tool used to seed the quotes table during development.- SPA rewrites for
/confirm,/unsubscribe, and/change-locationare handled bypublic/_redirectsandvercel.json.
