https://github.com/biantris/admin-analytics-api
Admin Analytics REST API
https://github.com/biantris/admin-analytics-api
Last synced: 10 months ago
JSON representation
Admin Analytics REST API
- Host: GitHub
- URL: https://github.com/biantris/admin-analytics-api
- Owner: biantris
- Created: 2023-03-04T18:50:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-23T01:17:17.000Z (over 2 years ago)
- Last Synced: 2025-04-05T17:11:09.593Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://admin-analytics-api-2.fly.dev/open
- Size: 848 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
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](https://github.com/biantris/admin-analytics)
### Tools
- [x] [TypeScript](https://www.typescriptlang.org/)
- [x] [Node](https://nodejs.org/en/)
- [x] [ExpressJS](https://expressjs.com/)
- [x] [MongoDB](https://www.mongodb.com/)
- [x] [Prisma](https://www.prisma.io/)
- [x] [Jest](https://jestjs.io/)
- [x] [Supertest](https://github.com/ladjs/supertest)
- [x] [Eslint](https://eslint.org/)
- [x] [Prettier](https://prettier.io/)
- [x] [Fly.io](https://fly.io/) (Deploy)
### Modules
- [x] userModedule
#### APIs
##### User
- [x] userCreate (POST)
- [x] userAuthentication (POST)
- [x] userGetAll (GET)
- [x] userGetById (GET)
- [x] 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
- [x] Login
- [x] Validate user token
- [x] Validate isAdmin
### Getting Started
- Clone this repo;
- Create a new `.env` file and copy the contents of `.env.example` into it.
```sh
# 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