Files
Gitead 58b2e4af93 docs: add Cloudflare tunnel setup guide and ports reference
Add step-by-step Cloudflare tunnel setup to README.md with Summit Dental Care as a multi-office example. Create docs/ports.md documenting all service hosts and ports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 23:25:44 -04:00

2.5 KiB

Development Hosts & Ports

This document defines the default host and port used by each app/service in this turborepo.
Update this file whenever a new service is added or port is changed.


Frontend (React + Vite)

  • Host: localhost (default)
    • Use 0.0.0.0 if you need LAN access (phone/other device on same Wi-Fi).
  • Port: 3000
  • Access URLs:

Current setup:
Frontend is running on 0.0.0.0 and is accessible via the device IP.

.env file:

NODE_ENV=development
HOST=0.0.0.0
PORT=3000
VITE_API_BASE_URL_BACKEND=http://192.168.1.8:5000

VITE_API_BASE_URL_BACKEND must point to the backend's IP/port as seen from the browser.
Use localhost if only accessing from the same machine, or the machine's LAN IP for access from other devices.


Backend (Express.js)

Current setup:
Runs on all interfaces and allows configured frontend URLs via CORS. Change FRONTEND_URLS to match your setup.

.env file:

NODE_ENV="development"
HOST=0.0.0.0
PORT=5000
FRONTEND_URLS=http://localhost:3000,http://192.168.1.8:3000

Patient Data Extractor Service


Selenium Service


Payment OCR Service


Notes

  • HOST controls binding: localhost = loopback only, 0.0.0.0 = all interfaces (LAN accessible).
  • PORT controls the service's port. Ports never conflict across separate machines — two office PCs can both run on port 5000 with no issue.
  • Frontend uses VITE_ prefixed variables for client-side access (e.g. VITE_API_BASE_URL_BACKEND).
  • In production, traffic is routed through Cloudflare Tunnel — see Cloudflare Tunnel Setup in the main README.

Action for developers:

  1. Copy .env.example.env inside each app folder.
  2. Adjust HOST / PORT if your ports are already taken.
  3. Set VITE_API_BASE_URL_BACKEND to the backend's LAN IP if accessing from other devices.
  4. Run npm run dev from the repo root.