This repository contains the implementation of an authentication service using Go. The service provides functionalities for user registration and JWT token generation.
Project Structure
proto/v1/auth/auth.proto: Protocol Buffers definitions for the authentication service.
internal/service: Implementation of the authentication services.
internal/model: Data models used in the service.
pkg/encrypt: Encryption utilities.
pkg/server: HTTP / gRPC server implementations.
ddl: Database schema.
config: Configuration.
go.mod: Go module dependencies.
Getting Started
Prerequisites
Go 1.22+
MySQL 5.7+
buf for proto generation
Installation
Clone the repository:
git clone https://github.com/d3code/auth.git
cd auth
Install Go dependencies:
go mod tidy
Install buf:
brew tap bufbuild/buf
brew install buf
Compile Protocol Buffers:
make proto
Setup database:
./database.sh
Running the Service
To run the authentication service, use the following command: