small adatation of https://tabler.io/ in goffee templates
Find a file
2026-05-03 01:29:32 -05:00
config add base goffee 2026-05-01 11:56:07 -05:00
controllers tempalte profile 2026-05-03 01:29:32 -05:00
events add base goffee 2026-05-01 11:56:07 -05:00
hooks add base goffee 2026-05-01 11:56:07 -05:00
liquid avances en plantillas 2026-05-01 18:15:40 -05:00
models add base goffee 2026-05-01 11:56:07 -05:00
storage tempalte profile 2026-05-03 01:29:32 -05:00
utils add base goffee 2026-05-01 11:56:07 -05:00
workers add base goffee 2026-05-01 11:56:07 -05:00
.env-dev base tabler 2026-05-01 12:46:11 -05:00
.env-example add base goffee 2026-05-01 11:56:07 -05:00
.gitignore first commit 2026-05-01 11:53:21 -05:00
go.mod avances en tablas 2026-05-02 21:38:15 -05:00
go.sum avances en tablas 2026-05-02 21:38:15 -05:00
LICENSE add base goffee 2026-05-01 11:56:07 -05:00
main.go add base goffee 2026-05-01 11:56:07 -05:00
README.md first commit 2026-05-01 11:53:21 -05:00
register-events.go add base goffee 2026-05-01 11:56:07 -05:00
register-global-hooks.go add base goffee 2026-05-01 11:56:07 -05:00
register-queues.go add base goffee 2026-05-01 11:56:07 -05:00
routes.go tempalte profile 2026-05-03 01:29:32 -05:00
run-auto-migrations.go add base goffee 2026-05-01 11:56:07 -05:00
template-helpers.md alerts, toast amd breadcrum 2026-05-03 00:06:23 -05:00

goffee logo

Cup of Goffee

What is Goffee?

Cup is a skeleton project for the Goffee Go framework made for building web APIs, suitable for small, medium size and microservices projects. With it's simple structure, and developer friendly experience it helps with increasing the productivity.

Main Features

  • Routing
  • Hooks
  • Data Validation
  • Databases ORM (GORM integrated)
  • Emails
  • JWT tokens
  • Cache (Redis)
  • HTTPS (TLS)

Installation

To create a new cup project you need to install the Goffee's cli first

Install Goffee [cli] tool

To install the goffee globally open up your terminal and run the following command:

go install git.smarteching.com/goffee/goffee@latest
Create new project using a Cup of Goffee

Here is how you can create new Goffee projects

goffee new [project-name] [project-remote-repository]

Example

goffee new myapp git.smarteching.com/goffee/myapp

where: project-name is the name of your project remote-repository is the remote repository that will host the project.

Getting started

First make sure you have Goffee installed, then use it to create a new project, here is how

Let's create a route that returns hello world

Open up the file routes.go in the root directory of your project and add the following code:

	router.Get("/greeting", func(c *core.Context) *core.Response {
		JsonString := `{"message": "hello world"}`

		return c.Response.Json(JsonString)
	})

Next, in your terminal navigate to the project dir and run the following command to start the live reloading:

goffee run:dev

Finally, open up your browser and navigate to http://localhost/greeting

To learn more check the routing docs section

Architecture

The architecture is similar to MVC, where there is a routes file ./routes.go in which you can map all your app routes to their controllers which resides in the directory ./controllers. Controllers are simply methods that handles requests (GET, POST, ... etch) to the given routes.

The request journey:

The first component that receive's the request in Cup is the Router, then Goffee locates the matching handler of the request and it check's if there are any hooks to be executed either before or after the controller, if so, it executes them in the right order, then at the final stage it returns the response to the user. Request -> Router -> Optional Hooks -> Controller -> Optional Hooks -> Response

Folder structure

├── cup
│   ├── config/ --------------------------> main configs
│   ├── events/ --------------------------> contains events
│   │   ├── jobs/ ------------------------> contains the event jobs
│   ├── controllers/ ---------------------> route's controllers
│   ├── logs/ ----------------------------> app log files
│   ├── hooks/ ---------------------------> app hooks
│   ├── models/ --------------------------> database models
│   ├── storage/ -------------------------> a place to store files
│   ├── tls/ -----------------------------> tls certificates
│   ├── .env -----------------------------> environment variables 
│   ├── .gitignore -----------------------> .gitignore
│   ├── go.mod ---------------------------> Go modules
│   ├── LICENSE --------------------------> license
│   ├── main.go --------------------------> go main file
│   ├── README.md ------------------------> readme file
│   ├── register-events.go ---------------> register events and jobs
│   ├── register-global-hooks.go ---------> register global middlewares
│   ├── routes.go ------------------------> app routes
│   ├── run-auto-migrations.go -----------> database migrations