Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Comment Automation DashboardThis project provides a web dashboard to authenticate with your Google account, view your YouTube uploaded videos and their comments, and includes a basic framework for automating replies to comments using the YouTube Data API and optionally, the Gemini API for intelligent responses.🔒 Security Best Practices for Secret KeysNEVER commit your .env file to your Git repository. Your .env file contains sensitive information like GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and SESSION_SECRET. If these are exposed, your application can be compromised.To prevent this, ensure you have a .gitignore file in your project's root directory:Create .gitignore: If you don't have one, create a file named .gitignore in the same directory as your server.js file.Add .env: Add the following line to your .gitignore file:.env node_modules/ This tells Git to ignore the .env file and the node_modules directory (which contains all your installed packages).🚀 How to Clone and Run This ProjectFollow these steps to get the project up and running on your local machine:PrerequisitesNode.js: Make sure you have Node.js (v16.x or higher recommended) and npm installed. You can download it from nodejs.org.Google Cloud Project:You need a Google Cloud Project with OAuth 2.0 Client ID credentials.Enable the YouTube Data API v3 in your Google Cloud Project.In your OAuth 2.0 Client ID settings, ensure http://localhost:3000/auth/google/callback is added as an Authorized redirect URI.optionally, enable the Gemini API if you plan to use AI-generated replies.Setup StepsClone the Repository:git clone cd Install Dependencies:npm install This will install all required packages including express, passport, passport-google-oauth20, express-session, dotenv, and node-fetch.Create .env File:Create a file named .env in the root directory of your project (the same directory as server.js). Add your Google API credentials and a session secret to this file:GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID_HERE GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET_HERE SESSION_SECRET=A_VERY_LONG_AND_RANDOM_STRING_FOR_SESSION_SECURITY

GEMINI_API_KEY=YOUR_GEMINI_API_KEY_HERE (Only if you're using Gemini outside of Canvas and need a direct API key)

Replace YOUR_GOOGLE_CLIENT_ID_HERE and YOUR_GOOGLE_CLIENT_SECRET_HERE with your actual credentials from the Google Cloud Console.Generate a strong, unique, random string for SESSION_SECRET.Run the Server:node server.js You should see a message indicating the server is running on http://localhost:3000.UsageAccess the Dashboard: Open your web browser and go to http://localhost:3000.Login with Google: Click the "Login with Google" button.Important: The first time you log in after setting up the project or changing scopes, Google will ask for your permission to access your profile, email, and YouTube data. Ensure you grant all necessary permissions for the YouTube features to work.Explore Features:Comment Automation: Enter a YouTube Video ID (from your channel) and click "Start Automation" to enable automated replies.My Videos Dashboard: Click "Go to My Videos Dashboard" to view your uploaded YouTube videos and fetch their comments.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages