rafiksh / invoice-app-backend

A Node/Express JS back-end app for issuing invoices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invoice-app-backend

This is a Node/Express JS back-end app for issuing invoices by merchants of small businesses. The app handles registration for merchants and supports adding items and customers. Once there are items and customers, merchants can choose to generate invoices to save or send as email. Emails include a pdf of the invoice with a payment url which opens a payment portal. You can find front-end client for this app on invoice-app-client.

Usage

  • Clone or download repository
  • Go into the main app directory
  • Install dependencies by running npm install
  • Run the application using nodemon server or npm run server

Dependencies

  • Express JS for routing http sequests
  • Nodemon for automaticlly restarting server after editing.
  • Mongoose for modeling data and connecting to database.
  • BodyParser
  • ejs for validating user requests with tokens.
  • Bcrypt for generating and comparing password hashes.
  • JsonWebToken for validating user requests with tokens.
  • NodeMailer for sending invoice emails to customers.
  • Stripe for handling secure payements.
  • node-pdf-invoice for generating pdf invoices from json.

Structure

  • server.js main entry in the app. Configures express server and main routes with corresponding controllers.
  • models/ contains schema defenitions for users (merchants), customers, items, invoices and payments.
  • controllers/ contains route controller for different models. For example the userController contains routes for adding, editing, authenticating users ...
  • middleware/contains middleware functions that validate requests.
  • db/ contains configuration for Mongoose and MongoDB Atlas
  • views/ contains static files which are served for payments

About

A Node/Express JS back-end app for issuing invoices.


Languages

Language:JavaScript 77.2%Language:CSS 17.9%Language:HTML 4.9%