pietrzakadrian / bank Goto Github PK
View Code? Open in Web Editor NEW🏦 Full Stack Web Application similar to financial software that is used in banking institutions | React.js and Node.js
License: MIT License
🏦 Full Stack Web Application similar to financial software that is used in banking institutions | React.js and Node.js
License: MIT License
Hi, After running the backend for the first time using the watch script, I am getting the following - QueryFailedError: ER_TOO_BIG_FIELDLENGTH: Column length too big for column 'accountBalanceHistory' (max = 16383); use BLOB or TEXT instead. I am running mysql Ver 8.0.20 for macos10.15.
Dotenv lets you easily load env. variables
env-var got a great validation for them, instead of parseInt
etc
Hi
Do return next();
The website is down, can you solve it?
utils.js?12fe:225 uncaught at loadCurrency Error: Objects are not valid as a React child (found: TypeError: Failed to fetch). If you meant to render a collection of children, use an array instead.
in div (created by RegisterPage)
in form (created by RegisterPage)
in span (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in RegisterPage (created by Connect(RegisterPage))
in Connect(RegisterPage) (created by withSaga(Connect(RegisterPage)))
in withSaga(Connect(RegisterPage)) (created by withReducer(withSaga(Connect(RegisterPage))))
in withReducer(withSaga(Connect(RegisterPage))) (created by Route)
in Route (created by withRouter(withReducer(withSaga(Connect(RegisterPage)))))
in withRouter(withReducer(withSaga(Connect(RegisterPage)))) (created by WithStyles(withRouter(withReducer(withSaga(Connect(RegisterPage))))))
in WithStyles(withRouter(withReducer(withSaga(Connect(RegisterPage))))) (created by LoadableComponent)
in LoadableComponent (created by Route)
in Route (created by App)
in Switch (created by App)
in App
in Router (created by ConnectedRouter)
in ConnectedRouter (created by Connect(ConnectedRouter))
in Connect(ConnectedRouter)
in SnackbarProvider
in IntlProvider (created by LanguageProvider)
in LanguageProvider (created by Connect(LanguageProvider))
in Connect(LanguageProvider)
in MuiThemeProviderOld
in Provider
Invariant Violation: Objects are not valid as a React child (found: TypeError: Failed to fetch). If you meant to render a collection of children, use an array instead.
in div (created by RegisterPage)
in form (created by RegisterPage)
in span (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in div (created by RegisterPage)
in RegisterPage (created by Connect(RegisterPage))
in Connect(RegisterPage) (created by withSaga(Connect(RegisterPage)))
in withSaga(Connect(RegisterPage)) (created by withReducer(withSaga(Connect(RegisterPage))))
in withReducer(withSaga(Connect(RegisterPage))) (created by Route)
in Route (created by withRouter(withReducer(withSaga(Connect(RegisterPage)))))
in withRouter(withReducer(withSaga(Connect(RegisterPage)))) (created by WithStyles(withRouter(withReducer(withSaga(Connect(RegisterPage))))))
in WithStyles(withRouter(withReducer(withSaga(Connect(RegisterPage))))) (created by LoadableComponent)
in LoadableComponent (created by Route)
in Route (created by App)
in Switch (created by App)
in App
in Router (created by ConnectedRouter)
in ConnectedRouter (created by Connect(ConnectedRouter))
in Connect(ConnectedRouter)
in SnackbarProvider
in IntlProvider (created by LanguageProvider)
in LanguageProvider (created by Connect(LanguageProvider))
in Connect(LanguageProvider)
in MuiThemeProviderOld
in Provider
at invariant (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:55:15)
at throwOnInvalidObjectType (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:12336:5)
at reconcileChildFibers (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:13110:7)
at reconcileChildren (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:13505:28)
at updateHostComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:13849:3)
at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14494:14)
at performUnitOfWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17014:12)
at workLoop (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17054:24)
at renderRoot (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17133:7)
at performWorkOnRoot (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17993:7)
I pulled, ran npm install then start. Tried on node 8/9 and 10. All have the same result.
I managed to get the same problem locally and when deploying to heroku.
It builds, starts but the trying to do anything breaks it.
Also how do you sign in as an admin/is there an admin control panel?
Doing res.status(500).json({...
is not a good practice, it's better to throw an exception, which will be handled by error handler - so you don't have to worry, about the proper error structure
i followed the steps and make the .env file and i got this error message
npm start > [email protected] start C:\Users\ahmed\Desktop\bank-1.1\backend > ts-node src/index.ts C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\index.ts:261 return new TSError(diagnosticText, diagnosticCodes) ^ TSError: ⨯ Unable to compile TypeScript: error TS2688: Cannot find type definition file for 'validator'. at createTSError (C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\index.ts:261:12) at getOutput (C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\index.ts:367:40) at Object.compile (C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\index.ts:558:11) at Module.m._compile (C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\index.ts:439:43) at Module._extensions..js (internal/modules/cjs/loader.js:1178:10) at Object.require.extensions. [as .ts] (C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\index.ts:442:12) at Module.load (internal/modules/cjs/loader.js:1002:32) at Function.Module._load (internal/modules/cjs/loader.js:901:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at Object. (C:\Users\ahmed\Desktop\bank-1.1\backend\node_modules\ts-node\src\bin.ts:157:12) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: ts-node src/index.ts
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Controllers should pass needed data to services, then map result for them if necessary
It's hard to read the code, because of .then hell
Consider using await
, extract to big methods to smaller ones
Hi! Nice job! :)
Do you think about use https://www.prisma.io/ for backend? All in one (many databases provider, GraphQL schema-first architecture, WS subscriptions and etc.).
Success using example: https://github.com/ian13456/mc.js
$ yarn start
yarn run v1.17.3
^
TSError: ⨯ Unable to compile TypeScript:
src/services/users.service.ts:13:27 - error TS2589: Type instantiation is excess
ively deep and possibly infinite.
13 this.userRepository = getManager().getRepository(User);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at createTSError (E:\bank\backend\node_modules\ts-node\src\index.ts:245:12)
at reportTSError (E:\bank\backend\node_modules\ts-node\src\index.ts:249:19)
at getOutput (E:\bank\backend\node_modules\ts-node\src\index.ts:362:34)
at Object.compile (E:\bank\backend\node_modules\ts-node\src\index.ts:395:32)
at Module.m._compile (E:\bank\backend\node_modules\ts-node\src\index.ts:473:
I created .env from env.example, run npm i, then run npm start. Got:
npm start
> [email protected] start /disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend
> ts-node src/index.ts
/disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend/node_modules/ts-node/src/index.ts:261
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
src/controllers/users.controller.ts(55,68): error TS2339: Property 'login' does not exist on type 'Params'.
Property 'login' does not exist on type 'string[]'.
src/controllers/users.controller.ts(108,68): error TS2339: Property 'email' does not exist on type 'Params'.
Property 'email' does not exist on type 'string[]'.
at createTSError (/disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend/node_modules/ts-node/src/index.ts:261:12)
at getOutput (/disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend/node_modules/ts-node/src/index.ts:367:40)
at Object.compile (/disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend/node_modules/ts-node/src/index.ts:558:11)
at Module.m._compile (/disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend/node_modules/ts-node/src/index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.require.extensions.(anonymous function) [as .ts] (/disk_kingstone/var/www/external/pietrzakadrian/bank/bank/backend/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `ts-node src/index.ts`
Documentation Website not Working
I need the Website so that i can set up the Server side
Thx!
For example:
todo.route.js
const router = express.Router()
router.use(
checkAuth,
checkToken,
);
router.post('/endpoint', controller.doLogic);
export const todoRouter = router;
app.js
const { todoRouter } = require('todo.route');
const app = express();
app.use('/todo', todoRouter);
This application is great, but I just wonder where can I find the default account pin and access code to login to the demo site at https://bank.pietrzakadrian.com/login
register page is not working
All functionalities responsible for pulling data from any source should be done in the proper layer - in that case, data layer. If you would switch to the different solution (for ex. mongoose/typeorm) you won't have to worry about refactoring half of the application.
export class UserRepository {
findOrThrow(userId) { }...
getUserStatus(userId) { }...
}
Getting this log from the console
error: [middlewares:genericErrorHandler.middleware] Error: {"success":false,"code":400,"error":{}}
/var/www/html/bank/server/config/db.config.js:10
max: env.pool.max,
^
TypeError: Cannot read property 'max' of undefined
at Object. (/var/www/html/bank/server/config/db.config.js:10:19)
at Module._compile (internal/modules/cjs/loader.js:738:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Module.require (internal/modules/cjs/loader.js:667:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/var/www/html/bank/server/index.js:29:12)
at Module._compile (internal/modules/cjs/loader.js:738:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at internal/main/run_main_module.js:21:11
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.