Start a Project

Initialize

Provide gofs with a go module name such as github.com/myorg/myapp

Navigate to the folder where you want to initialize your project and run

gofs init github.com/[your org]/[your app]

Or if you have not created the folder then provide a folder name and gofs will it

gofs init github.com/[your org]/[your app] [your folder]

Folder Structure

Go is not opinionated about folder structure however by convention go code should be kept close to where it is used. In Gofs we use the default folder structure below.

NB: Gofs is not a framework so you can use or modify this as you see fit.

root |--.github Github actions configuration |--.gofs Gofs configuration |--.vscode Vscode configuration |--cmd Gofs command |--docker Docker folder including default Dockerfile |--internal | |--app Backend (see backend docs) | |--auth Authentication functions | |--config App config | |--db Database functions | |--server | | |--assets Static assets | | |--handlers Generic handlers, for example for assets | | |--logging Logging functions | | |--telemetry Telemetry functions | | |--middleware.go Server middleware | | |--routes.go Server routes | | |--server.go Server code | |--ui Frontend (see frontend docs) |--scripts Build Scripts

Dependencies

Once you have initialized a project you can install all required dependencies with:

make deps
This will install air, templ, htmx and alpine.

Start

Run make to build and start the default app

make

Copyright © 2025