Skip to content

๐€ ๐๐จ๐๐ž.๐ฃ๐ฌ ๐ฆ๐ข๐ง๐ข-๐ฉ๐ซ๐จ๐ฃ๐ž๐œ๐ญ ๐ฎ๐ฌ๐ข๐ง๐  ๐„๐ฑ๐ฉ๐ซ๐ž๐ฌ๐ฌ.๐ฃ๐ฌ ๐š๐ง๐ ๐Œ๐จ๐ง๐ ๐จ๐ƒ๐ ๐ญ๐จ ๐Ÿ๐ž๐ญ๐œ๐ก ๐š๐ง๐ ๐๐จ๐ฐ๐ง๐ฅ๐จ๐š๐ ๐˜๐จ๐ฎ๐“๐ฎ๐›๐ž ๐ญ๐ก๐ฎ๐ฆ๐›๐ง๐š๐ข๐ฅ๐ฌ ๐š๐ง๐ ๐œ๐จ๐ฆ๐ฆ๐ฎ๐ง๐ข๐ญ๐ฒ ๐ฉ๐จ๐ฌ๐ญ๐ฌ ๐ฐ๐ข๐ญ๐ก ๐ž๐š๐ฌ๐ž.

Notifications You must be signed in to change notification settings

ashifhassandev/yt-grab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

YT-Grab

YT-Grab is a Node.js application powered by Express.js and MongoDB that allows users to effortlessly fetch and download YouTube thumbnails and community posts. Its responsive design and seamless functionality make it a handy tool for content creators.

๐Ÿš€ Features

  • Thumbnail Fetching: Retrieve high-quality thumbnails from YouTube videos.
  • Community Post Fetching: Access and view recent YouTube community posts by channel.
  • Download Functionality: Download thumbnails for offline use.
  • Error Handling: Custom 404 and internal error pages.
  • Responsive Design: Optimized for mobile and desktop users.

๐Ÿ› ๏ธ Tech Stack

Backend

  • Node.js: For server-side programming.
  • Express.js: For building RESTful APIs and managing routes.
  • MongoDB: Database for storing application data (optional).

Frontend

  • EJS: Template engine for rendering dynamic views.
  • CSS: For styling and responsive design.
  • JavaScript: Enhancing interactivity on the client side.

๐Ÿ“‚ Project Structure

yt-grab/
โ”œโ”€โ”€ config/                   # Configuration files
โ”‚   โ”œโ”€โ”€ emailConfig.js        # Email service configuration
โ”œโ”€โ”€ controllers/              # Controllers for handling routes
โ”‚   โ”œโ”€โ”€ indexControllers.js   # Main application logic
โ”œโ”€โ”€ middlewares/              # Middleware functions
โ”‚   โ”œโ”€โ”€ validateContentAccess.js  # Middleware for content validation
โ”œโ”€โ”€ public/                   # Static assets (CSS, JS, images)
โ”‚   โ”œโ”€โ”€ css/                  # CSS files for styling
โ”‚   โ”œโ”€โ”€ js/                   # JavaScript files for client-side features
โ”œโ”€โ”€ routes/                   # Route handlers
โ”‚   โ”œโ”€โ”€ indexRoutes.js        # Main route handler
โ”œโ”€โ”€ utils/                    # Utility functions
โ”‚   โ”œโ”€โ”€ communityPostUtils.js # Logic for fetching community posts
โ”‚   โ”œโ”€โ”€ emailUtils.js         # Helper functions for sending emails
โ”‚   โ”œโ”€โ”€ httpStatusCodes.js    # HTTP status code constants
โ”‚   โ”œโ”€โ”€ messageUtils.js       # Utility functions for messages
โ”œโ”€โ”€ views/                    # EJS templates for rendering pages
โ”‚   โ”œโ”€โ”€ layouts/              # Layout templates
โ”‚   โ”œโ”€โ”€ partials/             # Reusable components (header, footer, etc.)
โ”‚   โ”œโ”€โ”€ 404.ejs               # 404 error page
โ”‚   โ”œโ”€โ”€ about.ejs             # About page
โ”‚   โ”œโ”€โ”€ communityResult.ejs   # Community post result page
โ”‚   โ”œโ”€โ”€ contact.ejs           # Contact page
โ”‚   โ”œโ”€โ”€ home.ejs              # Home page
โ”‚   โ”œโ”€โ”€ internalError.ejs     # Internal server error page
โ”‚   โ”œโ”€โ”€ shortsResult.ejs      # YouTube Shorts result page
โ”‚   โ”œโ”€โ”€ thumbnailResult.ejs   # Thumbnail result page
โ”‚   โ”œโ”€โ”€ videoResult.ejs       # Video result page
โ”œโ”€โ”€ .gitignore                # Ignored files and folders for Git
โ”œโ”€โ”€ app.js                    # Main application entry point
โ”œโ”€โ”€ package.json              # Project metadata and dependencies
โ”œโ”€โ”€ package-lock.json         # Lock file for dependencies

