Skip to content

Commit

Permalink
Merge branch 'typescript'
Browse files Browse the repository at this point in the history
  • Loading branch information
jurkian committed Jul 23, 2021
2 parents 9473528 + 141f79f commit 987ab05
Show file tree
Hide file tree
Showing 249 changed files with 25,966 additions and 16,693 deletions.
61 changes: 34 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
# 🏦 react-bank

Banking app built in React, Redux and Node.
Banking app built in TypeScript, React, Redux and Node.
There is also an option to use Strapi, but you would have to adjust the Front End to use it.

Demo user (automatically created when you start the app):

Login: email@example.com<br />
Password: admin123

**(Please note this app needs to be adjusted to use the new Strapi Back End)**

## What's inside?

* Login/register
* Accounts
* Transactions + new transaction
* Credit/debit cards + change PIN/limits
* Internal messages
* User profile incl. data change
* Help form
* Income change chart
* Currency stats
* Form validation, async routing
* Dummy data generator
- Login/register
- Accounts
- Transactions + new transaction
- Credit/debit cards + change PIN/limits
- Internal messages
- User profile incl. data change
- Help form
- Income change chart
- Currency stats
- Form validation, async routing
- Dummy data generator

![react-bank screenshot](screenshot.png?raw=true)

## Some details

Inspired by [Daily UI 30](https://symu.co/freebies/ui-kits-9/daily-ui-30-elements/) PSD files.<br />
Moved to HTML5/CSS3 using Avocode ([link to HTML/CSS repo](https://github.com/jurkian/daily-ui-30-html)).

Technologies:

WEB:
* React
* Redux
* React Router
* Webpack
* Sass
* Bootstrap 4
* JWT tokens
* recharts
* react-dates

- TypeScript
- React
- Redux
- React Router
- Webpack
- Sass
- Bootstrap 4
- JWT tokens
- recharts
- react-dates

API:
* Node, Express, Strapi
* JWT tokens
* Database: MongoDB, Mongoose (old API), MySQL or MariaDB (new API on Strapi)
* Fixer.io for currency rates

- Node, Express, Strapi
- JWT tokens
- Database: MongoDB, Mongoose (old API), MySQL or MariaDB (new API on Strapi)
- Fixer.io for currency rates

## How to use it?

Expand All @@ -71,12 +77,13 @@ To create an optimized build in both cases, run `npm run build` in `web` folder
## First steps with Strapi

1. When you start the app, you should create yourself an example user, like `email@example.com`/`admin123`<br />
You can also use dummy data generator by sending `POST` request to `http://localhost:1337/app/generate-dummy-data`<br />
It will create few users and for each one of them few accounts, cards, transactions, messages and stats for the income/expenses stats widget on Front End<br />
You can also use dummy data generator by sending `POST` request to `http://localhost:1337/app/generate-dummy-data`<br />
It will create few users and for each one of them few accounts, cards, transactions, messages and stats for the income/expenses stats widget on Front End<br />

2. Go to Strapi admin panel `http://localhost:1337` and set proper roles for all the endpoints your app is using, like enable generating dummy data for `Public` role. Otherwise you will see "Forbidden" every time you try to connect to the API

## How to run Strapi API on VPS using PM2?

I assume you will use Ubuntu 20.04 LTS as your system

1. Install node `sudo apt install nodejs` and npm `sudo apt install npm`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 1 addition & 10 deletions .gitignore → api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,4 @@ license.txt
exports
*.cache
build
.strapi-updater.json

############################
# Web
############################

web/**/node_modules
web/**/build
web/.env
web/src/**/*.css
.strapi-updater.json
File renamed without changes.
8 changes: 0 additions & 8 deletions api/account/models/account.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/account/services/account.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions api/card/models/card.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/card/services/card.js

This file was deleted.

3 changes: 0 additions & 3 deletions api/common/services/common.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions api/form/services/form.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/message/models/message.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/message/services/message.js

This file was deleted.

File renamed without changes.
File renamed without changes.
29 changes: 16 additions & 13 deletions package.json → api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"devDependencies": {
"@types/lodash": "^4.14.171",
"@types/node": "^16.3.2"
},
"dependencies": {
"faker": "^5.1.0",
"joi": "^17.3.0",
"faker": "^5.5.3",
"joi": "^17.4.0",
"knex": "<0.20.0",
"moment": "^2.29.1",
"mysql": "latest",
"strapi": "3.3.4",
"strapi-admin": "3.3.4",
"strapi-connector-bookshelf": "3.3.4",
"strapi-plugin-content-manager": "3.3.4",
"strapi-plugin-content-type-builder": "3.3.4",
"strapi-plugin-email": "3.3.4",
"strapi-plugin-upload": "3.3.4",
"strapi-plugin-users-permissions": "3.3.4",
"strapi-provider-email-mailgun": "^3.3.4",
"strapi-utils": "3.3.4"
"strapi": "3.6.5",
"strapi-admin": "3.6.5",
"strapi-connector-bookshelf": "3.6.5",
"strapi-plugin-content-manager": "3.6.5",
"strapi-plugin-content-type-builder": "3.6.5",
"strapi-plugin-email": "3.6.5",
"strapi-plugin-upload": "3.6.5",
"strapi-plugin-users-permissions": "3.6.5",
"strapi-provider-email-mailgun": "^3.6.5",
"strapi-utils": "3.6.5"
},
"author": {
"name": ""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions api/settings/models/settings.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/settings/services/settings.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/stats/models/stats.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/stats/services/stats.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/transfer/models/transfer.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/transfer/services/transfer.js

This file was deleted.

18 changes: 18 additions & 0 deletions api/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"paths": {
"root/*": ["./src/."],
"assets/*": ["./src/assets"],
"components/*": ["./src/components"],
"configs/*": ["./src/configs"],
"extensions/*": ["./src/extensions"],
"layouts/*": ["./src/layouts"],
"actions/*": ["./src/redux/actions"],
"reducers/*": ["./src/redux/reducers"],
"utility/*": ["./src/utility"],
"views/*": ["./src/views"],
"valids/*": ["./src/valids"],
"*": ["./src/*"]
}
}
}
31 changes: 31 additions & 0 deletions api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
],
"exclude": [
"node_modules",
"**/node_modules/*"
],
"extends": "./tsconfig.base.json"
}
Loading

0 comments on commit 987ab05

Please sign in to comment.