Giter Site home page Giter Site logo

tborychowski / zakupnik3 Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 1.0 7.5 MB

Brilliant home-spendings-logger/manager

License: GNU General Public License v3.0

HTML 28.61% JavaScript 44.02% Dockerfile 0.18% Stylus 25.55% Shell 1.64%
spending-tracker expense-tracker self-hosted docker spendings-logger

zakupnik3's Introduction

ZAKUPNIK 3

Another version of a brilliant home-spendings-logger/manager. Mobile friendly and simpler than ever.

Screenshots

Screenshot

Get started

Docker

Requires docker to be installed and running.

Create docker-compose.yml file in a directory somewhere with the contents (or copy this file from the this repo):

---
version: '3.7'
services:
  zakupnik:
    container_name: zakupnik
    image: tborychowski/zakupnik
    restart: unless-stopped
    ports:
      - "3000:${PORT}"
    env_file:
      - ./.env
    volumes:
      - ./database.db:/app/database.db

Then run:

docker-compose up -d

Your app should be available on localhost:3000. The database.db file should be created in the same directory, so you can back it up periodically.

Local instance

Requires: node and npm to be installed locally.

Run the following commands:

git clone https://github.com/tborychowski/zakupnik3.git zakupnik
cd zakupnik
npm ci
npm run startprod

Configuration

Create .env file:

  • when running with docker - in the same directory as your docker-compose.yml
  • when running locally - in the root dir of the repo

You can copy the attached .env-example file and just modify the values:

SESSION_SECRET=abcdef
AUTH=true
LOGIN=admin
PASSWORD=admin
PORT=3000
NODE_ENV=prod
  • SESSION_SECRET - is used to encrypt the auth session and api requests
  • AUTH - allows you to disable the authentication, and run the app without the need to login. This is not recommended when the app is deployed to a public location!
  • LOGIN and PASSWORD - are your user credentials (when AUTH is true)
  • PORT - is the port on which the app will run inside the container.
  • NODE_ENV - is the environment type. prod or production should be set for production environments, otherwise: dev or development.

Building docker image

Run

docker build -t tborychowski/zakupnik .

zakupnik3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

abhishek-code8

zakupnik3's Issues

make it work

fix CRUD on form

  • create
  • create multiple
  • update
  • remove

free text parsing

provide just 1 text field (textarea) and parse it.
e.g.

fuel 50

would be parsed into:

{ category: 'Car', group: 'Fuel' description: '', amount: 50 }

and multiline:

tesco 100
cleaning 10+20+5
cosmetics 10

would be parsed into:

{ category: 'Food', group: 'Groceries', description: 'tesco', amount: 55 },
{ category: 'Home', group: 'Cleaning', description: 'tesco', amount: 35 },
{ category: 'Home', group: 'Cosmetics', description: 'tesco', amount: 10 },

add "income"

  • allow negative values
  • mark "income" category
  • update stats with a new line series

improve tests

  • improve & cleanup
    • seed the DB for all tests up front
  • add tests for amounts in cats
  • add tests for stats

remove iconfont

  • ⚲ (⚲) and transform: rotate(-45deg)
  • × (×)
  • ⚙ (⚙)
  • ◄► or ‹›

pills/tree dropdown

  • redesign the form: category to the right of description with a...
  • category/group tree in a popup
  • and pills below sorted by freq.
  • fold "repeat" to an arrow-row below the rows

multiple tweaks

  • make "repeat" work in entry parser
  • make preview table non-clickable
  • update preview on textbox focus
  • clean up shitty code

Some client caching

try not to reload data after each CRUD op, but rather use local stores and (eventual consistency)

preview

add preview on form change

weird date behaviour

  • edit item (e.g. from 2018-01-20), save;
  • create a new item (e.g. on 2019-01-01), save;
  • new item will have a date of 2018-01-20;

Day is preserved from edit and not reset after save.

little things

  • favicon
  • increase chart height
  • tweak colours
  • import new data
  • dont use express in-memory session
  • login credentials to external file (or DB?)

Add Chart

  • add chart.js
  • add API /stats/2018?group_id=2
  • sync with date & cat-click

PWA

api improvements

  • group frecency
  • keywords matching for groups
  • more filters on entries (by cat, by group, etc)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.