Skip to content

TechLead-War/auth-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 auth-service-2.0

A lightweight, modular authentication service built in Go with PostgreSQL, designed with simplicity and scalability in mind.


🚀 Features

  • Session & token-based authentication
  • Login activity tracking with metadata
  • Seed script for mock data generation
  • PostgreSQL-backed with SQL migrations
  • Clean modular project structure
  • Makefile for easy command execution

📁 Project Structure

auth-service-2.0/
├── cmd/api/             # API entry point
├── internal/repository/ # Database access (users, sessions, logs)
├── internal/resources/  # Shared error definitions, constants
├── internal/db/         # Seed logic
├── migrations/          # DB migration files
├── Makefile             # Useful dev commands
└── go.mod / go.sum      # Go dependencies

⚙️ Setup Instructions

1. Clone the Repository

git clone <repo-url>
cd auth-service-2.0

2. Set up Environment

Create a .env file or export manually:

DB_ADDR=postgres://postgres:password@localhost:5432/auth_service_db?sslmode=disable

3. Apply Migrations

make migrate-up

4. Run the Server

make run

🧪 Seeding the Database

Generate mock data:

make seed count=10

This will create 10 users, sessions, and logs.


📫 Contact

For feedback or contributions, feel free to open an issue or pull request.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors