GithubHelp home page GithubHelp logo

accountingsoftware's People

Contributors

10abhi98 avatar ajstinger98 avatar amitsingh19975 avatar amsiddiqui avatar asrninaad avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

accountingsoftware's Issues

Database Routes for Report Page

Invoice Report

/invoice/
request = {
accessToken:
token:
fromMonth:
toMonth:
}

response = {
invoices: [{
clientID:
id: 1,
date: '22/11/2019',
amountDue: 200,
total: 270,
amountPaid: 50,
balanceDue: 220,
notes: 'shopping done on 22nd of November'
},]
}

Expense Routes

/expense/
request = {
accessToken:
token:
fromMonth:
toMonth:
}

response = {
expense : //array of all expense object
}

Client Report

/client/
request = {
accessToken:
token:
fromMonth:
toMonth:
}

response = {
client: //array of all client
}

Set up basic layout of all the pages

Pages:

  • Login page /login

  • Signup page /signup

  • Dashboard /dashboard

  • Company create page /company/create

  • Company edit page /company/edit

  • Company/Accountant create page /company/accountant/create

  • Company/Accountant edit page /company/accountant/edit

  • Client show page /clients

  • Client create page /clients/create

  • Client edit page /clients/edit

  • Expense show page /expenses

  • Expense create page /expenses/create

  • Expense Edit page /expenses/edit

  • Report query page /report/request

  • Report show page /report

  • Vendor show page /vendor

  • Vendor create page /vendor/create

  • Vendor edit page /vendor/edit

Create logout route for database

Create /auth/logout route on database server.

Specifications

Method: Post

Request

accessToken: String
userToken: String

Response

status: number (click here for reference)
err: String

Conditions

if accessToken doesn't matches: Authorisation error
if userToken not exist in session: Invalid request error (user not logged in)
if userToken doesn't matches in session: Invalid userToken error

Report Database Route for Profit

Profit

/report/profit

request = {
startMonth:
endMonth:
}

Note: startMonth is given relative to current month. For example if current month is 11 and startMonth = 5 then absolute startMonth = 6 ("June"). Same way endMonth is also given relative to currentMonth. Eg: endMonth = 2, then absolute endMonth = 9 ("September"). If currentMonth - startMonth is negative, cycle back to previous year month.

response = {
profit: []
}
profit: array contains integer values for each month according to following calculations.
profit = sum of all invoice.total - sum of expense.amount for a month.

Create Database init route.

Create /init route on database server.

Specifications

Method: Post

Request

clientId: String
secret: String

Response

status: number (click here for reference)
accessToken: String (encrypted),
data: {
lastClientId:
lastExpenseId:
lastInvoiceId:
lastVendorId:
}
err: String

Token generation

clientId + currentTime

Conditions

if client doesn't exists create new token.
if client already exists and

  • secret matches: create new token and send

  • secret doesn't matches: authentication error

Create a route for utility database

Create /util/<data_type> route on database server.

Specifications

Method: Post

Request

accessToken: String

Response

status: number (click here for reference)
<data_type>* : Object
err: String

Available <data_type>

  • /util/country
  • /util/quote
  • /util/currency
  • /util/phone_code
  • /util/datefmt

Conditions

if accessToken doesn't matches: Authorisation error

Report Route for database for Unbilled times

Overdue

/report/overdue

request = {
startMonth:
endMonth:
quantity: // number
}

Note: startMonth is given relative to current month. For example if current month is 11 and startMonth = 5 then absolute startMonth = 6 ("June"). Same way endMonth is also given relative to currentMonth. Eg: endMonth = 2, then absolute endMonth = 9 ("September"). If currentMonth - startMonth is negative, cycle back to previous year month.

Note: quantity is number of clients returned in response ordered by sum of invoice.balanceDue if overdue* associated with them.
*overdue is if (currentDate - invoice.date (in days) > client.dayLimit)

response = {
expense: [
{client: // name of client
due: // sum of invoice.blanceDue if overdue
days: // currentDate - invoice.date - client.dayLimit (in days)
}
],
totalOverdue: // sum of all invoice.blanceDue of all clients if overdue in the requested time frame
}

Auth route for Accountant

Auth route

/auth/accountant/exists

request {
accessToken:
email: // email of accountant
}

response {
exists: boolean
}

Report Database route for Revenue stream

Revenue Stream

/report/revenue

request = {
startMonth:
endMonth:
quantity: // number
}

Note: startMonth is given relative to current month. For example if current month is 11 and startMonth = 5 then absolute startMonth = 6 ("June"). Same way endMonth is also given relative to currentMonth. Eg: endMonth = 2, then absolute endMonth = 9 ("September"). If currentMonth - startMonth is negative, cycle back to previous year month.

Note: quantity is number of clients returned in response ordered by sum of invoice.balanceDue associated with them.

response = {
revenue: [
{client: // name of client
revenue: // sum of invoice.blanceDue in that time frame
}
],
totalRevenue: // sum of all invoice.balanceDue of all clients in the requested time frame
}

Create authorisation login route for database

Create /auth/login route on database server.

Specifications

Method: Post

Request

accessToken: String
email: String
password: String (plain text)

Response

status: number (click here for reference)
user: Object (of type User)**
err: String

** user format
{
name: "",
email: "",
company: //complete company data
token: ""
}

Token generation

user.email + currentTime

Conditions

if accessToken doesn't matches: Authorisation error
if user exists: send details and token
if user doesn't exist: Invalid email address error
if user exist and password doesn't match: Invalid password error

Category Database route.

Category Creation

/category/create

request: {
category: // string value
}

response: {
// success or failure
}

Category fetch

/category

request = {
}

response = {
categories: [] // array of all categories name only
}

Create company create route in database

Create /auth/signup route on database server.

Specifications

Method: Post

Request

accessToken: String
company: Object (type company)
Company object specification

{
company: {     
name:
countryCode:
phone:
email:
address: {}
currency: 
datefmt:
taxrate:
accountants: ['Head', 'Client', 'Expense', 'General']
profilesCreated: // length of accountants array 
}
headAcc: {
// Details of Head accountant including password
}
clientAcc: {
}
expenseAcc: {
}
generalAcc: {

}
}

headAcc: {
accountantType: 'Head'
firstName:
lastName:
countryCode:
phone:
email:
address: {
address1:
city:
state:
country:
pincode:
},
password:
}

Note: headAcc, clientAcc etc will only be present if included in accountants array inside company

Response

status: number (click here for reference)
token: String (encrypted) (for Head Accountant)
err: String

Token generation

headAccountant.email + currentTime

Conditions

if accessToken doesn't matches: Authorisation error
if userToken already exist: user already logged in error
if any data already present in database: Already present error

Set up django mysql setting using django-environ

Instead of hard coding MySQL settings provide setting value through environment variable loaded from .env file in root folder. Django-environ should be used to load environment variables from .env file located in root folder and setting values supplied to settings

Client Database routes.

Creation

/client/create

request = {
client: {
firstName:
lastName:
countryCode:
phone:
email:
address: {},
lateFeeRate:
dayLimit:
}
}

response: {
// Success or failure
}

Fetch route

/client/latest

request: {
accessToken:
token:
quantity: // Number of last clients
}

NOTE: Send latest quantity number of clients

response: {
clients: [
// array of clients
]
}

/client/:id

NOTE client should be returned with id as specified in url
request = {
months: // Latest time frame for which invoices are to be send. Num between (1-12)
}

response = {
client : {
// All client information
invoices: [] // array of invoices for last 'months' months as requested
}
}

Update route

/client/:id/update

request = {
client: {
firstName:
lastName:
countryCode:
phone:
email:
address: {},
lateFeeRate:
dayLimit:
}
}

response = {
// Success or failure
}

Delete Route

/client/delete

request: {
accessToken:
token:
clients: [2, 3, 5] // array containing all the ids of clients to be deleted
}