๐Ÿ”ง Setup and Installation

Prerequisites

  • Node.js (v16+ recommended)
  • MongoDB (local or cloud instance)
  • npm (Node Package Manager)

Steps

  1. Clone the repository:

    git clone https://github.com/your-username/yt-grab.git
    cd yt-grab
  2. Install dependencies:

    npm install
  3. Set up environment variables:
    Create a .env file in the root directory and add the following:

    PORT=3000
    DB_URI=mongodb://localhost:27017/your_database_name
    SESSION_SECRET=your_session_secret
    [email protected]
    SEND_EMAIL_PASS=your_email_password
    
  4. Run the application:

    npm start
  5. Open your browser and go to:

    http://localhost:3000
    

๐Ÿ“œ Usage

  1. Fetch Thumbnails

    • Enter the YouTube video URL to retrieve and download its thumbnail.
  2. Fetch Community Posts

    • Enter the YouTube channel ID to view recent community posts.
  3. Error Handling

    • Enjoy customized error pages for a better user experience.

๐Ÿ“ˆ Learning Outcomes

  • Building RESTful APIs with Express.js.
  • Rendering dynamic views with EJS.
  • Using MongoDB for data storage and retrieval.
  • Implementing middleware for security and validation.

๐Ÿ›ก๏ธ License

This project is licensed under the MIT License. Feel free to use, modify, and distribute it as needed.

๐ŸŒŸ Acknowledgements

  • YouTube API for inspiration and open-source data.
  • Thanks to the open-source community for tools and resources.

Happy Fetching with YT-Grab! ๐ŸŽ‰

About

๐€ ๐๐จ๐๐ž.๐ฃ๐ฌ ๐ฆ๐ข๐ง๐ข-๐ฉ๐ซ๐จ๐ฃ๐ž๐œ๐ญ ๐ฎ๐ฌ๐ข๐ง๐  ๐„๐ฑ๐ฉ๐ซ๐ž๐ฌ๐ฌ.๐ฃ๐ฌ ๐š๐ง๐ ๐Œ๐จ๐ง๐ ๐จ๐ƒ๐ ๐ญ๐จ ๐Ÿ๐ž๐ญ๐œ๐ก ๐š๐ง๐ ๐๐จ๐ฐ๐ง๐ฅ๐จ๐š๐ ๐˜๐จ๐ฎ๐“๐ฎ๐›๐ž ๐ญ๐ก๐ฎ๐ฆ๐›๐ง๐š๐ข๐ฅ๐ฌ ๐š๐ง๐ ๐œ๐จ๐ฆ๐ฆ๐ฎ๐ง๐ข๐ญ๐ฒ ๐ฉ๐จ๐ฌ๐ญ๐ฌ ๐ฐ๐ข๐ญ๐ก ๐ž๐š๐ฌ๐ž.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published