A full-stack React application that allows users to stream music, podcasts, and the audio of YouTube videos using the YouTube v3 API. Stream your favorite content seamlessly!
check it out: synapse-music
Learn how to use the project by watching this YouTube tutorial:
- Stream music and podcasts
- Extract audio from YouTube videos
- Seamless integration with YouTube's v3 API
- Full-stack setup (Frontend: React, Backend: Node.js)
- Hosted on Vercel for fast deployment
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB
- Hosting: Vercel
Before you start, make sure you have the following installed:
- Node.js v18.16.0 or later
- npm or yarn
- YouTube Data API v3 (set up and get your API key from Google Cloud Console)
- A Vercel account for hosting (optional)
-
Clone the repository:
git clone https://github.com/shivendrra/synapse.git cd synapse
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add your YouTube API key:REACT_APP_YOUTUBE_API_KEY=your_youtube_v3_api_key
-
Run the app:
npm start
The React app will be served locally at
http://localhost:3000
.
-
Navigate to the backend folder:
cd website/backend
-
Install backend dependencies:
npm install
-
Start the backend server:
npm run dev
The backend server will be running on
http://localhost:5000
.
Deploying the app to Vercel is simple:
- Sign in to Vercel and link your GitHub repository.
- Import the project.
- Vercel will automatically build and deploy your app.
The app uses YouTube v3 API to stream audio content from videos:
- To interact with the API, you can find the logic inside the
src/services/youtubeService.js
file. - The API extracts only audio from YouTube videos, making it ideal for music and podcast streaming.
├── backend
│ ├── controllers
│ ├── models
│ ├── middlewares
│ ├── routes
│ ├── base.js
│ └── index.js
├── frontend
│ ├── public
│ ├── src
│ ├── components
│ ├── services
│ ├── App.js
│ └── index.js
├── .env
├── package.json
└── README.md
For more details, check the official documentation for each framework and library used:
This project is licensed under the MIT License - see the LICENSE file for details.
This README structure provides the basics for:
- Installation: Explains how to set up both the frontend and backend.
- Tech Stack: Lists the key technologies used.
- Project Structure: Shows the overall layout.
- Embedded YouTube tutorial: The embed URL can be updated with your actual tutorial's YouTube link.
Feel free to adjust as needed!