Admin Analytics API

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

Fly Deploy

🚧 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