Build with Cursor

Unlike Lovable, Cursor doesn't manage infrastructure for you — you run a local backend and frontend on your own machine, using one script to start everything. The whole flow is driven by a single chat command: build.

Step 1 — Get the Project Files

Download PROJECT.zip and extract it. The project folder will look like this after extracting it:

<PROJECT>/
├── .cursor/
│   └── rules/
│       └── trusted-getaways-build-workflow.mdc
├── README.md
├── SETUP_GUARD.md
├── backend_prompt.md
├── frontend_prompt.md
└── run.sh

Open the extracted folder in Cursor.

Step 2 — Type build

In the Cursor chat, type:

build

Step 3 — Confirm Plan Mode

Cursor will ask you to switch to Plan mode first — prompt files can't switch modes automatically, so you'll need to switch manually. If you're already in Plan mode, select "I'm in Plan mode — continue".

Step 4 — Answer the Setup Wizard

Cursor will ask a series of questions in order, one at a time:

QuestionWhat it's for
Provide the Trusted Getaways API key now, or skip?If yes, paste your API key in chat when asked
Enable file logging?Optional — defaults to off
Ship logs to Elasticsearch?Only asked if logging is on; local Docker, remote, or skip
Where should MongoDB run?Required for bookings — local Docker (default), paste a MongoDB URI, or create one on Vercel
How should checkout take payments?Mock checkout for local testing, or Stripe in test mode (paste your test keys)
Refresh all packages once a day?Keeps prices and seats fresh — recommended
Backend and frontend, or backend only?Choose Backend and frontend for the full website

If you skip the API key step, packages and booking won't work until you run configure env later to add it.

Step 5 — Click Build

Once Cursor finishes the questions, it shows a plan summarizing your answers. Click Build, and it scaffolds the backend and frontend end to end, runs the tests, and asks for your site name and colours at the end — without asking for approval on every step.

Step 6 — Run It

From the repo root, in your terminal:

./run.sh

This starts the backend, MongoDB and the frontend together (backend only if you chose backend-only in Step 4), and streams logs in the same terminal.


Everyday Use

Once it's built, you don't repeat the wizard — just use the script:

./run.sh          # start backend + frontend
./run.sh stop     # stop everything
./run.sh test     # run backend and frontend tests
./run.sh sync     # refresh package data now
./run.sh health   # quick API check
./run.sh logs     # tail backend logs (second terminal)
./run.sh status   # ports + containers + Node version

Step 7 — Deploy to Vercel (Optional)

When you're ready to put the website online, type in the Cursor chat:

deploy app

Cursor deploys the app to Vercel as two separate projects:

ProjectWhat it contains
BackendThe API, all secrets, and a daily Vercel Cron job (02:00 IST) that refreshes package data
FrontendThe website, with only the VITE_* values (site URL, name and colours); never any secret

Before deploying, Cursor checks that:

  • your API key and generated secrets are real values, not placeholders,
  • the app is running locally and healthy (./run.sh health),
  • the tests pass and the frontend builds.

If any check fails, it stops and tells you what to fix. During the deploy, Cursor will ask you:

  1. A public MongoDB connection string — the local Docker MongoDB can't be used on Vercel (e.g. MongoDB Atlas, mongodb+srv://…).
  2. Preview or Production — Production requires Stripe; the mock checkout is allowed only for Preview.
  3. Your Vercel login, if you aren't logged in yet.

After the deploy, Cursor sets CORS and the payment return URLs, then shows:

  • the website and API URLs,
  • the booking webhook URL to share with TravClan for final booking codes.

Troubleshooting

Refer to the troubleshooting page if you encounter any issues after building your application with Cursor.



Did this page help you?