Giter VIP home page Giter VIP logo

ecommerceapi's Introduction


Ecommerce API

E-commerce API built using NodeJS & MongoDB

Table of Contents
  1. Demo
  2. Key Features
  3. API Usage
  4. Deployment
  5. Build With
  6. Plans
  7. Installation
  8. Known Bugs
  9. Contributing
  10. Contact

Deployed Version

Live demo (Feel free to visit) ๐Ÿ‘‰ : E-commerce API

Key Features

  • Authentication
    • Login [Public]
    • SignUp [Public]
    • Logout [User]
    • Tokens [User]
  • Password Management
    • Change Password [User]
    • Forgot Password [Public]
    • Reset Password [Public]
  • Email Management
    • Send Email Verification [User]
  • User
    • Create New User [Admin]
    • Get All Users [Public]
    • Get User Data Using It's ID [Public]
    • Update User Details Using It's ID [User]
    • Update User Profile Image Using It's ID [User]
    • Delete My Account [User]
    • Delete User Using It's ID [Admin]
  • Cart Services
    • Add Product To Cart [User]
    • Reduce Product Quantity By One [User]
    • Increase Product Quantity By One [User]
    • Get Cart [User]
    • Delete Cart Item [User]
    • Delete Cart [User]
  • Review Services
    • Create New Review [User]
    • Query All Reviews [Public]
    • Query Review Using It's ID [Public]
    • Update Review Using It's ID [User]
    • Delete Review Using It's ID [User]
  • Product Services
    • Query products [Public]
    • Query Product Using It's ID [Public]
    • Create new product [Seller]
    • Update Product Details [Seller]
    • Update Product Main Image [Seller]
    • Update Product Images [Seller]
    • Delete Product Using It's ID [User]
    • Get Products Statics [Admin]
    • Top 5 Cheapeast Products [Public]
    • Add Product Color [Seller]
    • Add Product Size [Seller]
    • Delete Product Color [Seller]
    • Delete Product Size [Seller]
  • Favorite Services
    • Get Favorite Products List [User]
    • Add Product to Favorite List [User]
    • Delete Product From Favorite List [User]
    • Check If Product In Favorite List [User]
  • Discount Services
    • Generate Discount Code [Admin]
    • Get Dicount Amount [User]
    • Get All Discount Codes [Admin]
    • Verify Discount Code [User]
    • Delete Discount Code [Admin]
    • Cancel Discount Code [User]
  • Order Services
    • Create New Order [User]
    • Query Orders [User]
    • Query Order Using It's ID [User]
    • Cancel Order [User]
    • Update Order Status [Admin]
  • Category Services
    • Create New Category [User]
    • Query Categories [Public]
    • Query Category Using It's ID [Public]
    • Update Category Details [Admin]
    • Update Category Image [Admin]
    • Delete Category [Admin]
  • Multi-Language Support

API Usage

Check Ecommerce API Documentation for more info.

Deployment

The API is deployed with git into Heroku. Below are the steps taken:

git init
git add -A
git commit -m "Commit message"

Built With

List of any major frameworks used to build the project.

  • NodeJS - JS runtime environment
  • ExpressJS - The NodeJS framework used
  • MongoDB - NoSQL Database uses JSON-like documents with optional schemas
  • Mongoose - Object Data Modeling (ODM) library for MongoDB and NodeJS
  • Argon2 - Encryption & Decryption Algorithm
  • Cloudinary - Cloud-based service
  • Compression - NodeJS compression middleware
  • Cors - NodeJS package for providing a Connect/Express middleware that can be used to enable CORS with various options
  • Express Mongo Sanitize - Express 4.x middleware which sanitizes user-supplied data to prevent MongoDB Operator Injection.
  • Slugify - Slugifies a string
  • Datauri - Create DataURI scheme easily
  • Dotenv - Loads environment variables from a . env file into process. env
  • Rate Limiter - Basic IP rate-limiting middleware for Express
  • Helmet - Secure Express apps by setting various HTTP headers
  • JWT - Compact URL-safe means of representing claims to be transferred between two parties
  • Method Override - Use HTTP verbs such as PUT or DELETE in places where the client doesn't support it.
  • Moment - JavaScript library which helps is parsing, validating, manipulating and displaying date/time in JavaScript in a very easy way
  • Morgan - HTTP request logger middleware for NodeJS
  • Multer - NodeJS middleware for handling multipart/form-data
  • Nodemailer - Easy as cake e-mail sending from your Node.js applications
  • Validator - A library of string validators and sanitizers.
  • Winston - A logger for just about everything.
  • XSS Clean - Middleware to sanitize user input
  • Stripe - The Stripe Node library provides convenient access to the Stripe API from applications written in server-side JavaScript.
  • Swagger UI Express - Allows you to serve auto-generated swagger-ui generated API docs from express.
  • Express Locale - Express middleware to determine the locale identifier of the incomming request.
  • Node Polyglot - It provides a simple solution for interpolation and pluralization, based off of Airbnbโ€™s experience adding I18n functionality to its Backbone.js and Node apps.

Plans

  • Rewrite project with TypeScript NestJS.
  • Use Redis for caching
  • Use Elasticsearch as a search engine for products/categories
  • Use Kubernetes for Deployment
  • Use Prometheus & Grafana for monitoring
  • Use Terraform
  • Extend API's Functionality
  • Use multi-database (MongoDB - PostgreSQL)
  • Use Microservices
  • Use Sockets for handling real-time things.

Installation

You can fork the app or you can git-clone the app into your local machine. Once done that, please install all the dependencies by running

$ yarn install
set your env variables
$ yarn run start

Docker Installation

You can fork the app or you can git-clone the app into your local machine.

Note:Set the environment variables up to date and setup the database environment and also you need install docker on your local machine

$ docker-compose up -d

Known Bugs

Feel free to email me at [email protected] if you run into any issues or have questions, ideas or concerns. Please enjoy and feel free to share your opinion, constructive criticism, or comments about my work. Thank you! ๐Ÿ™‚

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Twitter - @Mahmoud03203227

Email - [email protected]

Facebook - MahmoudYasserMLE

Project: https://github.com/Braineanear/EcommerceAPI

ecommerceapi's People

Contributors

braineanear avatar ahmedalaa33 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.