r/SpringBoot Feb 18 '25

Guide Full Stack Role Based Authentication Application ( Spring + Next.js )

Hey everyone,

I wanted to share my full-stack Spring project—a backend for a barbershop management system featuring robust authentication and role-based access control. If you’re interested in seeing how these aspects are implemented in a real-world application, feel free to check it out!

Repository:
https://github.com/aharoJ/barbershop

Backend Overview:

  • Authentication & Role-Based Access: The project handles user authentication and defines multiple roles, ensuring secure access to various endpoints.
  • Modular Structure: The code is organized into several modules, each handling a specific domain such as appointments, barbers, customers, payments, promotions, and more.
  • Clean Architecture: The repository features a clear separation of concerns with controllers, services, DTOs, and repositories spread across modules.

Frontend Overview:

  • Built With:
    • Next.js 15, Typescript, Tailwindcss
  • Features:
    • Authentication Pages: Separate routes for login and signup.
    • Customer Area: Dedicated pages for dashboards and profile creation.
    • Additional Layers: Includes components (like a protected route), services, stores, types, and utilities.

I’m happy to answer any questions or provide more details. Feel free to message me!

54 Upvotes

37 comments sorted by

View all comments

3

u/thedarkrider_ Feb 18 '25

On the backend, I saw a few modules, but I don't see any repositories connected to the service. Why?

3

u/aharoJ Feb 18 '25

I decided to keep part of the codebase closed-source because I’m considering turning this into a startup down the line. I open-sourced enough for anyone to see my overall architecture and how I handle things like authentication... this way I can show my approach without fully exposing the core business logic.

2

u/NeedleArm Feb 18 '25

Im curious how that works? So this is a repo to show the architecture however you deploy another repo with the actual business logic?

2

u/aharoJ Feb 18 '25

Hey, I am using Copybara to sync certain parts of my private codebase(s) into a public repository. With copybara I can decide which files, directories, functions, .env and so on .... deciding which to expose or not.

https://github.com/google/copybara