Full-Stack Render Web Setup
This skill scaffolds production-grade full-stack web applications tailored for Render deployment, featuring Python/FastAPI backend and React/Next.js frontend, standardized with ArchUnitPython for backend architecture enforcement and Nx for frontend module boundaries.
Locked Architecture
- Target Infrastructure: Render.com
- Web service for frontend (Next.js / Node).
- Web service for API (FastAPI / Python 3.12).
- Render Managed PostgreSQL (supports
pgvectorandpgcrypto). - Any extensions unsupported on Render (
age,pgrouting,azure_ai) are avoided; graph traversal is executed using recursive SQL CTEs. - Database connection string automatically adapts
postgres://topostgresql+asyncpg://.
- Platform Scope: Web Only (No React Native)
- Clean focus on browser applications (employee portals, ops consoles).
- No Expo, Metro, NativeWind, or dual-env mobile overhead.
- Architecture Standardization: ArchUnitPython
- Python backend enforces architecture in
backend/tests/test_architecture.pyviaarchunitpython:- Cycle Prevention:
project_files("app/").should().have_no_cycles() - Layer Boundaries:
app.coremust never depend onapp.features. - File Size Metric:
metrics("app/").count().lines_of_code().should_be_below(1000)directly in pytest.
- Cycle Prevention:
- Python backend enforces architecture in
- Code Sharing & Monorepo:
- Managed via Nx and pnpm workspaces (
apps/web,packages/core,packages/hooks,packages/env). - FastAPI backend maintains its own tooling (
uv/poetry/pip) outside the JS graph.
- Managed via Nx and pnpm workspaces (
- Quality & Coverage Gate:
- 80% line + branch test coverage gate repo-wide.
- Vitest for web and shared packages; Pytest for backend.
- Error Contract: RFC 7807 Problem Details (
application/problem+json).
Scaffolding Steps
- Collect Project Parameters:
- Project name / slug (e.g.
dss-ask-policy). - Database name (e.g.
ask_policy_db). - Domain feature slice name (e.g.
policies,conversations).
- Project name / slug (e.g.
- Copy Templates:
- Copy
templates/root/*into the project root. - Copy
templates/backend/*intobackend/. - Copy
templates/apps/web/*intoapps/web/. - Copy
templates/packages/*intopackages/.
- Copy
- Replace Placeholders:
{{PROJECT_NAME}},{{PROJECT_SLUG}},{{DB_NAME}}.
- Install & Verify:
- Run
pnpm installin the workspace root. - Set up Python virtual environment in
backend/and installpyproject.tomldependencies includingarchunitpython. - Execute test suites (
pnpm testandpytest) to verify tests and architecture rules pass cleanly.
- Run
- Render Deployment:
render.yamlis pre-configured to provision web, api, and database services in one blueprint.