MCPcopy Index your code
hub / github.com/GalvinGao/gofiber-template

github.com/GalvinGao/gofiber-template @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
58 symbols 171 edges 33 files 2 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

gofiber-template

This is an opinionated template for building a RESTful API via HTTP transport project using gofiber/fiber framework, with container support via Docker and CI/CD support via GitHub Actions.

Features

Getting Started

1. Get the template

Use this template button (recommended)

This repository is meant to be used as a template for your own project. You can use the Use this template button on the top right corner of this page to create your own repository from this template.

Clone this repository manually

If you want to clone this repository, you can do so by running the following command:

git clone git@github.com:GalvinGao/gofiber-template.git

2. Configure database URL in .env

DATABASE_URL=postgres://USERNAME:PASSWORD@localhost:5432/DATABASE_NAME?sslmode=disable

More information about database URL can be found in bun's documentation

3. Initialize bun migration & Apply initial migrations

go run main.go db init
go run main.go db migrate

4. Launch

Install gow (optional)

gow stands for Go Watch. It is a tool that watches your Go source code and automatically recompiles and restarts your program when necessary. This allows you to see changes in real time which makes development much easier and faster.

go install github.com/mitranim/gow@latest

Start the server

After you install gow simply replace go with gow and start the server using:

gow run main.go start

Debugging

VSCode

Use the following .vscode/launch.json to launch the application with debugger attached:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch Server",
      "type": "go",
      "request": "launch",
      "mode": "auto",
      "program": "${workspaceFolder}/main.go",
      "args": ["start"]
    }
  ]
}

License

MIT License.

Contributing

Issues and pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Core symbols most depended-on inside this repo

formatMigrations
called by 5
internal/infra/db/migrations/logformat.go
Migrate
called by 2
internal/infra/db/migrations/migrator.go
New
called by 2
internal/app/app.go
Declare
called by 2
internal/app/appcontext/appcontext.go
Module
called by 1
internal/infra/0module.go
Module
called by 1
internal/infra/db/0module.go
NewMigrator
called by 1
internal/infra/db/migrations/migrator.go
Init
called by 1
internal/infra/db/migrations/migrator.go

Shape

Function 30
Method 14
Struct 12
TypeAlias 2

Languages

Go100%

Modules by API surface

internal/infra/db/migrations/migrator.go11 symbols
internal/x/logger/fxlogger/fxlogger.go3 symbols
internal/service/post.go3 symbols
internal/repo/post.go3 symbols
internal/controller/post.go3 symbols
internal/app/appcontext/appcontext.go3 symbols
internal/server/http/route/groups.go2 symbols
internal/app/appconfig/types.go2 symbols
internal/app/appconfig/spec.go2 symbols
cmd/app/server/server.go2 symbols
cmd/app/cli/db/command.go2 symbols
main.go1 symbols

Datastores touched

DATABASE_NAMEDatabase · 1 repos

For agents

$ claude mcp add gofiber-template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact