An open API service indexing awesome lists of open source software.

https://github.com/nawodyaishan/webdev-node-express-typescript-mongo-zod-api

Application Programming Interface using NodeJs, ExpressJs, TypeScript, MongoDB and Zod
https://github.com/nawodyaishan/webdev-node-express-typescript-mongo-zod-api

api-rest backend express mongodb nodejs typescript zod

Last synced: 4 months ago
JSON representation

Application Programming Interface using NodeJs, ExpressJs, TypeScript, MongoDB and Zod

Awesome Lists containing this project

README

          

# Application Programming Interface using NodeJs, ExpressJs, TypeScript, MongoDB and Zod.

# Required Packages

### Adding Production Dependencies
npm i express zod config cors express mongoose pino pino-pretty dayjs bcrypt jsonwebtoken lodash nanoid

### Adding Dev Dependencies
npm i @types/body-parser @types/config @types/cors @types/express @types/node @types/pino @types/bcrypt @types/jsonwebtoken @types/lodash @types/nanoid ts-node-dev typescript -D

## Requirements
* A running instance of MongoDB
* Postman
* An IDE or text editor (VS Code)
* A web browser
* A package manager such as NPM or Yarn
* Node.js installed

* Testing the API with Jest
* Build a React.js user interface
* Add Prometheus metrics to the API
* Deploy the API with Caddy & Docker
* Add Google OAuth

## Concepts
* REST API principals
* CRUD
* HTTP methods
* JWT & refresh tokens
* Request validation
## Technologies
* Node.js
* MongoDB with Mongoose
* TypeScript
* Express.js & Express.js middleware
* Zod validation

## Data flow
![data-flow](https://user-images.githubusercontent.com/50957846/195396037-0e0527ca-904d-4d30-8276-0771e37c0806.png)

## Access & refresh token flow
![refresh-token-flow](https://user-images.githubusercontent.com/50957846/195396031-7f1552ee-290c-4bf4-90a5-87c0d7565cb4.png)