Documentation overview
This site documents go-gin-clean-starter — a Go API template built around Gin, GORM, PostgreSQL, JWT authentication, migrations, and a modular layout similar to larger production backends (for example the RegisterModule(app) pattern you may know from other projects).
What you will learn here
- How to install, configure, and run the API locally or in Docker.
- How the bootstrap sequence works: configuration →
Appcontainer → module registration. - Where HTTP handlers, business logic, domain contracts, and database code live — and why some folders are outside
internal/. - How migrations, seeders, and CLI flags fit into day‑to‑day development.
- What the auth and user modules expose over HTTP, and how JWT middleware protects routes.
Each page is written to be read top to bottom or used as a reference when you jump from the sidebar (desktop) or the mobile page picker.
How to use this site
Desktop
- Left: documentation tree — pick a topic in order, or jump to any page.
- Right: table of contents (outline) for the current page — it highlights the section in view as you scroll (sometimes called scrollspy or an active heading outline). Click an entry to smooth‑scroll to that heading.
Mobile
The outline is hidden on small screens to save space; use the Jump to page control at the top of the article to move between major topics.
Languages
| Locale | URL prefix | Audience |
|---|---|---|
| English | /en/... | Default; technical terms often kept in English. |
| Bahasa Indonesia | /id/... | Same structure; translated explanations and labels. |
Use the language switcher in the header to toggle. Internal links stay within the same locale.
Who this starter is for
- Developers who already know HTTP and want a structured first project in Go instead of a single
main.gofile. - Small teams that want shared conventions before splitting services or adding more modules.
What is not covered in depth
- Production hardening (rate limiting, WAF, full observability stack) — you should add these per your threat model.
- OpenAPI / Swagger code generation — optional; the starter focuses on clear folders and hand‑written handlers.
When you are new to the repo, read Introduction → Getting started → Architecture → Project structure in that order. Then branch to Database & migrations, Authentication API, or Deployment as needed.