response: {
// success or failure
}

Vendor creation route

Create route

/vendor/create

request : {
accessToken:
token:
vendor: {
name:
email:
phone:
address: {}
}
}

Fetch route

/vendor

request: {
accessToken:
token:
}

NOTE: send all vendor names only

respone: {
vendors: [] // array of vendor names only
}

Report Database route for Revenue

Outstanding Revenue

/report/outstandingRevenue

request = {
startMonth:
endMonth:
}

Note: startMonth is given relative to current month. For example if current month is 11 and startMonth = 5 then absolute startMonth = 6 ("June"). Same way endMonth is also given relative to currentMonth. Eg: endMonth = 2, then absolute endMonth = 9 ("September"). If currentMonth - startMonth is negative, cycle back to previous year month.

response: {
revenue: // Total revenue calculated
}

**Calculations: **
Total of invoice.balaceDue for number of months passed in request

Overdue

/report/overdue

request = {
startMonth:
endMonth:
}

response: {
overdue: // Total overdue calculated
}

Calculations:
Total of invoice.balanceDue if currentDate - invoice.date (in days) > invoice.client.dayLimit

Auth exists routes for Company

Auth route

/auth/company/exists

request: {
name: // company name
phone: // company phone
email: // company email
accessToken: // accessToken
}

response: {
nameExists: boolean
phoneExists: boolean
emailExists: boolean
}

Report Database route for expense

Expenses

/report/expense

request = {
startMonth:
endMonth:
quantity: // number
}

Note: startMonth is given relative to current month. For example if current month is 11 and startMonth = 5 then absolute startMonth = 6 ("June"). Same way endMonth is also given relative to currentMonth. Eg: endMonth = 2, then absolute endMonth = 9 ("September"). If currentMonth - startMonth is negative, cycle back to previous year month.

Note: quantity is number of vendors returned in response ordered by sum of expense.amount associated with them.

response = {
expense: [
{vendor: // name of vendor
expense: // sum of expense.amount in that time frame
}
],
totalExpense: // sum of all expense.amount of all vendors in the requested time frame
}

Expense Database route

Creation

/expense/create

request = {
expense: {
category:
date: // date of expense
vendor:
description:
amount:
},
datefmt:
}

response: {
// Success or failure
}

Fetch route

/expense/latest

request: {
accessToken:
token:
quantity: // Number of last expense
}

NOTE: Send latest quantity number of expenses

response: {
expenses: [
// array of expenses
]
}

/expense/:id

NOTE expense should be returned with id as specified in url
request = {

}

response = {
expense : {
// All expense details
}
}

Update route

/expense/:id/update

request = {
expense: {
category:
date: // date of expense
vendor:
Description:
amount:
},
datefmt:
}
}

response = {
// Success or failure
}

Delete Route

/expense/delete

request: {
accessToken:
token:
clients: [2, 3, 5] // array containing all the ids of expenses to be deleted
}

response: {
// success or failure
}

Invoice Database routes

Create route

/invoice/create

request: {
accessToken:
token:

invoice:
{
id: invoiceId,
clientId: 
date:
amountDue:
amountPaid:
total: 
balanceDue:
items: [
{
item: 
description:
rate:
quantity:
price:
},

],
notes
},
datefmt: // Date format

}

response: {
// success or failure
}

Fetch route

/invoice/:id

request {
accessToken:
token:
}

NOTE: Sends invoice with given id
response: {

invoice: {
client: {
// complete client details
},
// complete invoice details
}

}

/invoice/latest

request: {
accessToken:
token:
quantity: // Number of last invoices
}

NOTE: Send latest quantity number of invoices

response: {
invoices: [
// array of invoices
]
}

Delete route

/invoice/delete

request: {
accessToken:
token:
invoices: [2, 3, 5] // array containing all the ids of invoices to be deleted
}

response: {
// success or failure
}

Class Diagram

  • Identify Classes
  • Identify Associations
  • Make abstractions
  • Complete UML

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.