Skip to content

sideProject-ayush-usf created by GitHub Classroom

Notifications You must be signed in to change notification settings

usf-cs601-f19/Invoicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Invoicer -Invoicing Solution:

A web application for small business owners and freelancers needing a simple and professional invoicing solution.

Starting the project

Create a schema in your MySQL instance called invoicing Create tables from sqlQueries.sql in the same order as provided in file.

Setting up Config

In default.json in config folder in api, change the values of dbname to invoicing and host, user and password to your corresponding database hostname, usermane and password

In .env in app, replace the values of PORT, API_URL and API_PORT with Server Port, API server hostname, API server port number. dbname to invoicing and host, user and password to your corresponding database hostname, usermane and password

Download and install NodeJS from https://nodejs.org/en/download/

Testing on Dev Environment

To start the server, goto api directory in terminal and run npm install and npm run dev

To start the front-end, goto app directory in terminal and run npm install and npm run dev

Working on Production environment Environment

Install forever CLI tool for ensuring that servers are always running and create logs by running npm install -g forever

To start the server, goto api directory in terminal and run npm install and then forever start --minUptime 1000 --spinSleepTime 1000 app.js

To start the server, goto app directory in terminal and run npm install and then forever start --minUptime 1000 --spinSleepTime 1000 app.js

Working with Project

Open your browser and open page localhost:4000/ (default page) If you have changed port number in .env in app, replace 4000 in above URL with your own port

Register a user, if it is your first time working with the web application Login with the registered Username (mobile) and Password

Core features

  • Basic user login/registration flow

  • Storing new products, viewing existing ones

  • Store customer details, viewing existing customer details

  • PDF invoice generation with a unique Id, View already generated invoices

Optional Features

  • Server-side validations for required body parameters sent in the request to the server (done)
  • Bar-code generation for each invoice to easily access the invoices data later on
  • Sending invoice to the customer email via button click on the web site (Gmail API will be used)

Endpoints:

Endpoint Request Type Body Params
/register POST Registering new user name, mobile (username), password, email, company_name,company_website
/login POST Signing In new user mobile (username), password
/customer POST Create new customer name, mobile , email, company_name,company_website
/customer/{id} GET Showing a customer details Id (customer_id)
/product POST Create new product name, label , description, Rate ,msp,unique_code
/ product/{id} GET Showing a product details id (product_id)
/invoice/{user_id}/{ customer_id} GET Showing an invoice for a user and a customer user_id, customer_id

Languages & Tools

Front-end- ExpressJS / HTML5, jQuery 3, Bootstrap 3, CSS

Backend- NodeJS/ Express

Database - MySQL 8

Endpoint Testing – Postman

Libraries Used-

Font Awesome (icon) - https://fontawesome.com/v4.7.0/

Datatable - https://datatables.net/

Timeline

10/16 Milestone #1:

  • Basic user login/registration flow

  • Storing new Product, view existing ones

  • Storing new Customer, view existing ones

11/25 Milestone #2

  • PDF invoice generation against a client/ View existing invoices

  • Optional Features if time remaining

Running the API

To run the API, Goto api folder, open terminal and type npm start

Security

SQL Injection - SQL queries are escaped Server Side assert validations JWT verification

About

sideProject-ayush-usf created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published