biantris / admin-analytics-api

Admin Analytics REST API

Home Page:https://admin-analytics-api-2.fly.dev/open

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Admin Analytics API

Functional Backend implementation of REST api with NodeJS(Express) MongoDB w/ Prisma and Jest Tests.

🚧 WIP 🚧

Note See Front-end project admin-analytics

Tools

Modules

  • userModedule

APIs

User
  • userCreate (POST)
  • userAuthentication (POST)
  • userGetAll (GET)
  • userGetById (GET)
  • userGetByEmail (GET)

Routes

  • open/ open route
User
  • api/user userCreate
  • api/user/auth userAuthentication
  • api/user/all userGetAll
  • api/user/:id userGetById
  • api/user/email/:email userGetByEmail

Auth Flow

  • Login
  • Validate user token
  • Validate isAdmin

Getting Started

  • Clone this repo;
  • Create a new .env file and copy the contents of .env.example into it.
# install dependencies
> yarn
# or
> yarn install

# build project
> yarn build

# start project
> yarn start

# open in
http://localhost:8080/open

πŸ”— Demo:

πŸ”— https://admin-analytics-api-2.fly.dev/open

About

Admin Analytics REST API

https://admin-analytics-api-2.fly.dev/open


Languages

Language:TypeScript 87.0%Language:JavaScript 7.7%Language:Dockerfile 5.0%Language:Shell 0.3%