A complete full-stack authentication application with a Node.js + TypeScript backend and React + TypeScript frontend. Features modern dashboard UI, Google OAuth, password reset, and comprehensive user management.
Landing

Sign up

Dashboard

Profile

Settings

auth_token cookie. It is not stored in localStorage.├── backend/ # Node.js + TypeScript API server
│ ├── src/
│ │ ├── auth/ # Authentication logic & routes
│ │ ├── user/ # User management
│ │ ├── config/ # Configuration files
│ │ ├── infrastructure/ # Email providers
│ │ └── presentation/ # Middleware & routes
│ ├── prisma/ # Database schema and migrations
│ └── dist/ # Compiled JavaScript (generated)
├── frontend/ # React + TypeScript frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages
│ │ ├── layouts/ # Layout components
│ │ ├── context/ # React context providers
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utility libraries
└── docker-compose.yml # Development environment
git clone <repository-url>
cd express-react-auth-boilerplate
# Start all services (database, backend, frontend)
docker-compose up -d
# Or start services individually:
docker-compose up -d express-react-auth-db # Database
docker-compose up -d express-react-auth-backend # Backend API
docker-compose up -d express-react-auth-frontend # Frontend
# Run database migrations
docker-compose exec backend npx prisma db push
The frontend is a React + TypeScript application with modern UI components and comprehensive authentication flow.
/ - Landing page/login - User login/signup - User registration/forgot-password - Password reset request/reset-password - Password reset with token/verify-email - Email verification from inbox link/dashboard - Main dashboard (protected)/dashboard/profile - User profile (protected)/dashboard/settings - User settings (protected)The backend is a Node.js + TypeScript API server with Express, Prisma, and comprehensive authentication features.
POST /api/auth/signup - User registrationPOST /api/auth/login - User login (sets httpOnly cookie; body may include rememberMe)POST /api/auth/logout - Clear session cookiePOST /api/auth/forgot-password - Request password resetPOST /api/auth/reset-password - Reset password with tokenGET /api/auth/verify - Verify email addressPOST /api/auth/resend-verification - Resend verification emailGET /api/auth/me - Get current user info (cookie or Bearer)POST /api/auth/change-password - Change password (protected)GET /api/auth/google - Google OAuth loginGET /api/auth/google/callback - Google OAuth callbackGET /api/user/me - Get user profilePUT /api/user/me/profile - Update user profilePOST /api/user/me/avatar - Upload profile photoDELETE /api/user/me - Delete accountGET /api/user/info - Get user basic info# Backend development
cd backend
npm install
npm run dev
# Frontend development
cd frontend
npm install
npm run dev
NODE_ENV=development
PORT=4001
DATABASE_URL="postgresql://app_user:app_password@localhost:5433/express_react_auth"
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="7d"
APP_URL="http://localhost:4001"
FRONTEND_URL="http://localhost:5173"
# Google OAuth (optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Email Configuration
EMAIL_PROVIDER="console" # console, smtp, or resend
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
RESEND_API_KEY="your-resend-api-key"
VITE_API_URL=http://localhost:4001
The project includes Docker Compose for easy development setup:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Rebuild services
docker-compose up -d --build
npm run dev - Start development server with hot reloadnpm run build - Compile TypeScript to JavaScriptnpm start - Start production servernpm run prisma:generate - Generate Prisma clientnpm run prisma:push - Push schema changes to databasenpm run prisma:migrate - Run database migrationsnpm run dev - Start development servernpm run build - Build for productionnpm run preview - Preview production buildnpm run lint - Run ESLint# Build backend
cd backend && npm run build
# Build frontend
cd frontend && npm run build
# Start production
docker-compose -f docker-compose.prod.yml up -d
The browser session is an httpOnly cookie named auth_token. Axios sends it with withCredentials: true. JWT-in-localStorage is a known shortcut this starter does not use.
Remember me controls cookie lifetime: session cookie when unchecked, 30 days when checked. Google OAuth always uses the 30-day cookie.
Backend integration tests cover signup, email verify, login (cookie + Remember me), /me, logout, password reset, and delete account.
# Backend tests
cd backend && npm test
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
43 commits
TypeScript
97.1%
A complete full-stack authentication application with a Node.js + TypeScript backend and React + TypeScript frontend. Features modern dashboard UI, Google OAuth, password reset, and comprehensive user management.
Landing

