Proof of concept aimed at putting into practice an e2e development cycle for an application.
Note
- 💡 Monorepo-like project in which services can be deployed and run independently.
- ❤️ Feel free to add any improvements or suggestions you consider.
- Goals
- Considerations
- Tech Stack
- Installation and running the project
- Samples
- Server side
- Tests (unit-tests and e2e)
- CI/CD - Containerization and Deployment
- Proposed follow-up work
-
Create an application that displays trending films and TV shows in two rails.
-
Integrate the The Movie DB API (TMDB) to the application.
-
Add the capability of navigating the application using the keyboard (Arrow keys).
-
Implement a CI/CD process using GitHub Actions, Docker, and a Cloud application hosting service.
To implement the solution, we are required to sign up themoviedb.org, and also integrate it to our back-end then, we will be able to use their API services. For further details, check the specs here TMDB API specs.
Please, check this consideration out.
Important
- The architecture is a mono repo-like project that uses workspaces to share type definitions among the app's tiers.
- The application can be either started locally or containerized.
- Each app tier, within the project, can be started for development independently from the others.
This conceptual test has been developed using the following technologies:
- Front-end
- Back-end
- Tests (Unit test and E2E)
- Containerization and Deployment
- Architecture
The project requires:
- Node.js 26.13.1 and npm 11.20.0
- Docker
Clone the repository:
git clone https://github.com/christianjtr/tv-app.gitScripts:
From the repository root, run npm ci once, then build the shared types before using the scripts:
npm ci
npm run build:shared-types
# Run the entire development environment for both client and server tiers
npm run dev:app
# Run dev environment for the client-side
npm run dev:client
# Run development environment for the server-side
npm run dev:server
# Run unit tests for the client-side tier
npm run test:client
# Run e2e tests for the client-side tier
npm run test:client:cy
# Run unit tests for the server-side tier
npm run test:server
# Build shared types across the application
npm run build:shared-types
# Perform docker-compose to containerize and run the application
npm run dev:docker:build-upThe tracked app/.env.local enables client-side API mocks by default. npm run dev:app starts Express too, but the client will not use it unless you run VITE_ENABLE_API_MOCK=false npm run dev:app.
The Cypress E2E script starts the client and Express API with a local fixture-backed TMDB stub; it does not require TMDB credentials.
To preview Episode ratings without the API server, run VITE_ENABLE_API_MOCK=true npm run dev:client and open /tv-app/tv-shows/1429. Select a season to see its episode titles, air dates, and ratings beside the season list; seasons with no rated episodes keep their season cards but omit the episode grid. The client fixture contains sample titles, scores, an unrated episode, and an upcoming episode.
To preview local personalization with client mocks, open Browse to choose genres and streaming services, add titles to My List from a detail page, and visit /tv-app/my-list. Preferences and the list stay in this browser only.
Environment variables:
The tracked app/.env.local supplies client development defaults. The Docker Compose helper reads app/.env and server/.env; create those files from the client defaults and server example as needed.
| Tier | Defaults/template | Compose helper input |
|---|---|---|
| client | app/.env.local (tracked defaults) |
app/.env |
| server | server/.env.example |
server/.env |
The production client is a static build, so VITE_API_BASE_URL, VITE_APP_BASE_PATH, and VITE_ENABLE_API_MOCK are build-time settings. VITE_API_BASE_URL is required and must include the backend /api prefix; the base path defaults to /. The GitHub Pages demo uses VITE_API_BASE_URL=https://tv-app-nodejs-latest.onrender.com/api, VITE_APP_BASE_PATH=/tv-app, and VITE_ENABLE_API_MOCK=false.
Click on the following link GitHub page project.
Note: The demo frontend is configured to fetch catalog data from the Render-hosted backend.
The server-side API follows the OpenAPI Specification - Version 3
The public catalog API allows up to 60 requests per client IP per minute. Search queries are limited to 200 characters; rate-limited requests return 429 with a Retry-After header. The limiter uses per-process memory; use a shared store if the API runs multiple instances.
# Enter the API's specs documentation by browsing to this URL.
<YOUR HOST>/api/docsBoth services have some examples of how to develop unit tests and e2e tests (including some mocking strategies).
-
Client-side:
- Unit testing for services, react-hooks, state-less components, and the entire sections (pages).
- E2E testing: Using Cypress. (i.e.: Navigate to the search section and look for a movie).
- Server-side:
- Unit testing for services, controllers, etc.
- E2E testing: Using SuperTest. (i.e.: Simulate a running back-end to perform requests).
flowchart LR
pr["Pull request to main"] --> checks["CI: actionlint, lint, builds, unit tests, Cypress on Chrome"]
push["Relevant code push to main"] --> checks
checks -->|main push only| pages["Publish static frontend to demo branch"]
checks -->|main push only| image["Build and push backend image"]
image --> render["Render deploys backend image"]
The production frontend is a static Vite build published to the demo branch for GitHub Pages. The Express API is bundled with esbuild, built into a Docker image, and deployed through Render.
- Production Dockerfiles account for npm workspaces and shared types.
- The frontend production image serves the static Vite build from Nginx.
- The server production image runs the esbuild bundle with pruned production dependencies on Node.js.
- Docker Compose files support local development and production builds.
- Use the tier-specific env files described above.
- Pull requests to
mainrun actionlint, client/server lint and builds, unit tests, and Cypress in Chrome. - Relevant code pushes to
mainpublish the frontend todemo, push the backend image to Docker Hub, and trigger a Render deploy for that exact SHA-tagged image. - Docker Hub credentials are provided through repository secrets.
- Set the
RENDER_DEPLOY_HOOK_URLrepository secret to the backend service's deploy hook URL in Render. Image-backed Render services do not redeploy automatically when a registry tag is pushed.
Render hosts the production API from the backend image published by GitHub Actions. The frontend demo is a static GitHub Pages site. Each successful main-branch workflow push triggers Render with the matching commit-SHA image tag.
Look at this article on how to deploy pre-built docker images on their side.
-
The GitHub Pages frontend linked above uses this Render API, which proxies TMDB catalog requests.
The dependency/action update item remains manual per ADR 0002. The Stage 3 discovery, detail-page, and personalization decisions are recorded in ADR 0003. It is a roadmap, not blanket authorization: implement one reviewed scope at a time, following ADR 0001.
- Review dependency and action versions manually; revisit automation if update volume grows.
- Keep future discovery and personalization improvements in focused, maintainer-reviewed branches.







