Skip to content

asifgenius/analytic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecommerce api with express

Features

  • Calculate total sales over time
  • Calculate sales growth rate over time
  • Calculate new customers added over time
  • Calculate number of repeat customers
  • Calculate geographical distribution of customers
  • Calculate customer lifetime value by cohorts

Tech

  • Express JS
  • React JS
  • Mongo DB

Installation

Node Server

Install the dependencies and devDependencies.

$ npm i

Run the Server Project.

$ npm start

Verify the deployment to your server address in your browser.

$ 127.0.0.1:5000

React App

Install the dependencies and devDependencies.

$ npm i

Run the Frontend Project.

$ npm start

Verify the deployment to your server address in your browser.

$ 127.0.0.1:3000

Endpoints

GET /api/v1/customers/analytics/new-customers-over-time?interval=monthly
GET /api/v1/customers/analytics/geographical
GET /api/v1/orders/analytics/growth?interval=daily
GET /api/v1/orders/analytics/sales?interval=daily
GET /api/v1/orders/analytics/repeat-customers?interval=daily
GET /api/v1/orders/analytics/life-time

Status Code

Status Code Description
200 OK
201 CREATE
400 BAD REQUEST
404 NOT FOUND
500 INTERNAL SERVER ERROR

Sceenshot

Alt text Alt text

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published