Imported from globalairtravels/cabs-website (
AGENTS.md). Install upstream withnpx skills add globalairtravels/cabs-website. Copyright stays with the author.
This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ before writing any code. Heed deprecation notices.
Global Air Travels: Cab Booking Website
Tech Stack & Architecture
- Framework: Next.js 16.2.6 (App Router, Turbopack, Static Export)
- UI & Styling: React 19, custom CSS system in
src/app/globals.cssintegrated with Tailwind CSS v4 / PostCSS. - Routing: Static routing with
src/app/page.jsas the main entry point. - Output: Static export (
out/directory generated vianpm run build).
Key Guidelines & Conventions
- Dynamic Configuration:
- Branding, contact numbers, and leaflet copy live in
src/config/site.js. - Fares, cabs, cities, and promos live in
firestore/config.booking.json(read viasrc/lib/booking-config.js). - Checkout policy (Google Sheet vs PhonePe/Razorpay, advance vs full per booking type) lives in
firestore/config.checkout.json(read viasrc/lib/checkout-config.js). The Cloud Function copies this file on deploy. - Never hardcode pricing, payment-option policy, vehicle capacities, or contact details in pages. The browser always POSTs
NEXT_PUBLIC_BOOKINGS_API_URL/new— it does not call a gateway-specific URL.
- Branding, contact numbers, and leaflet copy live in
- Brand & Design Style:
- The design is modeled after a premium travel agency (e.g. Cleartrip-like layout) optimized for mobile responsiveness.
- Core colors are defined in
:rootCSS variables inglobals.css:- Primary Orange:
--primary-orange(#F26B1F) for CTA buttons and highlights. - Primary Navy:
--primary-navy(#0B3D91) for header headers, structural highlights, and active states.
- Primary Orange:
- React 19 & Next.js 16 Code Patterns:
- Dynamic route params are Promises:
params: Promise<{ slug: string }>. You must handle them accordingly (e.g. usingawaitor.then()). - For caching, use the
'use cache'directive where appropriate. - For instant navigations, use
<Suspense>boundaries and exportunstable_instant = { prefetch: 'static' }on page routes where validation is needed.
- Dynamic route params are Promises:
- Common Pitfalls & ESLint Rule Warnings:
- Do not call
setStatesynchronously within the top level of auseEffecthook. Doing so will trigger thereact-hooks/set-state-in-effectlinting error. Initialize values outside the effect, or set them conditionally/asynchronously.
- Do not call