Skip to content
/ ignis Public

πŸ”₯ IgnisGo is a production-ready Go project template designed to jumpstart your backend development. It provides a solid foundation with best practices, pre-configured tooling, and essential components, acting as a "batteries-included" starter kit for building robust RESTful services.

License

Notifications You must be signed in to change notification settings

ioanzicu/ignis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ IgnisGo Golang Boilerplate πŸ—οΈ

Ignis is a production-ready Go project template designed to jumpstart your backend development. It provides a solid foundation with best practices, pre-configured tooling, and essential components, acting as a "batteries-included" starter kit for building robust RESTful services.

Think of it as a modern, opinionated copy-paste-able base for your next Go project.

πŸš€ Included Batteries

  • Project Structure: Follows Standard Go Project Layout.
  • PostgreSQL Ready: Pre-configured pgx driver and connection pooling.
  • Type-Safe SQL: sqlc setup for generating Go code from SQL queries.
  • Dockerized: Complete Dockerfile and docker-compose.yml for local development.
  • Migrations: Database migration support via goose.
  • Configuration: Simple env-var based config with .env file support.
  • Graceful Shutdown: Ready-to-use signal handling for safe termination.
  • Health Checks: Built-in /healthz endpoint.
  • Example Domain: Includes a minimal User domain to demonstrate patterns (CRUD, Repository).

Note

The included users table migration (00001_initial_schema.sql) and queries are for demonstration purposes only. You should replace them with your own domain logic.

πŸ› οΈ Tech Stack & Dependencies

Component Technology Version Role Source
Language Go 1.25.4 Core programming language Official Site
Database PostgreSQL 18.1 (Alpine) Relational database system Official Site
Driver pgx v5.8.0 PostgreSQL driver and toolkit GitHub
ORM/Gen sqlc v1.30.0 Type-safe SQL compiler GitHub
Config godotenv v1.5.1 Environment variable loader GitHub
Migration Goose v3.26.0 Database migration tool GitHub

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Go: Version 1.25.4 or higher
  • Docker: For containerized execution
  • Make: For running project commands

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/ioanzicu/ignis.git
cd ignis

2. Configuration

The application uses environment variables for configuration.

Local Development: Create a .env file in the root directory:

HTTP_HOST=localhost
HTTP_PORT=8080
PG_DSN=postgres://user:password@localhost:5432/dbname?sslmode=disable

Docker: Variables are automatically handled in docker-compose.yml.

3. Running with Docker (Recommended)

Start the application and database with a single command:

make compose-up

This will:

  • Start Postgres 18.1
  • Build and start the app service
  • Expose the API on port 8080

To stop the services:

make compose-down

To view logs:

make compose-logs

4. Running Locally

Install dependencies and tools:

make deps

Generate database code (if queries change):

make generate

Run the application:

make run

πŸ› οΈ Make Commands

The project includes a Makefile to simplify common tasks:

Command Description
make help Display available commands
make deps Install Go dependencies and tools (sqlc, goose)
make run Run the application locally
make build Build the application binary
make test Run unit tests
make generate Generate Go code from SQL using sqlc
make migration-create Create a new database migration
make migration-up Apply database migrations
make compose-up Start Docker environment
make compose-down Stop Docker environment

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Happy Coding! 🐹 built with ❀️ in Go.

About

πŸ”₯ IgnisGo is a production-ready Go project template designed to jumpstart your backend development. It provides a solid foundation with best practices, pre-configured tooling, and essential components, acting as a "batteries-included" starter kit for building robust RESTful services.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published