Pelisgo is a dark-themed movie and TV series browser built entirely with plain HTML, CSS, and vanilla JavaScript — no frameworks, no build tools, no runtime dependencies. It solves a simple problem: giving developers, students, and movie enthusiasts a minimal, readable codebase they can clone, run instantly in any browser, and extend freely. Whether you’re learning how to consume a REST API with nativeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/LuisED18/proyecto-pagina-peliculas/llms.txt
Use this file to discover all available pages before exploring further.
fetch(), building out a personal watchlist UI, or just want a fast way to browse what’s popular on TMDB right now, Pelisgo gives you a clean, functional starting point.
Key Features
Popular Movies
Browse the current TMDB popular movies list, rendered as a responsive poster-card grid with title and release year.
TV Series
Switch to the TV series catalogue with a single navigation click. The same card UI adapts automatically to series metadata.
Real-Time Search
Type in the search bar and results update live after three characters — no button press needed, no page reload.
Genre Navigation
A dropdown nav menu exposes genre categories (Acción, Terror, Comedia, and more) ready to be wired to filtered TMDB endpoints.
Architecture Overview
Pelisgo intentionally keeps its footprint as small as possible. The entire project is three HTML pages, one shared JavaScript module, and one stylesheet:| File | Role |
|---|---|
index.html | Movies page — navbar, card grid scaffold, and a <script> tag loading main.js |
series.html | TV series page — structurally identical to index.html; content differs via URL-based detection in main.js |
generos.html | Genres page — currently a placeholder file pending implementation of filtered TMDB genre endpoints |
js/main.js | Single shared module that handles all TMDB API calls, card rendering, and search events for both pages |
css/styles.css | Global stylesheet — dark theme reset, sticky header, card grid, hover effects, and responsive breakpoints |
js/main.js via a plain <script> tag with the defer attribute:
How Page Detection Works
The key to Pelisgo’s shared-module design is a two-line URL check at the top ofjs/main.js. Immediately after declaring the API constants, the script reads window.location.pathname and checks whether the string 'series' appears in it:
tipo variable ('tv' or 'movie') is then interpolated directly into every TMDB endpoint string. When a visitor is on index.html, tipo is 'movie' and the popular endpoint becomes /movie/popular. When they navigate to series.html, tipo becomes 'tv' and the same code hits /tv/popular instead:
item.title vs item.name for display titles, and item.release_date vs item.first_air_date for years:
Tech Stack
| Layer | Choice | Notes |
|---|---|---|
| Markup | Plain HTML5 | Three .html files; no templating engine |
| Styling | Plain CSS3 | One styles.css file; CSS Flexbox for layout and grid |
| Logic | Vanilla JavaScript (ES2017+) | async/await, native fetch(), DOM manipulation |
| Data | TMDB REST API v3 | https://api.themoviedb.org/3 — JSON responses, no SDK |
| Build | None | Open index.html directly in a browser |
| Dependencies | None | Zero node_modules, zero package.json |
fetch() API inside an async/await function, keeping the code concise and easy to follow:
A valid TMDB API key (v3 auth) is required to run Pelisgo. The app will silently return no results if the key is missing or invalid. Sign up for a free key at themoviedb.org — see the Quickstart for step-by-step instructions.