Files
2025-11-03 12:24:01 +02:00
..
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00
2025-11-03 12:24:01 +02:00

Go Server

A scalable backend boilerplate built with Go, Gin, GORM, PostgreSQL, and Redis.


Technologies Used

  • Go - Core language
  • Gin - HTTP framework
  • GORM - ORM for PostgreSQL
  • Redis - In-memory caching
  • Docker - Containerization (optional)

Features

  • RESTful API using Gin
  • PostgreSQL + Redis integration
  • Modular service-based architecture
  • Middleware support (CORS, Logging)
  • Graceful shutdown handling
  • Environment variable configuration

Getting Started

Installation

  1. Create a .env file and configure database credentials:

    cp .env.example .env
    
  2. Install dependencies:

    go mod tidy
    
  3. Run the database migrations (if applicable):

    go run scripts/migrate.go
    
  4. Start the server:

    go run main.go
    

    The server should be running at http://localhost:8080


📂 Project Structure

├── config/          # Configuration files
├── controllers/     # API Controllers
├── models/         # Database Models
├── routes/         # Route Handlers
├── services/       # Business Logic Layer
├── database/       # DB Connection & Migrations
├── middleware/     # Middleware (CORS, Auth, Logging)
├── main.go         # Entry Point
└── .env.example    # Environment Config Sample