Skip to content

Course Online Shop Backend is a RESTful API for an e-commerce platform specializing in online courses. Built with Node.js, Express, MongoDB and JWT.

License

Notifications You must be signed in to change notification settings

Sina-Ghiasi/course-online-shop-backend

Repository files navigation

Course Online Shop Backend 🛠️

GitHub Stars GitHub Issues GitHub License GitHub Repo Size GitHub code size in bytes GitHub Last Commit Express MongoDB

Welcome to the Course Online Shop Backend repository! This project serves as the backbone of the Course Online Shop, handling data management, user authentication, and course transactions. 🚀

Table of Contents

📖 Overview

The backend provides a robust API for the Course Online Shop, enabling the frontend to perform CRUD operations, manage user sessions, and process payments. It is built with scalability and security in mind.

🛠️ Technologies Used

  • Node.js 🟢
  • Express.js 🌐
  • MongoDB 🍃
  • JWT for authentication 🔒

🚀 Getting Started

Follow these steps to set up the backend locally:

Prerequisites

  • Node.js (v16 or higher) 📦
  • MongoDB (local or cloud instance) 🗄️
  • npm or Yarn 🧶

Installation

  1. Clone the repository:

    git clone https://github.com/Sina-Ghiasi/course-online-shop-backend.git
  2. Navigate to the project directory:

    cd course-online-shop-backend
  3. Install dependencies:

    npm install
  4. Create a .env file in the root directory and configure the following environment variables:

    PORT=5000
    MONGO_DB_URI=mongodb://localhost:27017/course-shop
    JWT_ACCESS_TOKEN_SECRET=your_jwt_access_secret
    JWT_ACCESS_EXPIRES_IN=1h
    JWT_OTP_TOKEN_SECRET=your_jwt_otp_secret
    JWT_OTP_EXPIRES_IN=10m
    JWT_RESET_PASS_TOKEN_SECRET=your_jwt_reset_pass_secret
    JWT_RESET_PASS_EXPIRES_IN=15m
    KAVEEGAR_API_KEY=your_kaveegar_api_key
    KAVEEGAR_API_TEMPLATE=your_kaveegar_template
    SPOT_PLAYER_API=your_spot_player_api_key
  5. Start the server:

    npm start

The API should now be running at http://localhost:5000. 🎉

🔗 Related Repositories

This backend powers the API for the frontend application. Check out the related repository:

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository 🍴
  2. Create a new branch:
    git checkout -b feature/your-feature
  3. Commit your changes:
    git commit -m "Add your feature"
  4. Push to the branch:
    git push origin feature/your-feature
  5. Open a Pull Request 📬

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Course Online Shop Backend is a RESTful API for an e-commerce platform specializing in online courses. Built with Node.js, Express, MongoDB and JWT.

Topics

Resources

License

Stars

Watchers

Forks