/e-commerce-API

A backend API for an E-Commerce app.

Primary LanguageJavaScript

E-Commerce API Portfolio Project

Requirements

  • Build a functioning e-commerce REST API using Express, Node.js and Postgres

  • Allow users to register and log in via the API

  • Allow CRUD operations on products

  • Allow CRUD operations on user accounts

  • Allow CRUD operations on user carts

  • Allow a user to place an order

  • Allow CRUD operations on orders

  • Document the API using Swagger

How it was built

Base libraries/technologies

  • PostgreSQL - Open source object-relational database system
  • Node.js - JavaScript runtime
  • Express.js - Web application framework for Node.js

Additional libraries/technologies

  • bcrypt - Password hashing library for Node.js
  • connect-session-knex - Module for allowing express-session to use Knex to store the session in the postgres database.
  • cors - Express.js middleware for enabling CORS
  • Dotenv - Module for loading environment variables from a .env file
  • express-session - Express.js framework for managing session middleware
  • googleapis - Node.js library supporting authorization and authentication with OAuth 2.0.
  • Helmet.js - Node.js module for securing HTTP headers
  • Knex - SQL query builder for SQL based databases
  • morgan - Express.js middleware for server logging.
  • multer - Express.js middleware for uploading files.
  • Passport.js - Express.js middleware for user authentication.
  • rate-limiter-flexible - Express.js middleware for limiting requests to the server helping prevent DDOS and password brute forcing attacks.
  • Stripe - Module for processing payment intents and interacting with the Stripe API

Links

Backend may take up to a minute to respond on first page load/request due to the Render service suspending the api during periods of no use.

Use it yourself

  • User credentials:
    • Username: user
    • Password: password -Admin credentials:
    • Username: admin
    • Password: password

Author