GoAuthFlow is a Go-based authentication microservice designed with clean architecture principles. It provides secure user registration and login endpoints with sha256-hashed password storage, using a modular codebase to promote maintainability and scalability.
- User Registration (
POST /v1/register) - User Login (
POST /v1/login) - Password Hashing for security
- SQLite3 Backend for persistence
- Gin Web Framework for fast HTTP handling
- Flexible Architecture: Data, Service, and Transport layers
- Middleware Support: Logging and error handling
- Dockerized Deployment
- Go 1.24.5+
- Gin (v1.11.0)
- SQLite3 (v1.14.32)
- Docker
API/ Data/ # Data models and repository Service/ # Business logic and authentication Transport/ # HTTP handlers, routes, middleware DOC/ # License and Readme main.go # Application entry point Dockerfile # Container configuration go.mod # Dependencies
- Clone the repository:
git clone https://github.com/Voltamon/GoAuthFlow.git - Navigate to the project directory:
cd GoAuthFlow - Build the project:
go build -o goauthflow ./main.go - (Optional) Run with Docker:
docker build -t goauthflow . docker run -p 8080:8080 goauthflow
- Register a new user:
POST /v1/register Content-Type: application/json { "email": "user@example.com", "password": "yourpassword" } - Login with credentials:
POST /v1/login Content-Type: application/json { "email": "user@example.com", "password": "yourpassword" }
- Fork the repository
- Create a new branch (
git checkout -b feat/YourFeature) - Commit your changes
- Open a pull request
MIT License. See LICENSE for details.
- Voltamon (GitHub: Voltamon)