Skip to content

Minimal React + Vite frontend and Express + Prisma backend monorepo template using pnpm workspaces

Notifications You must be signed in to change notification settings

michael1-0/fullstack-monorepo-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monorepo-template

A minimal full-stack monorepo template using pnpm workspaces.

Stack

  • Frontend: React + Vite + TypeScript, with React Router for routing
  • Backend: Express + TypeScript
  • Database: Prisma + PostgreSQL
  • Tooling: shared ESLint, Prettier, and TypeScript configs

Workspace Layout

apps/
  backend/    # Express API + Prisma
  frontend/   # React app (Vite)
packages/
  eslint-config/
  prettier-config/
  typescript-config/

Prerequisites

  • Node.js 20+
  • pnpm 10+
  • PostgreSQL

Getting Started

Install dependencies from the repository root:

pnpm install

Create a backend env file at apps/backend/.env:

DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DB_NAME
PORT=5000

Apply Prisma migrations:

pnpm --filter backend exec prisma migrate dev

Run the full monorepo in development mode:

pnpm dev

Root Scripts

  • pnpm dev — run all workspace dev scripts
  • pnpm dev:backend — run only backend in watch mode
  • pnpm dev:frontend — run only frontend
  • pnpm build — build all workspaces
  • pnpm lint — lint all workspaces
  • pnpm format — format all workspaces
  • pnpm test — run tests where available
  • pnpm start — run backend production build
  • pnpm preview — preview frontend production build

Contributing

Contributions are welcome.

Notes

  • Prisma client output is generated under apps/backend/src/db/generated/prisma/.
  • Shared config packages are consumed by apps via workspace dependencies.
  • This repository is intended as a starting point; replace app code, add or remove dependencies with your project domain logic.

About

Minimal React + Vite frontend and Express + Prisma backend monorepo template using pnpm workspaces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors