All tutorials
AdvancedFull-Stack28:56

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

ReactExpressPostgreSQLFull-Stack

Try it yourself

Open Syvera and follow along — it's free.

Start building

Step-by-step guide

5 steps

1

Scaffold the project

Start with a Node.js Repl. Create an `api/` directory for your Express server and a `client/` directory for React.

2

Set up Express

Install `express`, `pg`, and `drizzle-orm`. Create your database connection and define your schema.

3

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.

4

Add authentication

Install `jsonwebtoken` and `bcrypt`. Create login/register endpoints and a React context for auth state.

5

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.