Home - daddeJ/user-auth-microservices GitHub Wiki

user-auth-microservices

A .NET-based microservices project with separate User and Authentication services. Includes Docker setup and Azure DevOps CI/CD pipelines for easy deployment and scalability.


Overview

user-auth-microservices is a scalable microservices-based platform built using .NET technologies, focused on centralized user management and authentication services.

This project follows clean architecture principles and standard coding practices such as SOLID, separation of concerns, and TDD. It features:

  • ๐Ÿ” A dedicated User Service for handling general user information across multiple systems
  • ๐Ÿ”‘ A standalone Authentication Service to manage credentials, tokens, and identity flows
  • ๐Ÿ“ฆ Dockerized services for local and cloud deployments
  • ๐Ÿ”„ CI/CD pipelines using Azure DevOps for streamlined testing and delivery
  • ๐Ÿงช Integrated unit testing and validation logic for maintainability

It is built to be extensible, allowing you to plug this into systems like:

  • ๐Ÿ“š Library Management Systems
  • ๐Ÿงพ Visitor/Attendance Tracking Systems
  • ๐Ÿข Admin Portals and Internal Tools

Project Structure

user-auth-microservices/ 
โ”‚
โ”œโ”€โ”€ user-service/              # โœ… Centralized user info (name, email, etc.)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ Domain/            # Entities, ValueObjects, Enums
โ”‚   โ”‚   โ”œโ”€โ”€ Application/       # Use cases (CreateUser, GetUser)
โ”‚   โ”‚   โ”œโ”€โ”€ Infrastructure/    # EF Core setup, DbContext, Repos
โ”‚   โ”‚   โ””โ”€โ”€ Api/               # Controllers, DTOs
โ”‚   โ”œโ”€โ”€ tests/                 # Unit + integration tests
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ””โ”€โ”€ azure-pipelines.yml
โ”‚
โ”œโ”€โ”€ auth-service/              # ๐Ÿ” JWT-based auth (login, register, token)
โ”‚   โ”œโ”€โ”€ src/                   # Same DDD layout
โ”‚   โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ””โ”€โ”€ azure-pipelines.yml
โ”‚
โ”œโ”€โ”€ tracking-service/          # ๐Ÿ“Š Logs check-in, check-out, activity history
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ Domain/            # CheckInRecord entity
โ”‚   โ”‚   โ”œโ”€โ”€ Application/       # Use cases: LogCheckIn, LogCheckOut
โ”‚   โ”‚   โ”œโ”€โ”€ Infrastructure/    # DB persistence
โ”‚   โ”‚   โ””โ”€โ”€ Api/               # POST /checkin, /checkout, GET /logs
โ”‚   โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ””โ”€โ”€ azure-pipelines.yml
โ”‚
โ”œโ”€โ”€ admin-portal/              # ๐Ÿ–ฅ Angular frontend for staff dashboard
โ”‚   โ”œโ”€โ”€ frontend/              # Auth, user list, activity viewer
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ””โ”€โ”€ azure-pipelines.yml
โ”‚
โ”œโ”€โ”€ docker-compose.yml         # Local orchestration (services + DBs)
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ architecture-diagram.png
โ”‚   โ”œโ”€โ”€ sequence-diagram.png
โ”‚   โ””โ”€โ”€ user-service-contract.md