Skip to content

tarek99samy/ecommerce-backend

Repository files navigation

E-Commerce Backend

A Node.js (Express) backend for a multi-language e-commerce platform similar to Dubizzle. It features MySQL for data storage, JWT authentication, Redis caching, and Google Translate for multi-language support. The project includes validation with JOI, code consistency with ESLint & Prettier, and CircleCI integration for automated CI/CD deployment.

Key Features: Secure authentication with JWT Efficient caching with Redis Automated deployment via CircleCI Multi-language support with Google Translate WhatsApp OTP messaging integration

Technologies Used:

  • NodeJS (ExpressJS)
  • MySQL
  • JWT
  • Redis
  • JOI for validations
  • Google Translate
  • ESLint and Prettier for code formatting consistency
  • integrating circleCI for connection with private cloud machine to automat CI/CD process

Run for development:

  1. Make sure redis installed and running correctly
  2. Create an .env.development file having following keys:
NODE_ENV=development
PORT=8000 # or any other port
JWT_SECRET=...
DB_HOST=...
DB_PORT=...
DB_USER=...
DB_NAME=...
DB_CONNECTION_LIMIT=...
REDIS_URL=redis://localhost:6379 # or used URL
CACHE_EXPIRE_TIME=...
# i used "api.4whats.net" for WhatsApp OTP messaging 
WA_INSTANCE_ID=...
WA_TOKEN=...
UPLOADS_DIR=/[website]/uploads/ # replace [website] with your website name
  1. Clone and install dependencies
git clone https://github.com/tarek99samy/ecommerce-backend.git
cd ecommerce-backend
npm install
  1. Run script
npm run start

Run for production:

Just create another .env.production file having corresponding keys and it will be ready for deployment

About

An API for a generic E-Commerce Website

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published