Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expense App #37

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
65 changes: 26 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,46 @@
The task is to create an income/expense web app. The app should have two screens. The app should be written using the technologies mentioned in the Technologies section.
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app), using the [Redux](https://redux.js.org/) and [Redux Toolkit](https://redux-toolkit.js.org/) TS template.

## Data layer
## Available Scripts

There are two entities in the app: Category and Transaction
In the project directory, you can run:

### Category
### `npm start`

Represents one category of transaction. As examples of categories: Salary, Gifts, Food, Going out, Traveling. There must be pre-defined categories in the app from the beginning (3-5 is enough).
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

Should have following fields
The page will reload if you make edits.\
You will also see any lint errors in the console.

- id
- label
### `npm test`

### Transaction
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

Should have following fields
### `npm run build`

- id
- label
- date
- amount (negative value means expense, positive value means income)
- category (reference by category id)
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

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

### Home
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

This is the default screen and app entry point. This screen should have a table of transactions and a form for adding a new transaction. Users should not be able to remove transactions. Also, on this screen, there should be a list of categories with the ability to add/remove categories. It's up to you to decide what happens to transactions in category when the category gets deleted.
### `npm run eject`

### Graph(s)
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

This screen should have a graph or multiple graphs to represent the data. It's up to you to decide how exactly to visualize the data. To give you an example: a graph representing total spends per category.
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.

## Technologies
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.

- Typescript
- SCSS Modules
- React version 16.8 and up, please make sure to use Hooks
- Redux version compatible with React version of choice
- Use `localStorage` as a DB for the app
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.

Usage of any additional libraries, such as react-router is allowed.
## Learn More

## How to participate
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

There are 3 simple steps

1. Fork this repository
2. Complete the task in your repository
3. Create a PR to this repository

Afterwards we will contact you, please make sure you have contact details in your GitHub profile.

Tip: you can [deploy your application](https://www.freecodecamp.org/news/deploy-a-react-app-to-github-pages/) for demo on github pages for free

Happy coding 🚀
To learn React, check out the [React documentation](https://reactjs.org/).
59 changes: 59 additions & 0 deletions README.old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
The task is to create an income/expense web app. The app should have two screens. The app should be written using the technologies mentioned in the Technologies section.


## Data layer

There are two entities in the app: Category and Transaction

### Category

Represents one category of transaction. As examples of categories: Salary, Gifts, Food, Going out, Traveling. There must be pre-defined categories in the app from the beginning (3-5 is enough).

Should have following fields

- id
- label

### Transaction

Should have following fields

- id
- label
- date
- amount (negative value means expense, positive value means income)
- category (reference by category id)

## Screens

### Home

This is the default screen and app entry point. This screen should have a table of transactions and a form for adding a new transaction. Users should not be able to remove transactions. Also, on this screen, there should be a list of categories with the ability to add/remove categories. It's up to you to decide what happens to transactions in category when the category gets deleted.

### Graph(s)

This screen should have a graph or multiple graphs to represent the data. It's up to you to decide how exactly to visualize the data. To give you an example: a graph representing total spends per category.

## Technologies

- Typescript
- SCSS Modules
- React version 16.8 and up, please make sure to use Hooks
- Redux version compatible with React version of choice
- Use `localStorage` as a DB for the app

Usage of any additional libraries, such as react-router is allowed.

## How to participate

There are 3 simple steps

1. Fork this repository
2. Complete the task in your repository
3. Create a PR to this repository

Afterwards we will contact you, please make sure you have contact details in your GitHub profile.

Tip: you can [deploy your application](https://www.freecodecamp.org/news/deploy-a-react-app-to-github-pages/) for demo on github pages for free

Happy coding 🚀
Loading