Github Demo OpenAPI Swagger Combodocs

Fully Documented and Authenticated REST API

Ecommerce API

A fully documented and authenticated backend REST nodejs and express api template that can be incorporated into any ecommerce website. It includes user accounts, email verification, routes for products, categories, payment methods, as well as addresses.

What tools it uses

NestJSMySQLRestTypeScriptNodeJSExpressOpenAPI SwaggerCombodocsTerraformAWSPassportJS

How I built it

This Ecommerce API was build in Nestjs back end framework with typescript and express. It was deployed onto an AWS ec2 instance via an automated terraform script for infrastructure as code, and was configured to be accessible publicly with a proxy from apache's httpd, as well with AWS security groups to enable ingress inbound rules for http and https. There are authorized routes that only users with sufficient privileges can access, as well as unauthenticated routes for any user. This API implement's class-validator to validate requests in order to maintain type safety and provide informative error responses. A custom logging filter was also implemented to record all api requests, as well as catch and document any exceptions. These logs can be fetched with pagination on admin routes. Finally, each route is documented with OpenAPI standard (Swagger) and the entire application is also documented with combodocs for further inline comments about the apps internal structure.