Skip to content

Add cloud deployment support: Vercel (frontend) + Render (backend)#1

Draft
Copilot wants to merge 7 commits intomasterfrom
copilot/migration-avec-ia
Draft

Add cloud deployment support: Vercel (frontend) + Render (backend)#1
Copilot wants to merge 7 commits intomasterfrom
copilot/migration-avec-ia

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 14, 2026

The Angular frontend and Express/TypeScript backend lacked any cloud deployment configuration. This PR wires up one-click deployments for both, without requiring a separate repository for the backend.

Frontend → Vercel (client-ng/)

  • vercel.json — build command, output dir (dist/client-ng/browser), SPA rewrites, long-lived cache headers for hashed assets
  • scripts/set-env.mjs — generates environment.prod.ts from API_URL env var before ng build; falls back to /api for Docker/Nginx mode
  • package.json — new build:prod script: node scripts/set-env.mjs && ng build --configuration=production
Vercel build pipeline:
  npm run build:prod
    └─ set-env.mjs reads API_URL → writes environment.prod.ts
    └─ ng build --configuration=production (bundles with injected API URL)

Backend → Render (render.yaml at repo root)

Render supports monorepos via rootDir — no separate repo needed.

  • render.yaml — Render Blueprint defining rootDir: server-v2, build/start commands, /api/version health check, JWT_SECRET auto-generated, MONGODB_URI and CORS_ORIGINS as dashboard-only secrets (sync: false)
services:
  - type: web
    rootDir: server-v2
    buildCommand: npm ci && npm run build
    startCommand: npm start
    healthCheckPath: /api/version
    envVars:
      - key: JWT_SECRET
        generateValue: true
      - key: MONGODB_URI
        sync: false
      - key: CORS_ORIGINS
        sync: false

Documentation

  • docs/deployment-render.md — MongoDB Atlas setup, Blueprint vs manual dashboard deployment, Vercel↔Render wiring, free tier caveats
  • docs/deployment-vercel.md — updated Step 1 to reference the Render guide
  • README.md — added quick-reference tables for both platforms with links to full guides

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 14, 2026 22:30
…ity hardening

Co-authored-by: florian2412 <10706578+florian2412@users.noreply.github.com>
…app.spec.ts test)

Co-authored-by: florian2412 <10706578+florian2412@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate project to Angular 21 and improve security Migrate POM: AngularJS 1.5 → Angular 21, Express 4 → Express 5, JWT auth, security hardening Mar 14, 2026
Copilot AI requested a review from florian2412 March 14, 2026 22:36
…(Docker)

Co-authored-by: florian2412 <10706578+florian2412@users.noreply.github.com>
Copilot AI changed the title Migrate POM: AngularJS 1.5 → Angular 21, Express 4 → Express 5, JWT auth, security hardening Specs, full feature parity, and production deployment for POM Angular 21 migration Mar 14, 2026
Co-authored-by: florian2412 <10706578+florian2412@users.noreply.github.com>
Copilot AI changed the title Specs, full feature parity, and production deployment for POM Angular 21 migration Migrate server-v2 to TypeScript, drop entire v1 codebase Mar 14, 2026
Co-authored-by: florian2412 <10706578+florian2412@users.noreply.github.com>
Copilot AI changed the title Migrate server-v2 to TypeScript, drop entire v1 codebase Convert server-v2 to TypeScript, remove v1 codebase, add Vercel deployment for Angular frontend Mar 14, 2026
Co-authored-by: florian2412 <10706578+florian2412@users.noreply.github.com>
Copilot AI changed the title Convert server-v2 to TypeScript, remove v1 codebase, add Vercel deployment for Angular frontend Add cloud deployment support: Vercel (frontend) + Render (backend) Mar 14, 2026
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.

2 participants