Platform
Environments
Ceylon Journeys is a Sri Lanka-focused travel and mobility platform combining hotel booking, vehicle rental (car, bike, tuk-tuk), food discovery, AI trip planning,...
Overview
Ceylon Journeys is a Sri Lanka-focused travel and mobility platform combining hotel booking, vehicle rental (car, bike, tuk-tuk), food discovery, AI trip planning, budget management, social travel feed, and admin/supplier tools, built on a React + NestJS + PostgreSQL + Redis + Elasticsearch + OpenAI stack aligned to a 32-week roadmap.
Environment Matrix
| Environment | Purpose | Frontend URL | API Base URL | Database | Cache | Search | Payments | |
|---|---|---|---|---|---|---|---|---|
| Local | Developer laptops for daily coding, debugging, and feature spikes before pushing to remote branches. | http://localhost:5173 (web), http://localhost:5174 (admin) | http://localhost:3000/api | Local PostgreSQL (Docker or Supabase dev project) | Local Redis (Docker) | Local Elasticsearch/OpenSearch (Docker) | Mock or SendGrid sandbox | PayHere/Stripe test keys |
| Development | Shared dev environment for integrating branches, verifying APIs, and UI against real services before QA. | https://dev.ceylonjourneys.com | https://dev-api.ceylonjourneys.com/v1 | Supabase PostgreSQL dev instance | Railway Redis dev instance | Elastic Cloud/OpenSearch dev cluster | SendGrid dev API key | PayHere sandbox, Stripe test mode |
| Staging | Pre-production environment mirroring production config for end-to-end QA, beta users, and soft launch flows. | https://staging.ceylonjourneys.com | https://staging-api.ceylonjourneys.com/v1 | Managed PostgreSQL (Supabase or AWS RDS staging) | Managed Redis staging | Elastic Cloud/OpenSearch staging | SendGrid staging key with limited audience | PayHere live key (restricted), Stripe live (small limit) |
| Production | Public environment for paying users, partners, and full analytics, with stricter monitoring, backups, and security. | https://ceylonjourneys.com | https://api.ceylonjourneys.lk/v1 | Managed PostgreSQL prod (Supabase or AWS RDS) | Managed Redis prod | Elastic Cloud/OpenSearch prod | SendGrid production key | PayHere/Stripe live keys |
Services by Environment
Web Frontend (Customer App)
- Tech: React + Vite + TypeScript + Tailwind CSS + Framer Motion, deployed to Vercel per roadmap instructions.
- Environments:
- Local:
apps/webserved via Vite dev server. - Dev: Vercel project
ceylonjourneys-web-dev, auto-deploy ondevbranch. - Staging: Vercel project
ceylonjourneys-web-staging, deploy on release candidate tags. - Production: Vercel project
ceylonjourneys-web, deploy onmaintags, mapped toceylonjourneys.com.
Admin Dashboard (Internal + Supplier)
- Tech: React + Vite + TypeScript + Recharts per admin roadmap.
- Environments:
- Local:
apps/adminvia Vite dev server, protected routes for admin role. - Dev:
admin-dev.ceylonjourneys.comfor internal dev testing. - Staging:
admin-staging.ceylonjourneys.comfor pre-launch QA and security audit; used heavily in Phase 3 tasks like P3-11. - Production:
admin.ceylonjourneys.combehind JWT/OAuth admin guard, used for hotel/vehicle/user management and analytics.
Backend API (NestJS)
- Tech: Node.js + NestJS + Prisma + PostgreSQL, with OpenAPI/Swagger docs, JWT/OAuth, and modular APIs (Auth, Hotels, Vehicles, Bookings, Payments, Reviews, AI, Social, Food).
- Environments:
- Local:
http://localhost:3000/api, connecting to local dev databases and services. - Dev:
https://dev-api.ceylonjourneys.com/v1for integration with dev frontend and early partner tests. - Staging:
https://staging-api.ceylonjourneys.com/v1for QA, beta users, and soft launch per Sprint 8 tasks (P2-24, P2-25). - Production:
https://api.ceylonjourneys.lk/v1as the canonical public API, with full auth, rate limiting, logging, and monitoring.
Databases & Storage
- PostgreSQL:
- Local: Docker or Supabase dev project for schema design and migrations (Phase 2 P2-02).
- Dev: Supabase PostgreSQL dev instance for early backend modules (P2-01–P2-07).
- Staging: Managed PostgreSQL staging instance mirroring production schema.
- Production: High-availability PostgreSQL with backups, used by all core modules (Auth, Hotels, Vehicles, Bookings, Payments).
- MongoDB (or similar):
- Used for reviews and social feed per blueprint and API reference, with dev/staging/prod clusters matching phases.
- S3/CloudFront:
- Used for photos (hotels, vehicles, food, social posts) and static assets; staging/prod buckets separated.
Cache and Search
- Redis:
- Local: Docker container for availability cache and sessions.
- Dev/Staging: Railway/Supabase Redis instances sized for MVP traffic, matching Phase 2 cache tasks.
- Production: Managed Redis with replication for availability, rate limiting, and session data.
- Elasticsearch/OpenSearch:
- Local: Docker for indexing hotels and vehicles.
- Dev/Staging: Elastic Cloud/OpenSearch clusters for Phase 2 search work (P2-09, W-02/W-05 pages).
- Production: Search cluster scaled for real traffic, powering hotel/vehicle search and food module queries.
Integrations
- PayHere (LKR payments): sandbox in dev, restricted live keys in staging, full live keys in production for hotel and vehicle booking flows.
- Stripe (USD/EUR tourist payments): test mode in dev, live mode with low limits in staging, full live in production for international cards.
- SendGrid (email): dev/staging keys for transactional email testing, production key for booking confirmations, password reset, and campaigns.
- Mapbox (maps): dev/staging tokens for hotel/vehicle/food maps and GPS tracking, production token with domain restrictions.
- OpenAI (GPT-4): dev/staging keys for AI Trip Planner and chatbot development, production key with usage monitoring for Phase 4 AI features.
Configuration & Secrets
All sensitive configuration is handled via environment variables and managed platform dashboards instead of hardcoding values.
Env Files and Platform Config
- Local:
.env.localfor web/admin,.envfor NestJS, containing test keys and local DB URLs.- Examples:
VITE_API_BASE_URL=http://localhost:3000/api,DATABASE_URL=postgres://...,REDIS_URL=redis://localhost:6379. - Dev:
- Vercel project settings for web/admin, Railway/Supabase env for backend, Elastic Cloud config.
- Keys:
PAYHERE_MERCHANT_ID,PAYHERE_SECRET,STRIPE_SECRET_KEY,SENDGRID_API_KEY,MAPBOX_TOKEN,OPENAI_API_KEY,JWT_SECRET. - Staging:
- Separate env var sets mirroring production but with staged data and limited access, used for QA and beta.
- Production:
- Locked-down env vars on Vercel, backend hosting, and service dashboards, with rotation policies and access limited to founder/CTO.
Phase Alignment
Phase 0 – Brand & Dev Setup
- Environments: Local only; dev project created but not widely used.
- Focus: GitHub monorepo, React Vite Tailwind dev setup, Supabase/Railway backend, Vercel domain connection as per P0 tasks.
Phase 1 – UI/UX Design
- Environments: Figma only; web/admin environments exist but primarily show design previews.
- Focus: Design system, responsive grid, dark/light tokens, page UX flows; no staging/prod traffic yet.
Phase 2 – Web App Development
- Environments: Local + Dev + Staging.
- Dev: Used for building and integrating core modules (auth, hotels, vehicles, bookings, payments, reviews, search) and frontend pages W-01–W-21.
- Staging: Brought online for SEO, performance, integration tests, and 20-user beta (P2-22, P2-24, P2-25).
- Production: Goes live at soft launch with limited users and partners, tied to Negombo initial market per Launch tasks P6-01–P6-04.
Phase 3 – Admin Dashboard
- Environments: Dev + Staging + Production for admin and supplier portals.
- Dev: Admin app scaffold and KPI dashboard built on dev API.
- Staging: Full admin and partner flows tested, including security audit P3-11.
- Production: Used for real partner operations, notifications, and campaign launches (P6-06).
Phase 4 – AI & Mobile
- Environments: Dev + Staging + Production for AI services and React Native app.
- Dev: AI itinerary generator, chatbot, price predictor, GPS tracking, chat, integrations, mobile app setup and core screens.
- Staging: AI and mobile flows tested with selected users before wider roll-out.
- Production: All AI features and mobile app live, mapped to master plan milestones (AI Features, Mobile App Live).
Testing & Deployment Rules
- Branching:
- Feature branches → preview deployments;
dev→ Development environment; tagged releases → Staging;mainstable tags → Production. - Testing:
- API integration tests (P2-24) run against dev/staging before any production deploy.
- QA sprints (P2-25, P3-11) must pass staging checks before launch tasks execute.
- Performance & SEO:
- Lighthouse ≥ 90 for web app in staging before public launch, per SEO performance optimisation task P2-22.
- Security:
- Rate limiting, CSRF, auth guards, and audit logs enforced in staging and production, aligned with Admin QA Security Audit (P3-11).