A modern fullstack boilerplate powered by:
- βοΈ Frontend: Vite + React + Mantine
- π Authentication: Google Login + JWT
- π Backend: Node.js + Express + MongoDB
Create a new GitHub repository (e.g.):
https://github.com/kaushikkumarbz/url-shortener-dev-example
During repo creation, select .gitignore β Node.
git clone git@github.com:kaushikkumarbz/url-shortener-dev-example.git
cd url-shortener-dev-exampleInside the cloned folder:
npx create-bz-mern-app@latestThis will set up the following folder structure:
url-shortener-dev-example/
βββ backend/
βββ frontend/
By default, .env files are ignored. But for Vite frontend to work properly, you should:
- Open
.gitignore - Replace:
with:
.env .env/*/backend/.env
β This allows:
- β
frontend/.envto be committed (used by Vite) - π
backend/.envto stay private (JWT, DB credentials)
MONGODB_URI=your_mongodb_connection_string
PORT=3000
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
JWT_SECRET=your_secure_jwt_secretVITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_BZENV=development # or production
VITE_DEV_PROXY=http://localhost:3000Quick Start Start frontend and backend together from root:
npm run devIf you prefer running frontend and backend separately, follow the setup steps below.
cd frontend
npm install
npm run build
npm startcd ../backend
npm install
npm start- Frontend: Vite, React, Mantine, Google OAuth2
- Backend: Node.js, Express, MongoDB, JWT
- Tooling: ESLint, Prettier, dotenv
Feel free to fork and create PRs to improve the boilerplate!
MIT Β© 2025 Kaushikk