Kinance is a modern family finance management API built with Go, Gin, GORM, and PostgreSQL. It provides endpoints for user authentication, profile management, budgeting, transactions, and receipt processing, with comprehensive OpenAPI documentation and containerized deployment.
- User Authentication: Register, login, and manage JWT tokens securely.
- Profile Management: View and update user profiles, manage family members.
- Budgeting: Create, update, delete, and list budgets for personal or family use.
- Transactions: Record, update, and delete financial transactions.
- Receipts: Upload and process receipt images using AI, retrieve receipt details.
- API Documentation: Interactive docs at
/docspowered by Redoc and OpenAPI. - Dockerized: Easy local development and deployment with Docker and Docker Compose.
go.mod
Makefile
api/
docs/
openapi.yaml
cmd/
api/
main.go
internal/
auth/
budget/
common/
investment/
notification/
receipt/
transaction/
user/
pkg/
cache/
config/
database/
logger/
middleware/
queue/
validator/
scripts/
tests/
- Go 1.24+
- Docker & Docker Compose
- PostgreSQL
- Clone the repository:
git clone https://github.com/pastorenue/kinance.git cd kinance - Copy and edit environment variables:
cp .env.example .env # Edit .env as needed - Start services with Docker Compose:
make docker-run
- Run database migrations:
make into_db
- Run the application:
make run
- Access API docs:
- Open http://localhost:8080/docs in your browser.
If you prefer not to use Docker:
go mod tidy
go run cmd/api/main.go- OpenAPI Spec: Located at
api/docs/openapi.yaml - Redoc UI: Served at
/docs - Endpoints:
/api/v1/auth/register- Register user/api/v1/auth/login- Login/api/v1/auth/refresh- Refresh token/api/v1/users/profile- Get/Update profile/api/v1/users/family- Get family members/api/v1/budgets- List/Create budgets/api/v1/budgets/{id}- Update/Delete budget/api/v1/transactions- List/Create transactions/api/v1/transactions/{id}- Update/Delete transaction/api/v1/receipts/upload- Upload receipt/api/v1/receipts- List receipts/api/v1/receipts/{id}- Get receipt details
See .env.example for all required variables, including database, JWT, and AI config.
Run unit and integration tests:
make test- Fork the repo
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
MIT
- Emmanuel Pastor (GitHub)
For questions or support, open an issue or contact the maintainer.