Giter VIP home page Giter VIP logo

tanzeebul-tamim / pmbia-server Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 60 KB

This repository hosts the server-side codebase for the PMBIA website. Serving as the backend component of the project, it encompasses the logic, APIs, user authentication and database interactions necessary to power the website's functionality.

Home Page: https://summer-camp-school-server-ivory.vercel.app/

License: MIT License

JavaScript 100.00%
jwt mern-stack mongodb nodejs backenddevelopment restful-api javascript expressjs

pmbia-server's Introduction

Logo PMBIA - Server Side

Welcome to the server-side repository of the PMBIA (Professional Mountain Biking Instructors' Association) website. It is responsible for handling API requests and managing the database functionalities.

Table of Contents

Features

  • CRUD operations for users and items.
  • Database interactions using MongoDb.
  • Environment-based configuration.
  • Search and sort functionality for instructors and courses

Technologies Used

  • Node.js
  • Express.js
  • MongoDB
  • JSON Web Token (JWT)

Prerequisites

  • Node.js and npm installed.
  • MongoDB installed and running.

Project Structure

├── .gitignore          # Lists files for Git to ignore
├── README.md           # Project documentation
├── index.js            # Main entry point of the application
├── package.lock.json   # Exact dependency tree
├── package.json        # Project metadata and dependencies
├── vercel.json         # Vercel deployment settings

Installation

  1. Clone the repository:

    git clone https://github.com/Tanzeebul-Tamim/PMBIA-Server
    cd PMBIA-Server
  2. Install dependencies:

    npm install

Configuration

Create a .env file in the root of the server directory and add the following environment variables:

PORT=5000
DB_USER=your_db_user
DB_PASS=your_db_password
MONGODB_URI=your_mongodb_connection_string

Live Server

The server is deployed on this following URL

Running the Application

  • Start the server:
    npm start

API Endpoints

Users

  • PUT users/:email: Save user in db
  • GET users/:email: Get a single user by email

Instructors

  • GET /instructors: Get all instructors
  • GET /instructors/total: Get how many instructor accounts have been registered
  • GET /instructors/top: Get top 6 instructors & the number of their total students
  • GET /instructors/:id: Get a single instructor by ID
  • PUT /instructor/updateStudentCount: Update instructors available seat

Classes

  • GET /classes: Get all classes
  • GET /classes/total: Get the total number of classes
  • GET /classes/top: Get top 6 classes

Bookings

  • PUT /book-class: Post a booking
  • GET /book-class/:studentId: Get user bookings
  • GET /book-class/:studentId/:itemId: Get a booking
  • DELETE /book-class/:studentId/:itemId: Delete a booking
  • DELETE /booking/:studentId: Delete all bookings of a user

Payment

  • POST /create-payment-intent: Create payment intent

Also checkout PMBIA-Client

Visit the client-side repository of the PMBIA website

Contributing

Feel free to contribute by submitting a pull request. Please ensure that your code follows the project's coding standards and includes relevant tests.

License

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

pmbia-server's People

Contributors

tanzeebul-tamim avatar

Stargazers

 avatar

Watchers

 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.