Skip to content

A Billing Management App Developed using React.js, Redux, Saga, Chart.js, Bootstrap, Typescript. Deployed using Docker on Vercel(Zeit).

Notifications You must be signed in to change notification settings

ombharatiya/react-billing-app

Repository files navigation

Bill Manager - React.js, Redux, Saga, Chart.js

(by @ombharatiya)


A demo app to illustrate various features of a react.js application:

Check the deployed app here : Bill Insights.


Problem Statement:

Chinu owns a car wash business and needs help to manage various bills from his vendors. Need to build an application to help Chinu manage his monthly bills. The bill manager should show a bill dashboard (list of bills) with the total monthly billed amount.

The app uses following libraries/packages for development, build and deployment:

  • React.js - An open-source JavaScript library for building user interfaces & single-page or mobile applications.
  • Redux.js - A Predictable State Container for JS Apps
  • Redux-Saga - A Redux Middleware library to handle Asynchronous Actions such as fetching data more easily & effciently
  • React-Router - A package that provides the core routing functionality for React Router
  • Chart.js - an open-source JavaScript library to draw different types of charts by using the HTML5 canvas element
  • LocalStorage - Not a library but a feature that this app uses local storage to store data(temporary storage) and to maintain the new bill id
  • Docker - to package and run the app in a loosely isolated environment called a container
  • Vercel (formerly ZEIT) - for Instant static deploys
  • TypeScript - a superset of JavaScript programming language that compiles to clean JavaScript output.

Functional requirements:

  • The user must be able to manually add, edit and remove bills. (update the state locally)
  • The user must be able to filter bills by category. (category filter dropdown)
  • Draw a time-series chart of the monthly billing cycle.

Screens:

  1. Overview Page - Shows monthly bills in a graph

Overview

  1. Create/Edit Bill Screen - Create or edit bills on this screen using a simple form

Create/Edit Bill

  1. List all Bills Screen - Create or edit bills on this screen using a simple form

List all Bills Screen

LocalStorage Data Storage

We are storing the data in localstorage to persist data in case of page refresh.

One bill object looks like following:

{
"id": 1,
"description": "Dominoes",
"category": "FoodNDining",
"amount": "430",
"date": "01-02-2020"
}

Here's a screenshot to show how local storage will look like:

localstorage

Docker to build and deploy

to run the above app locally, you can simply run the command:

docker-compose up --build

To create image run the command:

docker build -t bill-insight

To run the built image, run the command:

docker run -p 3000:3000 -it bill-insight -d

For more details about Docker and docker compose, check the documentations.


This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm install

Installs the important libraries to build and run the app.

In case of any issue while building the app, delete the node_modules folder in the root directory and run this command again.

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.


Thank you :)

Copyright @ombharatiya


About

A Billing Management App Developed using React.js, Redux, Saga, Chart.js, Bootstrap, Typescript. Deployed using Docker on Vercel(Zeit).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published