Giter Club home page Giter Club logo

piggy-project's Introduction

Piggy-Project

Description

A basic web-app with user registration and database management uses JS' async requests to get data from server and create dynamic pages, provides a friendly and responsive UI.

Written in Python for backend, and (mainly) vanilla JS, HTML for front-end.

  • Goals:
    • Learning Javascript.
    • Organize and analyze data 'on-the-fly'.
    • Getting to know Python's web-app-backend, and Flask framework in particular.
    • Dusting off Web Development skills.
    • Another Corona Project.

Features

Images

  • Home:

  • Table:

  • Analysis:

Demo Users

A registered user for test purposes: ---

Modules

CSS:

  • Bootstrap 4.5.2

Javascript:

  • Mark.js 8.11.1
  • Chart.js 2.8.0

Python:

  • Flask
  • Flask Forms (Flask_WTF), Flask Login (Flask_Login)
  • SQLAlchemy
  • 'requirements.txt' for more accurate list

Files

  • /piggy: a dir and a python package.
    • __ init __.py: Configures the app instance and control the imports order (prevents circular imports).
    • routes.py: Deals with requests and responses, in particular defines the app routes.
    • models.py: Defines the DB tables with SQLAlchemy's models as classes.
    • forms.py: Defines the main forms of the app and partly their UI.
  • /piggy/templates: all the HTML files
  • /piggy/static/js: all the JS code, arranged and written using MVC.
  • /piggy/styles: all the CSS files
  • Procfile, requirements.txt, runtime.txt: Files for production.
  • run.py: Contains the initiated app, and runs the web-app when called as a script.
  • dev_scripts.py: scripts for developer use.

Usage

Run app directly:

Via the production server.

Clone/Modify app:

  • Database: Set Postgres' sql database with the following settings postgresql://postgres:123456@localhost:5000/piggy , alternatively change the following line in piggy/__init__.py:
    app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:123456@localhost:5000/piggy'
    
  • Then, in order to create the needed sql tables, run the following command from the project's dir:
$ python dev_scripts.py create_tables 
  • Run:
$ python run.py

Features to add:

  • Table Page:

    • Scroll Spy for the Months (a MUST for long table management)
    • Separate HTML elements that TABLE and ANALYSIS share - for DRY html code.
  • Analysis Page:

    • Scroll spy for the charts
    • add 'facts' row:
      • Average monthly net income
      • 'Heaviest' category (income, expanses separately)
  • Home Page:

    • Dynamic Cards: user can add more cards to his home page, these will contain : annlyzed data (biggest expanse, most recent big income ),user notes, and more...
  • Account:

    • User can define different month start and end.
    • User can define: constant expanses (that happens monthly, for example - rent), monthly goals (for month net-income)
    • change password, change email
  • pages to add:

    • API Documentation with User-Authetication

Contributors:

  • Logo designer: @

piggy-project's People

Contributors

matanbt avatar

Watchers

 avatar

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.