This project is a podcast player built using the Podcast Index API and a Node.js server, deployed on Render. The player allows users to search for podcasts, browse episodes, and play audio directly in the browser.
- Search Podcasts: Find podcasts by title, author, or keyword using the Podcast Index API.
- Browse Episodes: View episodes of selected podcasts with details like title, description, and duration.
- Audio Playback: Listen to podcast episodes directly within the app with controls to play, pause, and skip.
- Persistent State: Save and load playback state, including the current episode, progress, and queue, using local storage.
- Favorites: Mark podcasts as favorites; favorites are saved in local storage and shown on app startup.
- Progressive Web App (PWA): Installable on supported devices for offline use.
- Lazy Loading: Efficiently loads podcast images and episode details as you scroll.
-
Clone the repository:
git clone https://github.com/JacintoDesign/podcast-player.git
-
Navigation to the project directory:
cd podcast-player -
Install dependencies
npm install
-
Sign up for your own API Key & Secret at Podcast Index, then create your own .env file in the root folder and add the following:
AUTH_KEY='your_api_key' SECRET_KEY='your_api_secret' USER_AGENT='Your_app_name' API_ENDPOINT='https://api.podcastindex.org/api/1.0'
- Start the server:
npm start
The app will be available at http://localhost:3000.
This repo is set up to run on Vercel using Serverless Functions for the API and static hosting for the frontend.
- Push your code to GitHub.
- Create a new Vercel project and import this repository.
- In Vercel Project Settings → Environment Variables, add:
AUTH_KEYSECRET_KEYUSER_AGENTAPI_ENDPOINT(e.g.https://api.podcastindex.org/api/1.0)
- Deploy. The frontend is served from
public/and the API endpoints are:/api/search?q=.../api/episodes?feedId=...&max=...
Notes:
vercel.jsonrewrites map/, static assets (CSS/JS/images),manifest.json, andservice-worker.jsto thepublic/folder.- The serverless functions in
api/handle Podcast Index authentication and requests.
This project can also run on Render via the Express server in server.js.
- Fork and connect the repo to Render.
- Set the same environment variables as above.
- Use
node server.jsas the start command.
- Search: Enter a keyword to search for podcasts.
- Browse: Click on a podcast to view its episodes.
- Play: Select an episode to start listening.
- Queue: Manage your episode queue and save your progress.
- Favorites: Click the star on a podcast card to add/remove it from your favorites. Favorited podcasts appear in the main list when you open the app.
- Node.js: Backend server
- Express: Web framework for Node.js
- Podcast Index API: Podcast search and episode retrieval
- Render: Deployment platform
- JavaScript: Frontend functionality
- HTML & CSS: User interface
- Local Storage: Persistent state management
- Podcast Index for providing the podcast data.
- Render for hosting and deployment.
- Podcast Icon Podcast icons created by Flat Icons - Flaticon