Full-Stack Integration & Deployment — Installation Guide
This is a setup guide for a real full-stack project's plumbing — scaffolding, database connection, environment files, and choosing where to deploy. It assumes you can already scaffold a React/Next.js app and an Express app independently (covered in their own technologies); this page is specifically about wiring them together as one project.
Step 1: Scaffold the frontend
(needs verification — exact scaffolding command/flags change across Next.js versions; recheck against this academy's own Next.js Installation tab)
Step 2: Scaffold the backend
Step 3: Set up a database connection
Getting PostgreSQL itself installed and running (Docker, a native install, or a hosted instance) is covered in full, with every platform's options, in this platform's own Databases academy — PostgreSQL Installation tab. The fastest path for local full-stack development is the same Docker one-liner used there:
Step 4: Environment variable files for local development
Two separate .env files, in two separate directories, is the correct default — never one shared file, since frontend and backend have genuinely different exposure rules (see Fundamentals).
Add both .env and .env.local to .gitignore in their respective directories — this is a real, common source of accidentally-committed secrets when a full-stack project's .gitignore was written before the backend directory existed.
Step 5: Choosing a deployment platform
There's no single right answer — the honest, current landscape as of this writing:
(needs verification — exact current free-tier limits, pricing, and feature sets for all three change frequently; confirm on each platform's own pricing/docs page before treating any specific detail as current)
Choosing together-vs-separate deployment is covered as a real architectural tradeoff in the Advanced tab — this step is just knowing the real, current options exist before making that call.
Next Steps
Both pieces run locally, on separate ports, with a database connection ready. Go to Fundamentals to make the first real cross-origin call between them and hit (deliberately, on purpose) your first CORS error.

