Skip to content

GowthamAvula/url-sortner-gowtham

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸš€ create-bz-mern-app

npm version npm downloads GitHub stars

A modern fullstack boilerplate powered by:

  • βš›οΈ Frontend: Vite + React + Mantine
  • πŸ” Authentication: Google Login + JWT
  • 🌐 Backend: Node.js + Express + MongoDB

βš™οΈ Full Setup Instructions

πŸ”Ή Step 1: Create a Git Repository

Create a new GitHub repository (e.g.):

https://github.com/kaushikkumarbz/url-shortener-dev-example

During repo creation, select .gitignore β†’ Node.


πŸ”Ή Step 2: Clone the Repository

git clone git@github.com:kaushikkumarbz/url-shortener-dev-example.git
cd url-shortener-dev-example

πŸ”Ή Step 3: Scaffold the Project

Inside the cloned folder:

npx create-bz-mern-app@latest

This will set up the following folder structure:

url-shortener-dev-example/
  β”œβ”€β”€ backend/
  └── frontend/

πŸ”Ή Step 4: Configure .gitignore and .env Files

By default, .env files are ignored. But for Vite frontend to work properly, you should:

  1. Open .gitignore
  2. Replace:
    .env
    .env/*
    
    with:
    /backend/.env
    

βœ… This allows:

  • βœ… frontend/.env to be committed (used by Vite)
  • πŸ”’ backend/.env to stay private (JWT, DB credentials)

πŸ”Ή Step 5: Setup Environment Variables

πŸ“ backend/.env

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_secret

πŸ“ frontend/.env

VITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_BZENV=development  # or production
VITE_DEV_PROXY=http://localhost:3000

πŸ”Ή Step 6: Install Dependencies and Start

Quick Start Start frontend and backend together from root:

npm run dev

OR

If you prefer running frontend and backend separately, follow the setup steps below.

➀ Frontend

cd frontend
npm install
npm run build
npm start

➀ Backend

cd ../backend
npm install
npm start

πŸ› οΈ Tech Stack

  • Frontend: Vite, React, Mantine, Google OAuth2
  • Backend: Node.js, Express, MongoDB, JWT
  • Tooling: ESLint, Prettier, dotenv

πŸ™Œ Contributing

Feel free to fork and create PRs to improve the boilerplate!


πŸ“„ License

MIT Β© 2025 Kaushikk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published