How ericjchang/entertainme-nodejs works
Project type and purpose
• This is a full-stack, containerized web app that shows movie and TV series lists.
• It employs a microservices architecture with an Apollo GraphQL gateway (orchestrator), two REST microservices (movies, tv_series), a Redis cache, and MongoDB data stores.
• The React frontend queries the GraphQL layer, which aggregates data from the underlying services.
File structure
• Top level:
• docker-compose.yml – brings up all services and supporting containers (MongoDB, Redis).
• client/ – React single-page app, organized by components, pages, and GraphQL queries.
• server/
– express/ – a standalone Express REST API (entertainme.js, movie.js, tv.js) – seems to be an older or alternative REST layer.
– orchestrator/ – Apollo Server app that loads movieSchema.js and tvSeriesSchema.js to create a GraphQL gateway.
– services/ – two Dockerized microservices:
• movies/ – Express + Mongoose service exposing REST endpoints, connects to MongoDB and (optionally) Redis caching.
• tv_series/ – same structure for TV series data.
README
• Tech stack: React, Express, Apollo GraphQL, MongoDB, Redis, Docker.
• Architecture goals: Microservices + caching for faster data communication.
Detail
• Environment boundaries (e.g., separate containers or host network).
• How docker-compose wires services together.
• Don’t forget cross-service concerns like error handling, retries, or circuit breaking if implemented.