System Architecture
Infrastructure, data models, deployment pipeline, and performance optimization.
Document Info
Version: 1.0
Last Updated: January 16, 2026
Status: Production
System Architecture Overview
Lume Destinations runs on a serverless-first architecture deployed on Google Cloud Platform (GCP). The platform is built with Next.js 15, React 19, and PostgreSQL, optimized for high concurrency and low latency.
Tech Stack
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 15, React 19 | SSR, routing, optimization |
| Styling | Tailwind CSS v4 | Design system |
| Auth | NextAuth.js | Google OAuth, sessions |
| Database | PostgreSQL + Prisma | User data, bookings, rewards |
| Hosting | Google Cloud Run | Serverless containers |
| Storage | Google Cloud Storage | Images, videos, assets |
| AWS SES | Transactional emails | |
| AI | Gemini API | Concierge chat |
| Web3 | Wagmi, Coinbase Wallet | Crypto payments |
Infrastructure
Compute (Google Cloud Run)
- Dev Environment:
lume-destinations-dev(deploys on all pushes) - Production:
lume-destinations-prod(deploys on git tagsv*.*.*) - Region: us-central1
- Auto-scaling: 0-100 instances based on CPU
Database (Cloud SQL PostgreSQL)
- Instance:
gen-lang-client-0870850972:us-central1:lume-db - Connection: Private IP (via Cloud SQL Proxy in production)
- ORM: Prisma with multi-target binaries
Storage (Google Cloud Storage)
- Bucket:
assets.infillcapitalpartners.com - Content: Images, videos, documents
- Delivery: Direct HTTPS (no CDN currently)
Deployment Pipeline
Continuous deployment via Google Cloud Build (cloudbuild.yaml):
- Build: Multi-stage Docker build (node:20-alpine)
- Push: Container to GCR with tags
$SHORT_SHA+latest - Deploy Dev: Always deploys to development
- Deploy Prod: Conditional on git tags matching
v[0-9]+.[0-9]+.[0-9]+
Build time: ~3-5 minutes
Route Map
Public Pages (44 total)
Homepage, locations, pod types, experiences, careers, blog, press, contact, FAQs, policies, etc.
Protected Pages (Requires Auth)
- User Dashboard: Profile, trips, rewards, referrals, wallet, concierge
- Admin Portal: Analytics, loyalty management, email templates
Data Models
The database schema (via Prisma) includes:
- Users: Auth, membership tiers (Bronze → Founder), points, referral codes
- Bookings: Status workflow, source attribution, points earning
- Loyalty: Reward transactions, catalog, tier history, Apple Wallet passes
- Referrals: Coupons, activity tracking, fraud detection
- Payouts: Methods, requests, approval queue
Performance Bottlenecks
- LCP: ~2.5s due to large hero images without CDN edge caching
- Image Weight: On-demand Next.js optimization causes cold start penalty
- Database: No connection pooling configured (+50-100ms overhead)
- Cold Starts: Dev environment scales to zero (~1-2s first request)
Recommended Quick Wins
| Improvement | Effort | Impact |
|---|---|---|
| Add Cloud CDN | Small | High |
| Pre-optimize Images | Small | High |
| Database Connection Pooling | Small | Medium |
| Set Minimum Instances | Small | Medium |
| ISR for Static Pages | Medium | High |