Tripinger Docs
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

EnvironmentPurposeFrontend URLAPI Base URLDatabaseCacheSearchEmailPayments
LocalDeveloper laptops for daily coding, debugging, and feature spikes before pushing to remote branches.http://localhost:5173 (web), http://localhost:5174 (admin)http://localhost:3000/apiLocal PostgreSQL (Docker or Supabase dev project)Local Redis (Docker)Local Elasticsearch/OpenSearch (Docker)Mock or SendGrid sandboxPayHere/Stripe test keys
DevelopmentShared dev environment for integrating branches, verifying APIs, and UI against real services before QA.https://dev.ceylonjourneys.comhttps://dev-api.ceylonjourneys.com/v1Supabase PostgreSQL dev instanceRailway Redis dev instanceElastic Cloud/OpenSearch dev clusterSendGrid dev API keyPayHere sandbox, Stripe test mode
StagingPre-production environment mirroring production config for end-to-end QA, beta users, and soft launch flows.https://staging.ceylonjourneys.comhttps://staging-api.ceylonjourneys.com/v1Managed PostgreSQL (Supabase or AWS RDS staging)Managed Redis stagingElastic Cloud/OpenSearch stagingSendGrid staging key with limited audiencePayHere live key (restricted), Stripe live (small limit)
ProductionPublic environment for paying users, partners, and full analytics, with stricter monitoring, backups, and security.https://ceylonjourneys.comhttps://api.ceylonjourneys.lk/v1Managed PostgreSQL prod (Supabase or AWS RDS)Managed Redis prodElastic Cloud/OpenSearch prodSendGrid production keyPayHere/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/web served via Vite dev server.
  • Dev: Vercel project ceylonjourneys-web-dev, auto-deploy on dev branch.
  • Staging: Vercel project ceylonjourneys-web-staging, deploy on release candidate tags.
  • Production: Vercel project ceylonjourneys-web, deploy on main tags, mapped to ceylonjourneys.com.

Admin Dashboard (Internal + Supplier)

  • Tech: React + Vite + TypeScript + Recharts per admin roadmap.
  • Environments:
  • Local: apps/admin via Vite dev server, protected routes for admin role.
  • Dev: admin-dev.ceylonjourneys.com for internal dev testing.
  • Staging: admin-staging.ceylonjourneys.com for pre-launch QA and security audit; used heavily in Phase 3 tasks like P3-11.
  • Production: admin.ceylonjourneys.com behind 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/v1 for integration with dev frontend and early partner tests.
  • Staging: https://staging-api.ceylonjourneys.com/v1 for QA, beta users, and soft launch per Sprint 8 tasks (P2-24, P2-25).
  • Production: https://api.ceylonjourneys.lk/v1 as 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.
  • 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.local for web/admin, .env for 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; main stable 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).

On this page