Skip to content

dev-madhurendra/BarberPRO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

91 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’ˆ Barber Token System

A full-stack Barber Shop Token Management System that allows customers to book digital tokens to avoid long wait times and barbers to manage queues efficiently.


πŸš€ Features

πŸ§‘β€πŸ’Ό Customer

  • Sign up/login via email/password or Google OAuth
  • Book tokens for specific barbers
  • View estimated wait time and position in queue
  • Cancel or reschedule bookings

πŸ’‡ Barber

  • Sign up/login via email/password or Google OAuth
  • Manage incoming tokens/appointments in real time
  • Set available time slots and token limits
  • Notify customers about availability or changes

πŸ” Authentication

  • OTP-based email verification
  • JWT (access + refresh token) auth flow
  • OAuth2 login with Google (with role selection)

πŸ›  Tech Stack

Layer Technology
Frontend React + Vite + TypeScript
Styling Tailwind CSS + Styled Components
Backend Spring Boot 3.x
Auth Spring Security, JWT, OAuth2, OTP
Database PostgreSQL
Email Gmail SMTP
DevOps GitHub Actions (CI)
Deployment (Planned: Render / Railway / Vercel)

πŸ“ Folder Structure

barber-token-system/
β”œβ”€β”€ backend/        # Spring Boot REST API
β”œβ”€β”€ frontend/       # React App (Vite + TypeScript)
β”œβ”€β”€ .github/        # GitHub workflows and templates
└── README.md

πŸ§‘β€πŸ’» Getting Started

πŸ“¦ Prerequisites

  • Node.js >=18.x
  • Java >=17
  • PostgreSQL
  • Gmail account for SMTP
  • Git + Maven

πŸ”§ Backend Setup

cd backend
cp src/main/resources/application.example.properties src/main/resources/application.properties
# βœ… Update DB credentials, SMTP, and Google OAuth config
./mvnw spring-boot:run

🌐 Frontend Setup

cd frontend
cp .env.example .env
# βœ… Update VITE_BACKEND_URL=http://localhost:8080
npm install
npm run dev

βœ… CI/CD Pipeline

πŸ§ͺ GitHub Actions Workflow

Runs on every push/PR to main:

  • Lint + build Spring Boot backend
  • Lint + build React frontend

.github/workflows/ci.yml

name: Simple CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build-backend:
    name: πŸš€ Build Spring Boot Backend
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          java-version: '17'
      - run: |
          cd backend
          mvn clean install -DskipTests

  build-frontend:
    name: 🌐 Build React Frontend
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: |
          cd frontend
          npm install
          npm run build

πŸ§ͺ Coverage Report

Frontend: https://sonarcloud.io/summary/overall?id=dev-madhurendra_barberpro-frontend&branch=main

Backend: https://sonarcloud.io/summary/overall?id=dev-madhurendra_BarberPRO&branch=main

πŸ“„ API Documentation

Available at:
http://localhost:8080/swagger-ui.html

Includes:

  • Auth APIs (login, signup, OTP, JWT)
  • Role-based APIs for Barber & Customer
  • Token booking, listing, queue management

πŸ§ͺ Testing

  • βœ… Manual testing via Postman
  • βœ… OTP and auth flows tested
  • πŸ§ͺ Unit & integration tests in progress

πŸ“Έ Screenshots

Add screenshots or screen recordings here

![Login Screen](screenshots/login.png)
![Customer Dashboard](screenshots/customer-dashboard.png)
![Barber Queue](screenshots/barber-queue.png)

πŸ“Œ GitHub Project Standards

  • .github/CODEOWNERS for auto-reviewers
  • Pull Request Template
  • Issue Templates (bug + feature)
  • Linting via ESLint (frontend) and Checkstyle (backend)
  • Prettier formatting
  • .editorconfig for formatting consistency

🀝 Contributing

We welcome community contributions! Please follow these steps:

1. Fork the repo
2. Create a new branch: git checkout -b feature/your-feature-name
3. Commit your changes: git commit -m '✨ Add new feature'
4. Push the branch: git push origin feature/your-feature-name
5. Open a Pull Request

πŸ“„ See CONTRIBUTING.md for full details.


πŸ‘₯ CODEOWNERS

* @your-github-username
/backend/ @your-backend-username
/frontend/ @your-frontend-username

πŸ“„ License

This project is licensed under the MIT License.


🌐 Live Demo

Coming soon: barber-token.vercel.app
(Will include deployed backend + frontend once CI/CD is complete)


πŸ™Œ Acknowledgements

  • Spring Boot Docs
  • React & Vite Ecosystem
  • Open Source Tools & Libraries
  • Contributors and Reviewers

✨ Author

Made with ❀️ by Madhurendra Nath

About

A full-stack Barber Shop Token Management System that allows customers to book digital tokens to avoid long wait times and barbers to manage queues efficiently.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages