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.
- 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
- 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
- OTP-based email verification
- JWT (access + refresh token) auth flow
- OAuth2 login with Google (with role selection)
| Layer | Technology | 
|---|---|
| Frontend | React + Vite + TypeScript | 
| Styling | Tailwind CSS + Styled Components | 
| Backend | Spring Boot 3.x | 
| Auth | Spring Security, JWT, OAuth2, OTP | 
| Database | PostgreSQL | 
| Gmail SMTP | |
| DevOps | GitHub Actions (CI) | 
| Deployment | (Planned: Render / Railway / Vercel) | 
barber-token-system/
├── backend/        # Spring Boot REST API
├── frontend/       # React App (Vite + TypeScript)
├── .github/        # GitHub workflows and templates
└── README.md
- Node.js >=18.x
- Java >=17
- PostgreSQL
- Gmail account for SMTP
- Git + Maven
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:runcd frontend
cp .env.example .env
# ✅ Update VITE_BACKEND_URL=http://localhost:8080
npm install
npm run devRuns 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 buildFrontend: https://sonarcloud.io/summary/overall?id=dev-madhurendra_barberpro-frontend&branch=main
Backend: https://sonarcloud.io/summary/overall?id=dev-madhurendra_BarberPRO&branch=main
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
- ✅ Manual testing via Postman
- ✅ OTP and auth flows tested
- 🧪 Unit & integration tests in progress
Add screenshots or screen recordings here


-  .github/CODEOWNERSfor auto-reviewers
- Pull Request Template
- Issue Templates (bug + feature)
- Linting via ESLint (frontend) and Checkstyle (backend)
- Prettier formatting
-  .editorconfigfor formatting consistency
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.
* @your-github-username
/backend/ @your-backend-username
/frontend/ @your-frontend-username
This project is licensed under the MIT License.
Coming soon: barber-token.vercel.app
(Will include deployed backend + frontend once CI/CD is complete)
- Spring Boot Docs
- React & Vite Ecosystem
- Open Source Tools & Libraries
- Contributors and Reviewers
Made with ❤️ by Madhurendra Nath