Skip to content

shirinmjr/express-react-bank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

Mongo Express Bank

Status GitHub Issues GitHub Pull Requests License


express-mongo-bank

Bank System Experimenting with Express and MongoDB

📝 Table of Contents

Mongo Express Bank

This is a experimental project to create a full CRUD app using the best practices and latest tech stack.

To do so, we're experimenting with a banking system and the goal is to user:

  • Create accounts(Saving and Checking) - Create
  • Create Log Record Per Transaction - Create
  • Display Account Details & Transactions History - Read
  • Deposit Funds - Update
  • Withdraw Funds - Update
  • Close an account - Delete

Setup an express project(will be moved later):

npm init -y
npm i cors express mongoose morgan nodemon chance
touch server.js //server route
touch .ignore //add node_modules

Update your Scripts block in your package.json

  "scripts": {
    "start": "node server.js",
    "dev": "nodemon server.js"
  },

For your index.html

<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src=".scripts/script.js" type="module" defer></script>
<link rel="stylesheet" href="style/style.css" />

Setup mongo db (will be moved later):

config/db file,

const mongoose = require("mongoose");

mongoose
  .connect("mongodb://127.0.0.1:27017/mongoBankExpress")
  .then(() => {
    console.log("Successfully connected to MongoDB.");
  })
  .catch((e) => {
    console.error("Connection error", e.message);
  });

const db = mongoose.connection;

module.exports = db;

Versions

⛏️ Built Using

  • MongoDB - Database
    • mongoose - Database Framework
    • nodemon
  • Express - Server Framework
  • NodeJs - Server Environment
  • CORS - Connect/Express middleware
  • Morgan - HTTP request logger middleware for node.js
  • Live Server - A Quick Development Live Server with live browser reload.

make sure you have live Server extension installed

Goals

  1. Create one user total (✓)
  2. User can create new account by selecting Create A New Account button (Saving / Checking) (✓)
  3. User can see the account number, balance and the status of the account (if it's open) (✓)
  4. Select and account takes user to the account details page (✓)
  5. Uer can deposit/withdraw and transfer to/from all of their account via cash,check (✓)
  6. User can delete their account but they need to transfer the balance before that. Balance need to be 0 before request to close an account (✓)
  7. User can see a history of transactions in their account page(reflecting account transactions). (✓)

Stretch Goals

  1. Account history gets updated as transactions happened (✓)
  2. User can transfer money from one account to another account and can see a history record on bot(to/from) accounts (✓)

Previews:

v1-data-structure v1-basic-ui homepage

🔧 V2

⛏️ Built Using

  • MongoDB - Database
    • mongoose - Database Framework
    • nodemon
  • Express - Server Framework
  • NodeJs - Server Environment
  • CORS - Connect/Express middleware
  • Morgan - HTTP request logger middleware for node.js
  • Live Server - A Quick Development Live Server with live browser reload.

make sure you have live Server extension installed

  1. User can login (Google Auth) (✓)
  2. User can login (GitHub) (✓)
  3. Migrate UI from ES6 to React (✓)
  4. There is no business logic handled in the front-end (✓)
  5. Both front-end and back-end are managed in the same repo (✓)

Stretch Goals

  1. Account history displays in pagination
  2. Account history can be searched
  3. Account history can be filtered
  4. Improve styling (mobile friendly)
  5. Run it as an expo project

Stretch Goals - it's always a nice surprise!

v1-data-structure v1-basic-ui homepage

## 🚀 Run & Deployment

Add additional notes about how to deploy this on a live system.

✍️ Authors

Shirin - Idea & Initial work

🎉 Acknowledgements

About

React app with MERN (MongoDB Express React Node)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published