Sign up

Dashboard

Profile

Settings

auth_token cookie. It is not stored in localStorage.├── backend/ # Node.js + TypeScript API server
│ ├── src/
│ │ ├── auth/ # Authentication logic & routes
│ │ ├── user/ # User management
│ │ ├── config/ # Configuration files
│ │ ├── infrastructure/ # Email providers
│ │ └── presentation/ # Middleware & routes
│ ├── prisma/ # Database schema and migrations
│ └── dist/ # Compiled JavaScript (generated)
├── frontend/ # React + TypeScript frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages
│ │ ├── layouts/ # Layout components
│ │ ├── context/ # React context providers
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utility libraries
└── docker-compose.yml # Development environment
git clone <repository-url>
cd express-react-auth-boilerplate
# Start all services (database, backend, frontend)
docker-compose up -d
# Or start services individually:
docker-compose up -d express-react-auth-db # Database
docker-compose up -d express-react-auth-backend # Backend API
docker-compose up -d express-react-auth-frontend # Frontend
# Run database migrations
docker-compose exec backend npx prisma db push
The frontend is a React + TypeScript application with modern UI components and comprehensive authentication flow.
/ - Landing page/login - User login/signup - User registration/forgot-password - Password reset request/reset-password - Password reset with token/verify-email - Email verification from inbox link/dashboard - Main dashboard (protected)/dashboard/profile - User profile (protected)/dashboard/settings - User settings (protected)The backend is a Node.js + TypeScript API server with Express, Prisma, and comprehensive authentication features.
POST /api/auth/signup - User registrationPOST /api/auth/login - User login (sets httpOnly cookie; body may include rememberMe)POST /api/auth/logout - Clear session cookiePOST /api/auth/forgot-password - Request password resetPOST /api/auth/reset-password - Reset password with tokenGET /api/auth/verify - Verify email addressPOST /api/auth/resend-verification - Resend verification emailGET /api/auth/me - Get current user info (cookie or Bearer)POST /api/auth/change-password - Change password (protected)GET /api/auth/google - Google OAuth loginGET /api/auth/google/callback - Google OAuth callbackGET /api/user/me - Get user profilePUT /api/user/me/profile - Update user profilePOST /api/user/me/avatar - Upload profile photoDELETE /api/user/me - Delete accountGET /api/user/info - Get user basic info# Backend development
cd backend
npm install
npm run dev
# Frontend development
cd frontend
npm install
npm run dev
NODE_ENV=development
PORT=4001
DATABASE_URL="postgresql://app_user:app_password@localhost:5433/express_react_auth"
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="7d"
APP_URL="http://localhost:4001"
FRONTEND_URL="http://localhost:5173"
# Google OAuth (optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Email Configuration
EMAIL_PROVIDER="console" # console, smtp, or resend
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
RESEND_API_KEY="your-resend-api-key"
VITE_API_URL=http://localhost:4001
The project includes Docker Compose for easy development setup:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Rebuild services
docker-compose up -d --build
npm run dev - Start development server with hot reloadnpm run build - Compile TypeScript to JavaScriptnpm start - Start production servernpm run prisma:generate - Generate Prisma clientnpm run prisma:push - Push schema changes to databasenpm run prisma:migrate - Run database migrationsnpm run dev - Start development servernpm run build - Build for productionnpm run preview - Preview production buildnpm run lint - Run ESLint# Build backend
cd backend && npm run build
# Build frontend
cd frontend && npm run build
# Start production
docker-compose -f docker-compose.prod.yml up -d
The browser session is an httpOnly cookie named auth_token. Axios sends it with withCredentials: true. JWT-in-localStorage is a known shortcut this starter does not use.
Remember me controls cookie lifetime: session cookie when unchecked, 30 days when checked. Google OAuth always uses the 30-day cookie.
Backend integration tests cover signup, email verify, login (cookie + Remember me), /me, logout, password reset, and delete account.
# Backend tests
cd backend && npm test
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
43 commits
TypeScript
97.1%