A Go-based identity management server providing user registration, authentication, and JWT token generation. Built with a clean architecture separating business logic, storage, and HTTP handling layers.
app/auth-api/main.go
- Application startup, database connection, and server initializationapp/auth-api/handlers/
- REST API endpoints and routingbusiness/
- Core business operations and validationbusiness/store/
- Data access, connection management, and migrationsfoundation/
- Shared utilities, middleware, and crypto operationsPOST /register
- User registrationPOST /login
- User authentication and token generationGET /liveness
- Kubernetes liveness probeGET /readiness
- Kubernetes readiness probeGET /home
- User profile accessDELETE /delete/:id
- User deletionTo Run the service locally we need .env file set with the following values:
PORT="8089"
ENV="dev"
MYSQL_DATABASE="identity"
MYSQL_USERNAME="username"
MYSQL_PASSWORD="password"
MYSQL_PORT="3306"
MYSQL_HOST="127.0.0.1"
BASE_PATH="/"