This project is a full-stack application with a React frontend and an Express backend. It includes user authentication, email verification, password reset, and more.
For more detailed documentation, please refer to the prd.
- Node.js (v14 or higher)
- npm (v6 or higher) or yarn
- Docker
- Gmail account with its app password Gmail Setup Guide for Nodemailer
- Clone the repository:
git clone https://github.com/Tonio2/boilerplate.git
cd boilerplate- Create environment variable files:
# Docker env variables
cp .env.example .env
# Server environment variables
cd ../server
cp .env.example .env
# Client environment variables
cd ../client
cp .env.example .env-
Update the .env files with your configuration.
-
Install dependencies for both client and server:
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm install- Initiate db schemas:
# Start db
docker compose up -d
# Initiate schemas
cd server
npm run db:push- Start the postgres server:
docker compose up -d- Start the backend server:
cd server
npm run dev- Start the frontend client:
cd client
npm startYour app is accessible at http://localhost:5000 and the api at http://localhost:5000/api
# Push schema changes to database (development only)
npm run db:push
# Generate migration files
npm run db:generate
# Run migrations (production)
npm run db:migrate
# Open Drizzle Studio (database GUI)
npm run db:studioVia Drizzle Studio:
cd server
npm run db:studioOpens at https://local.drizzle.studio
Via psql CLI:
docker exec -it boilerplate-postgres psql -U postgres -d boilerplateVia any PostgreSQL client:
- Host: localhost
- Port: 5432
- Database: boilerplate
- Username: postgres
- Password: postgres