Skip to content

Backend project featuring MongoDB connection, user authentication, and routes. Utilizes Express, Mongoose, and security measures (helmet, CORS, xss-clean). API endpoints are documented using docgen. See README for setup instructions

Notifications You must be signed in to change notification settings

IbrahimBagalwa/e-commerce-api

Repository files navigation

JOb-API

Features

  • Database Connection: Connect to MongoDB using connect.ts.
  • Environment Setup: Create .env follow .env.example.
  • Routers: Use authRoute.ts, orderRoute.ts, productRoute.ts, reviewRoute.ts and userRoute.ts for routes.
  • User Registration: Validate and hash user data, send email to validate email the account.
  • User Login: Authenticate users, generate tokens, and refresh token.
  • Mongoose Errors: Handle validation, duplicate email, validator package, and cast errors..
  • Security: Implement helmet, CORS, xss-clean, rate limiting, express-mongo-sanitize.
  • Documentation: API endpoints documented with docgen.

Getting Started

  1. Clone repository.
  2. Install dependencies: npm install.
  3. Create .env in root, follow .env.example.
  4. Start server: npm run start:dev.

Documentation

See Swagger documentation for API details here.

About

Backend project featuring MongoDB connection, user authentication, and routes. Utilizes Express, Mongoose, and security measures (helmet, CORS, xss-clean). API endpoints are documented using docgen. See README for setup instructions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages