Skip to content

Koushith/CrediTail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation


CrediTail

Pay later but for small scale retailers

Explore the docs »

Contributors Forks Issues License

Table Of Contents

Screenshots

Dribbble shot - 1

Context

This is a reconciliation solution to distributors by enabling the salesrep to collect money against pre-populated invoices. These invoices are processed before hand, mapping it to the retailer and the salesrep

  • invoice might not be cleared by the retailer in one go, hence the same invoice might be received multiple times. In these cases, salesrep only needs to collect the pending amount on the invoice

Built With

React Native with Expo CLI, Node/Express and MongoDB

Getting Started

Prerequisites

  • Expo CLI and ExpoGO if you are running locally

Installation

  1. Clone the repo
git clone https://github.com/Koushith/CrediTail.git
  1. Install NPM packages on both the directory (Client and Server)
cd server
npm install
npm run nodemon  // by default server will run on PROT-5000
cd client
npm install
npm run web // this will run RN web

// or

npm run android  // you need to open the emulator manually and run this command(if you are on Windows and Linux.

// or USING EXPO GO

npx expo start

// open the expo app on phone and scan the QR Code.

Deployment

  • Backend is deployed on Railway. you can access the base url at https://nodejs-production-8b92.up.railway.app

DB Schemas

Invoice

- brandName - ref to Brand
- billNo - Int
- retailerId - Int
- retailerName - ref to retailer
- retailerNumber - ref to retailer
- invoiceAmount - Int
- isSettled - bool
- invoiceDate - Date
- collectionDate - Date

SalesRep

- repId : String
- repName : String

Brand

brandName: String;
brandName: String;

Retailer

retailerId: String;
retailerName: String;
retailerPhone: Number;

API Endpoints

Get all Invoices


METHOD - GET - returns all invoices.

/v1/invoices

Create New Invoice

METHOD - POST - creates new invoice

/v1/invoice

Body Data
    - brand - String
    - billNo - String
    - retailerName - String
    - inVoiceAmount - Int
    - invoiceDate - Date
    - collectionDate - Date
    - salesRepId - String
    - retailerPhone - Number
    - retailerName - String

Get Single Invoice by Invoice ID

METHOD - GET  - This will return single invoice based on billNo

v1/invoice/:id

Body data:
    - billNo

Update Invoice - Right now we only allow to send due amount and update accordingly.

METHOD - PUT  - update the invoice

v1/invoice/:id

// this api endpoint is used to update the invoice- we are allowing only invoice amount to be updated

Body Data


- dueAmount - Int

if amount is settled, we update that aswell.


Create Sales Rep.

METHOD - POST - creates a sales representative

v1/sales

Body Data

- salesRepName
- salesRepId

Create New Brand

METHOD - POST

v1/brand

Body Data

- brandName
- brandId

Create Retailer

METHOD - POST

v1/retailer

Body Data
- retailerName
- retailerId

Download the APK

License

Distributed under the MIT License. See LICENSE for more information.

Authors