#Project: Get Youtube Subscirbers

Project Features

RESTful API

The project contains a RESTful API for getting information about YouTube channel subscribers.

Friendly

The project is well thought structured and also contains many comments to understand it easy.

Node.js and Express

The backend project is developed using Node.js and Express framework.

MongoDB

The project uses MongoDB as the database for managing the subscriber data.


README.MD

youtube link -https://youtu.be/3kREIbfjxPA?si=V7aGN-iafDqCAz6p

deployment link -https://get-subs-2.vercel.app/

🌐 AlmaBetter Backend Project

  license   nodejs   expressjs   mongodb   mongoosejs

🦸‍♂️ About

This is a straightforward backend project that includes a RESTful API designed to provide information about YouTube channel subscribers. The project is built using Node.js and Express, and it utilizes MongoDB as the database to manage subscriber data. The subscriber's data encompasses various fields, including their ID, Names, Subscribed Channels, and Subscription Date.

The API offers several endpoints

That allow users to retrieve data in JSON format. These endpoints include:

  • An endpoint that retrieves a list of all subscribers.
  • An endpoint that retrieves a list of subscriber names and their corresponding subscribed channels.
  • An endpoint that retrieves detailed information about a subscriber based on their ID.

The project also deals with error situations, as when a user reaches an unidentified endpoint or when the payload is entered incorrectly sended.

👊This project's primary goal is to serve as a foundation for developing a more extensive application.

GetYoutubeSubscribers

Table of Contents

Major Technologies

  • NodeJs
  • Mongoose
  • ExpressJs

Structure

├───public
├───resources
└───src
    ├───database
    ├───models
    └───views

Api Endpoints

To ensure convenience, we will be using the placeholder protocol://domain.tld/ as the host URL in the documentation and comments. Please replace it with your actual host URL, such as http://localhost:5000/, in the subsequent steps of the documentation.

Home page

This endpoints will render our beautiful home page.

# Endpoint
GET     protocol://domain.tld/
# Try Your Self
$ curl -X GET protocol://domain.tld/

home-page

Subscribers

This endpoint retrieves an array of all subscribers from the database.

# Endpoint
GET     protocol://domain.tld/subscribers
# Try Your Self
$ curl -X GET protocol://domain.tld/subscribers

subscribers

Subscriber Names

This api endpoint retrieves an array of subscribers with only two fields: their name and subscribed channel.

# Endpoint
GET     protocol://domain.tld/subscribers/names
# Try Your Self
$ curl -X GET protocol://domain.tld/subscribers/names

subscriber-names

Subscriber By Id

This api endpoint returns the details of the subscriber whose ID is provided in the endpoint.

# Endpoint
GET     protocol://domain.tld/subscribers/:id
# Try Your Self
$ curl -X GET protocol://domain.tld/subscribers/:id

subscriber-byid

Fallback Endpoint

This endpoint returns an error since we cannot find any matching route with the request.

# Endpoint
ANY     protocol://domain.tld/{ANY-PATH-WHICH-DOES-NOT-MATCH-WITH-ABOVE-ENDPOINTS}
# Try Your Self
$ curl -X GET protocol://domain.tld/{ANY-PATH-WHICH-DOES-NOT-MATCH-WITH-ABOVE-ENDPOINTS}

fallback

Getting Started 🎉

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Hardware requirements

Minimal (dependent on Npm, NodeJs)

System Requirements

Ensure your system meets the following requirements:

PACKAGE WHY REQUIRED? SITE
NPM Installing npm packages LINK
NODE Running Nodejs LINK
ExpressJs Web application framework LINK
MongoDB Storing databases LINK
Mongoose schema-based solution to model LINK

💡Prerequisites

We recommend that you have a basic understanding of Node.js

Installation
Clone Repo
# Clone the repository
$ git clone https://github.com/Priyanshunegi5/get-subs.git
$ cd get-subs
Prepare Env
# Update env file
$ cp .env.example .env

# Update env file According to comments
$ nvim .env
Prepare Dev Server
# Install dependency
$ npm install

# Seed database with sample documents
$ node src/createDatabase.js

# Run the dev server
$ npm run dev-start

Repository Branches

  • master -> any pull request of changes this branch
  • main -> don´t modify, this is what is running in production

Top Contributors

GitHub Contributors Image

Contributions

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.

Pull Requests
  1. Fork the repo and create your branch:
    #[type]/PR description
  2. Ensure to describe your pull request:
    Edit the PR title by adding a semantic prefix like Added, Updated:, Fixed: etc.
    Title:
    #[issue] PR title -> #90 Fixed styles the button

Code of Conduct

In order to ensure that the GetYoutubeSubscribers community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within GetYoutubeSubscribers, please send an e-mail to Raman Verma via e-mail.
All security vulnerabilities will be promptly addressed.

License

The GetYoutubeSubscribers is open-sourced software licensed under the MIT License


Help/Support

In case you have any questions that are beyond the scope of the included help file, please feel free to email me via my @email