This is a framework for building go based applications. Current it supports HTTP REST apis using Chi.
Everything else is bound with interface. Database to handlers to services. Configurable from the outside. This also comes with docker, docker compose. The default docker file also keeps watch for files changes so it can handle the automatic code rebuild.
Checkout the reframe
repository that has a working demo for a location based proximity app.
Run the following commands to run the project.
git clone [email protected]:thearyanahmed/endframe.git
cd endframe
cp .env.example .env
- Update proper values with
.env
. For this demo.env
values have be filled in.env.example
make start
will start the necessary containers.
While running the container, run make test
to run the tests. Or to run outside of container run go test -v ./...
┌──────────┐ ┌──────────┐ ┌───────────┐ ┌────────────────────────────────────────┐
│ │ │ │ │ │ │ Request Serializer │
│ Server ├────► Router ├────► Handler ├────►────────────────────┬───────────────────┼───┐
│ │ │ │ │ │ │ Serializer │ Validator │ │
└──────────┘ └──────────┘ └───────────┘ └────────────────────┴───────────────────┘ │
│
┌────────────────────────────────────────────────────────────────────────────────────────┘
│
┌────▼────┐ ┌─────────────────┐
│ Service ├─────────────────────────────────────► │ Response │
│ │ └─────────────────┘
└────↑────┘ ┌──────────────────────┐ ┌─────────────────────┐
│ │ │ │ │
└──────► Other Service │←───────│──────► │ Repository (Redis ) │
│ │ │ │ │ │
│ └──────────────────────┘ │ └─────────────────────┘
│ │
│ ─────────────────────────────────────│
Special thanks to Tawsif Aqib