https://github.com/erickoliv/finances-api
https://github.com/erickoliv/finances-api
finance-management golang not-serious pet-project
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/erickoliv/finances-api
- Owner: erickoliv
- License: gpl-3.0
- Created: 2019-03-16T20:46:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-05T02:24:20.000Z (over 2 years ago)
- Last Synced: 2024-06-21T13:22:18.083Z (over 1 year ago)
- Topics: finance-management, golang, not-serious, pet-project
- Language: Go
- Size: 5.52 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/erickoliv/finances-api)
[](https://codecov.io/gh/erickoliv/finances-api)
[](https://goreportcard.com/report/github.com/erickoliv/finances-api)
[](http://hits.dwyl.io/erickoliv/erickoliv/finances-api)
> This is just a personal project I'm using to learn the Go programming language and its libraries.**using different package approaches to validate the better structure for each use case**
## The road so far
- [x] configs from environment
- [x] go modules
- [x] GORM atabase models, using UUID as identifiers
- [x] Dockerfile with build layer
- [x] docker-compose for single machine deployment
- [x] JWT Authentication## Pending
- [ ] Replace GORM for a better solution, without so many abstrations
- [ ] improve database migration
- [ ] Validate Request Payloads
- [ ] better error handling, with "stack trace" build, using errors.Wrap
- [ ] metrics using influx and grafana
- [ ] > 90% test coverage
- [ ] Split domain interface definitions into Reader and Writer actions## Running:
### create a .env file containing application environment variables:
```sh
APP_TOKEN=aRandomGeneratedString
DB_NAME=databaseName
DB_USER=databaseUsername
DB_PASSWORD=databasePassword
DB_HOST=0.0.0.0
DB_PORT=5432
IMAGE_NAME=dockerRepositoryImage
IMAGE_VERSION=dockerTagVersion
GIN_MODE=release
```### vscode configuration file for debugging
```js
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"envFile": "${workspaceFolder}/.env",
}
]
}
```### deploy a local database server for development
```sh
$ make database
```### show database logs
```sh
$ docker logs financedb
```### build docker image and execute development environment with a local database
```sh
$ make dev
```