Skip to documentation
Documentation menu · App + MySQL + Redis

Build & connect

App + MySQL + Redis

Build a deployment path for a booking app: web/API, durable bookings and optional cache.

On this page

How the products work together

This guide assumes you already have booking UI and API code; it describes an architecture, not a preinstalled template. For separate frontend/API repositories, deploy each and configure the frontend's API URL and CORS.

On reads, the API checks cache, then reads MySQL on a miss and caches the result with a TTL. On writes, save to MySQL first and invalidate/update related cache. Implement this logic in your app. All products below belong to the same organization.

Browser -- public HTTPS --> Flash Deploy (web + API)
                               |-- private --> MySQL: accounts, bookings
                               `-- private --> Redis: available-slot cache
Only the server holds database credentials.

1. Prepare data services

  1. Create MySQL in the same org as the app. Review capacity, connection limits and cost; wait until ready and open Connection.
  2. Copy the private address and port into server-side env. Use variable names your driver/ORM reads; not every app uses DATABASE_URL.
  3. Run migrations to create the booking tables. Test on a nonproduction database first and check backups and compatibility before changing real data.
  4. Create Redis in the same org only if cache is implemented. Copy its private endpoint and credentials into the variables your code uses.

2. Deploy the application

  1. Create a project and select the GitHub repository/branch or source ZIP.
  2. Check the runtime template, build/start commands, public port and env. Never put database credentials in public framework variables.
  3. Deploy, inspect build logs and confirm startup and MySQL connectivity in runtime logs.
  4. Open the project URL, create a booking through the UI and reload to verify it was stored.

3. Verify before inviting customers

  1. Redeploy the app and read the existing booking; it must remain in MySQL.
  2. Let a short-lived test cache entry expire, then verify the API fetches the source data.
  3. Edit/cancel a booking and check that stale cache is not shown after the operation completes.
  4. Verify that one account cannot access another account's private bookings.
  5. Configure the domain and verify HTTPS, costs and data recovery. Do not delete the database to test persistence.