Currently building — Go Projects
R.

Go-mono-project

View on GitHub

Go-Mono-Project is a Go REST APIs rewrite of my original Spring Boot–based monitoring system. It retains core features like project tracking, RBAC, and department-level management, while improving performance, structure, and maintainability through a cleaner and more modular Go backend.

GolangPostgresREST APIsRBAC

The Mission

A Go-based REST API rewrite of an original Spring Boot project monitoring system. Handles project tracking, role-based access control (RBAC), and department-level management for internal teams. The original Spring Boot implementation carried JVM startup overhead and verbose boilerplate that slowed iteration. Rewriting in Go produced a leaner binary, lower memory footprint, and forced a clean architectural rethink: layered handler/service/repository instead of an organically grown monolith.

The Problem

Internal teams lacked a centralised way to track project progress across departments. The existing Spring Boot codebase had grown without a clean separation of concerns, making it slow to change and expensive to run for the workload it handled.

How I solve it

Adopted a layered Go architecture (handler, service, repository) with constructor-based dependency injection. Each domain is an isolated package. RBAC is enforced at the service layer, not in middleware, so permission checks stay adjacent to business logic and are testable without HTTP context. PostgreSQL access uses pgx with parameterised queries throughout.

Key Features

  • JWT stateless auth
  • Per-resource RBAC
  • Project CRUD with department scope
  • User management + role assignment
  • Structured JSON error responses
  • Handler / Service / Repository layers

Architecture Overview

Single Go binary exposing a JSON REST API. Requests pass through middleware (JWT auth, logging, CORS) before reaching domain handlers. Handlers delegate to services which enforce RBAC and call repositories that execute parameterised SQL via pgx.

Client
HTTP Client

Any REST client (Postman, frontend, or service)

Middleware (HTTP request)
API Layer
Middleware

JWT auth, request logging, CORS

Domain Handlers (authenticated)
Domain Handlers

Route parsing, request binding, response shaping

Service Layer (domain call)
Service Layer
Service Layer

Business logic, RBAC enforcement, validation

Repository Layer (data access)
Data Layer
Repository Layer

Parameterised SQL via pgx, data mapping

PostgreSQL (SQL / pgx)
PostgreSQL

Persistent storage for projects, users, departments

Client
API Layer
Service Layer
Data Layer