Podcast Manager is an app similar to Netflix, allowing users to centralize and organize different podcasts separated by categories, making it easier to navigate and access the preferred episodes. This project focuses on video podcasts.
Video podcasts.
- List podcast episodes in category sections: The app organizes episodes into categories like health, fitness, mindset, humor, and more.
- Filter episodes by podcast name: Users can search for specific podcasts and quickly find the episode they want.
The REST API will return podcast and episode data in JSON format, with the following structure:
[
{
"podcastName": "Flow",
"episodeName": "CBUM - FLOW #319",
"videoId": "sdajsdjd",
"thumbnail": "linkaleatorio.com",
"episodeLink": "linkaleatorio.com",
"category": ["health", "bodybuilder"]
},
{
"podcastName": "Flow",
"episodeName": "Random - FLOW #219",
"videoId": "dlfhjljks",
"thumbnail": "linkaleatorio.com",
"episodeLink": "linkaleatorio.com",
"category": ["running", "sports"]
}
]
-
List podcast episodes:
Route:GET /list
Returns a list of episodes organized by category. -
Filter episodes by podcast name:
Route:GET /episode
Allows filtering specific episodes from a podcast by its name.
The app processes HTTP requests and provides responses based on the following controllers and routes:
getListEpisodes(request, response)
: Responsible for returning the list of episodes.getFilterEpisodes(request, response)
: Handles filtering episodes based on search parameters like the podcast name.
The code that handles HTTP request routing can be seen below:
import * as http from "http";
import { getFilterEpisodes, getListEpisodes } from "./controllers/podcasts-controller";
import { Routes } from "./routes/routes";
import { HttpMethod } from "./utils/http-methods";
export const app = async (request: http.IncomingMessage, response: http.ServerResponse) => {
const [baseUrl, queryString] = request.url?.split("?") ?? ["", ""];
if(request.method === HttpMethod.GET && baseUrl === Routes.LIST){
await getListEpisodes(request, response);
}
if(request.method === HttpMethod.GET && baseUrl === Routes.EPISODE){
await getFilterEpisodes(request, response);
}
}
-
Clone this repository to your local machine.
-
Navigate to the project directory.
-
Install the dependencies with:
npm install
-
Start the server:
npm start:dev
-
The app will be available at
http://localhost:4444
.
This project uses the following technologies:
- Node.js: A JavaScript runtime for building scalable network applications.
- TypeScript: A superset of JavaScript that adds static types.
- TSX: A TypeScript execution environment that compiles and runs TypeScript code.
- Tsup: A zero-config TypeScript bundler.
- HTTP module (Node.js): For handling HTTP requests and responses.
- @types/node: TypeScript type definitions for Node.js.
- tsup: A fast and efficient bundler for TypeScript projects.
- tsx: A tool for running TypeScript code directly.
- typescript: TypeScript compiler and language support.
- projeto-app-podcast: The main project dependency (local).
Contributions are welcome! If you want to contribute to the development of Podcast Manager, follow these steps:
- Fork this repository.
- Create a branch for your changes.
- Submit a pull request with a description of the changes made.