shoshinnikita / budget-manager Goto Github PK
View Code? Open in Web Editor NEWEasy-to-use, lightweight and self-hosted solution to track your finances
License: MIT License
Easy-to-use, lightweight and self-hosted solution to track your finances
License: MIT License
database init error: couldn't create DB connection: database is down
error.docker-compose up --build
and I was able to start the server.
PostgreSQL is an overkill for this project because we don't need complex relationships and high performance. Yet we have to run DB in a Docker container (it can be very annoying).
It makes sense to use an embed storage instead. Possible options:
Note: The migration must not affect API
Add special error types for internal/db
package:
BadRequestErrorType
- error caused by invalid request data (empty id)InternalErrorType
- error caused by internal error (db error)Auto convert commas to points in the entered numbers: 35,5
-> 35.5
We should use Global Configuration to avoid option repeating
Use mocks for tests in internal/web
package instead of real DB connection. It will let us run tests without a PostgreSQL instance.
We can use github.com/golang/mock package for mocking
There are tests for the most of DB methods. But some methods don't have even indirect tests. It is needed to add checks for these methods:
GetDay
GetDayIDByDate
GetMonthID
NULL
or 0
(no value). Another option is to use 1
by default.0.152
, 3
, 1.75
and etc. The maximum precision is 0.0001. We can store it as v*1000
(like money)cost / amount
. If amount is undefined, price would be -
User should be able to edit type and (maybe) date
Add an info block with the current version and the hash commit. Also specify a link to the GitHub repo
Add unit tests for function db/pg.recomputeMonth
ParentID
into Spend Type structuredocker-compose.yaml
example and etc.)/tools
:
fill_db.go
is barely used. It is easier to init the db manuallyapi.rest
is meaningless because there's swagger.yml
that can be used to make requestsbench.sh
also doesn't make much sense because it is difficult to reproduce the resultsdb/pg
web
, but don't replace them with unit tests (#59)web
to a special packageTrim spaces in titles, notes and etc.
Format links in Notes
section:
Update API
GET /api/search
Content-Type: application/json
Authorization: Basic ...
{
"title": "foo" # title pattern (contains)
"notes": "sales" # notes pattern (contains)
"after": "2006-01-02T15:04:05Z07:00" # start date to search (`RFC3339` layout)
"before": "2006-01-02T15:04:05Z07:00" # end date to search (`RFC3339` layout)
"min_cost": "15.5" # minimal Spend Cost
"max_cost": "27.3" # maximal Spend Cost
"type_ids": "1,2,55" # list of Spend Type ids separated by comma
}
Add a page with url /search
. It supports all params from API but consumes them from query parameters
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.