Skip to content

Host frontend on Vercel, backend on Render - #15

Merged
Mani212005 merged 2 commits into
mainfrom
fm/digisim-vercel-render-hosting
Sep 22, 2026
Merged

Mani212005 merged 2 commits into
mainfrom
fm/digisim-vercel-render-hosting

Conversation

@Mani212005

Copy link
Copy Markdown
Owner

Live topology: static frontend on Vercel (global CDN), Flask backend as a Docker container on Render. Browser calls stay same-origin through vercel.json rewrites, so the SameSite=Lax session cookie keeps working with no code changes.

Changes:

  • vercel.json: CRA build from frontend/, output frontend/build, rewrites proxying all backend paths (/api, /auth, /library, /projects, /detect_gates, /detect_circuit, /detect_v2, /health) to https://digisim-backend.onrender.com, plus SPA fallback to /index.html
  • backend/Dockerfile: python:3.12-slim, locked deps via uv sync --frozen, gunicorn on $PORT (single worker, CPU-only)
  • backend/.dockerignore, render.yaml Blueprint (docker web service, /health check, secrets as sync:false)
  • AIVisionIntakeModal: hardcoded http://127.0.0.1:5000 replaced with REACT_APP_API_URL; fixed pre-existing import/first lint error
  • frontend/.env.example (new), backend/.env.example extended, docs/deploy-vercel-render.md (click-through Vercel + Render steps, secrets, weights/GPU notes), README hosting section

Netlify: verified zero Netlify config, workflows, or references repo-wide - nothing to delete. Azure Static Web Apps workflow untouched.

Validation (local, single-run):

  • frontend build green; jest 30 suites / 174 tests passed
  • backend: ruff check clean, pytest 5 passed
  • script-verified all 13 frontend-called backend paths resolve to the Render host in vercel.json

Note: no-mistakes pipeline review and document steps were skipped - the pi review agent is 429-quota-exhausted until 2026-09-23T04:00Z. Local validation above stands as evidence. Do not merge from this PR; live hosting is driven separately.

@netlify

netlify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for digisim ready!

Name Link
🔨 Latest commit ebbb877
🔍 Latest deploy log https://app.netlify.com/projects/digisim/deploys/6ab29e917a0400000884076c
😎 Deploy Preview https://deploy-preview-15--digisim.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Mani212005

Copy link
Copy Markdown
Owner Author

CI update: the frontend now compiles clean under warnings-as-errors (commit 76028c6 removed the dead code and repaired the Sidebar accordion JSX). Two red items remain, both outside code and identical on the previously merged PR #14: (1) Azure deploy step fails with deployment_token was not provided - the AZURE_STATIC_WEB_APPS_API_TOKEN repo secret is missing or unavailable to this run; adding it requires repo-secrets access. (2) The four netlify/* checks (Header rules, Pages changed, Redirect rules, deploy-preview) are posted by the Netlify GitHub App integration and fail repo-wide; removing them requires unlinking Netlify on the Netlify dashboard or in repo settings. Neither can be fixed from this branch - the workflow file was intentionally left untouched.

Add vercel.json (CRA build + API rewrites to the Render host + SPA
fallback), backend Dockerfile with locked uv deps and gunicorn on $PORT,
backend .dockerignore, and render.yaml Blueprint (docker web service,
/health check, secrets as sync:false).

Route the AI vision intake modal through REACT_APP_API_URL instead of a
hardcoded 127.0.0.1:5000 URL; document frontend/backend env examples and
add click-through deploy docs with required secrets.

No Netlify config, workflow, or references existed in the repo, so there
was nothing to delete. Azure Static Web Apps workflow untouched.
Adopt the Azure skip_deploy_on_missing_secrets flag, frontend/.npmrc
legacy-peer-deps, and the minimal netlify.toml (satisfies the Netlify
GitHub App checks; Vercel plus Render remains the deploy story).
@Mani212005
Mani212005 force-pushed the fm/digisim-vercel-render-hosting branch from 76028c6 to ebbb877 Compare September 22, 2026 15:28
@Mani212005
Mani212005 merged commit f996587 into main Sep 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant