Queue Away is a queue and appointment platform for businesses and customers.
It provides:
- a React + Vite frontend
- a Node + Express API backend
- Supabase authentication
- PostgreSQL persistence
- booking, chat, profile, and business directory flows
client/ Frontend app
backend/ API server
- Frontend: React, Vite, React Router, Tailwind CSS, Framer Motion
- Backend: Node.js, Express, pg, cors, dotenv
- Auth and data services: Supabase
- Local orchestration: Docker Compose
- Node.js 20 or newer
- npm 9 or newer
- A Supabase project
- A PostgreSQL database for the backend
The backend is configured through backend/.env.
Required backend variables:
DATABASE_URL=
SUPABASE_URL=
SUPABASE_ANON_KEY=
CLIENT_URLS=
PORT=5000Notes:
CLIENT_URLSshould contain your allowed frontend origins, separated by commas.- For local development,
http://localhost:5173is usually enough. - If you use Docker Compose, the frontend build also needs
SUPABASE_URLandSUPABASE_ANON_KEYavailable in the root environment.
Where each variable belongs:
- Frontend variables are used by the React app at build time.
- Backend variables are used by the API server at runtime.
VITE_*variables belong to the frontend.DATABASE_URL,SUPABASE_URL,SUPABASE_ANON_KEY, andCLIENT_URLSbelong to the backend.
Required frontend variables:
VITE_API_BASE_URL=
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=Example values:
VITE_API_BASE_URL=http://localhost:5000/api
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-keyInstall dependencies for both apps:
npm install --prefix backend
npm install --prefix clientStart the backend:
npm run dev --prefix backendStart the frontend in another terminal:
npm run dev --prefix clientLocal URLs:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:5000
Port summary:
5173is the Vite development server for the frontend.5000is the Express API port for the backend.8080is used by Docker Compose for the containerized frontend.
You can run the full stack with Docker Compose:
docker compose up --buildThis starts:
- backend on
http://localhost:5000 - frontend on
http://localhost:8080
If the frontend build is using Docker Compose, make sure the root environment provides:
SUPABASE_URL=
SUPABASE_ANON_KEY=Recommended hosting:
- Frontend: Cloudflare Pages
- Backend: Render Web Service
Build settings:
- Build command:
npm ci && npm run build --prefix client - Build output directory:
client/dist - Root directory: repository root
Cloudflare variables:
VITE_API_BASE_URL=https://your-render-service.onrender.com/api
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-keyThese are frontend build variables. They are read by Vite during the Cloudflare build.
Important:
- The app uses
BrowserRouter, so SPA fallback is required. client/public/_redirectsalready contains the Cloudflare fallback rule.- Add the final Cloudflare domain to Supabase Auth redirect URLs.
Service settings:
- Runtime: Node
- Build command:
npm ci --prefix backend - Start command:
npm start --prefix backend - Root directory: repository root or
backend
Render variables:
DATABASE_URL=your-postgres-connection-string
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
CLIENT_URLS=https://your-cloudflare-site.pages.dev,https://your-custom-domain.comThese are backend runtime variables. Render injects them into the Node server process.
Before going live, confirm the following:
- Backend health check returns
okat/api/health. - Frontend loads successfully on the Cloudflare Pages domain.
- Supabase redirect URLs include the deployed frontend domain.
- Render
CLIENT_URLSincludes every frontend origin you will use. - Booking, accept, decline, and message flows work in production.
npm run lint --prefix client
npm run build --prefix client
npm run dev --prefix backend- The backend API is expected to live under
/api. - The client reads its API base URL from
VITE_API_BASE_URL. - Keep the backend env values out of the frontend build.