Giter Site home page Giter Site logo

se-challenge's Introduction

How to set up this project

  • create an empty vagrant directory
    cd vagrant_directory
    git pull the files from this github repository
    vagrant up

  • go to shared vagrant directory:
    cd /vagrant

  • create database company:
    psql
    create database company;
    \q

  • set up database:
    python database_setup.py
    (You might need to change the passwords setting at line 31 to be able to connect to the database)

  • start server:
    python main.py

  • open browser, type: localhost: 5000/

Implementation

Back-end

  • I set up a virtual development environment using Vagrant and installed Apache2, PostgreSQL, Flask, and SQLAlchemy.
  • PostgreSQL database communicates with the program through SQLAlchemy.
  • I also used Flask to set up HTML templates and URLs.
  • Database schema:
    expense(id, data, category, employee, description, pre_tax, tax_name, tax_amount)
    employee(p_id, name, address)
    Instead of saving each expense row directly to the database, this design can reduce data redundancy

Front-end

  • I used some Bootstrap for styling the web pages and created charts with Pygal framework.
  • I also used Flask(Jinja) to style the top menu button to improve user experience.
    It changes border color when selected.
  • A print button is provided so that user can print the report with one click.
    I used window.print() function instead of generating a PDF file for a fast solution.
    I will try to use Pdfkit later.

se-challenge's People

Contributors

kxzh avatar michaeldibernardo avatar rbarazi 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.