Full-Stack App: React + Express + PostgreSQL
Build and deploy a complete full-stack app from scratch — REST API, database migrations, and a React frontend.
By Leon Müller
Try it yourself
Open Syvera and follow along — it's free.
Step-by-step guide
5 steps
Scaffold the project
Start with a Node.js Repl. Create an `api/` directory for your Express server and a `client/` directory for React.
Set up Express
Install `express`, `pg`, and `drizzle-orm`. Create your database connection and define your schema.
Build the React frontend
Use Vite to scaffold the client. Set up a proxy in `vite.config.ts` to forward API requests to Express during development.
Add authentication
Install `jsonwebtoken` and `bcrypt`. Create login/register endpoints and a React context for auth state.
Deploy
Add a start script that builds the React app and serves it as static files from Express. Click Deploy.
Complete all steps to finish this tutorial.