A budget helper. See also hyperbudget-core, where the meat is; this is just an express backend.
This is a budgeting helper.
Users can import transactions from their bank accounts (currently only in CSV
format; there are plans to improve this in the future).
SUBJECT TO CHANGE
This is very early code. The behaviour documented here may change or this may disappear entirely.
- Get mongodb
- Set up .env with your mongodb connection string
MONGODB_URI='mongodb://localhost:27017/hyperbudget-dev'
- Set the JWT secret in
config.json
- Run
npm install
cp config.json.example config.json && vim config.json
The port and host can be configured in the PORT
and HOST
env vars.
npm start
POST http://localhost:3000/account/register HTTP/1.1
content-type: application/json
{
"email": "[email protected]",
"password": "passpasspass",
"firstname": "Errietta",
"lastname": "Kostala"
}
POST http://localhost:3000/account/login HTTP/1.1
content-type: application/json
{
"email": "[email protected]",
"password": "passpasspass"
}
See the categories API
POST http://0.0.0.0:3000/account/categories/list
Content-Type: application/json
x-jwt: JWT-HERE
{
"password": "mypassword"
}
POST http://0.0.0.0:3000/account/categories/update
Content-Type: application/json
x-jwt: JWT_HERE
{
"password": "mypass"
"categories": [{
"name": "Income",
"category_rules": {
"txn_amount_credit": {
"mode": 1001,
"rules": [
[">", 0]
]
},
"txn_desc": {
"mode": 1001,
"rules": [
["!~", "YOUR NAME"]
]
}
},
"className": "cat-income",
"id": "income"
}]
}
See the transactions API
POST http://0.0.0.0:3000/account/transactions/list
Content-Type: application/json
x-jwt: JWT-HERE
{
"password": "mypassword"
}
POST http://0.0.0.0:3000/account/transactions/update
Content-Type: application/json
x-jwt: JWT-HERE
{
"password": "mypassword",
"transactions": [{
"txn_src": "lloyds",
"txn_amount_credit": "500",
"txn_desc": "Description"
}]
}
All of them!
¯\_(ツ)_/¯