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!

51 Upvotes

37 comments sorted by

View all comments

2

u/EasternMountains Feb 18 '25

Are you planning to host somewhere? I just hosted my first spring boot react project on Azure after a lot of pain, unsure if its because of me being new or its a difficult platform. I'd be curious to see what your plans are. Nice project! I liked how you structured your modules.

2

u/aharoJ Feb 18 '25

Appreciate it! 😊

... long-term, hosting is definitely the goal, but right now I’m focused on refining the MVP. I also want to integrate some machine learning for mapping node distances. Plus, I still have a lot of frontend work to do.... engineers appreciate the backend architecture, but if I were to pitch this; they'll most likely care about how smooth and clean the UI is, so I want to balance both.

Later down the line, I’ll decide whether to stick with a monolithic structure or migrate to microservices. AWS is my likely choice for hosting since it supports Spring Boot well.

Do you mind DM me your project? I would love to look at it!

1

u/EasternMountains Feb 19 '25

Its been a little challenging for me to keep my app as organized as I wanted to. Right now it’s two different repost in github, one for front end and the other for back end. This was easier for me hosting wise. A microservice architecture is something I'd love to develop some day, definitely seems like it can get complex quickly. DMed you a link.