(by @ombharatiya)
Check the deployed app here : Bill Insights.
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.
- 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.
- 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.
- Overview Page - Shows monthly bills in a graph
- Create/Edit Bill Screen - Create or edit bills on this screen using a simple form
- List all Bills Screen - Create or edit bills on this screen using a simple form
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:
to run the above app locally, you can simply run the command:
To create image run the command:
To run the built image, run the command:
For more details about Docker and docker compose, check the documentations.
This project was bootstrapped with Create React App.
In the project directory, you can run:
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.
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.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
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.
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.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Thank you :)
Copyright @ombharatiya