Cup is a skeleton project for the Goffee [Go](https://go.dev) 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.
First make sure you have [Goffee](https://git.smarteching.com/goffee/goffee) installed, then use it to create a new project, [here is how](https://git.smarteching.com/goffee/goffee/docs/gaffer#create-new-project-using-gaffer)
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](https://git.smarteching.com/goffee/docs/handlers) of the request and it check's if there are any [hooks](https://git.smarteching.com/goffee/docs/hooks) to be executed either before or after the [controller](https://git.smarteching.com/goffee/controllers), if so, it executes them in the right order, then at the final stage it returns the response to the user.