How reginadiana/globoplay works
Project Type and Purpose
• This is a single-page application (SPA) frontend project built with Vue.js.
• Its sole responsibility is to fetch data from the Studio Ghibli films API, allow search and pagination, and render film cards grouped by score.
File Structure Analysis
• Top level:
• Dockerfile + docker-compose.yml – containerize & serve the app
• public/index.html – SPA host page
• src/main.js + App.vue – Vue app entrypoint & root component
• src/components/… – reusable Vue components (Header, Footer, Categories, Tabs, Explore, etc.)
• src/assets/… – static images used by various components
• src/styles/index.scss – global styles
• package.json, babel.config.js – build & dependency configs
• No backend source, so all business logic and data fetching lives in the client.
README Insights
• The app performs a fetch() to https://ghibliapi.herokuapp.com/films
• Features: search by title, list top-score films, “load more” pagination
• Responsive design, containerized with Docker
a. Browser / Client UI
• Shows App.vue as the root, containing child components (Header, Explore/Search, FilmList, Footer)
• Which components handle state (e.g., search input, current page, loaded films) vs. purely presentational
b. Static Asset Server
• In Docker: an Nginx or Node static-file server that serves index.html, JS bundles, CSS, images
• Locally: yarn dev server for hot-reload
c. Vue.js SPA
• Entry: main.js → mounts App.vue
• Component tree: App.vue → Tabs.vue, Explore.vue, Categories.vue, Category.vue, Channels.vue, Podcasts.vue, Footer.vue
• Styles: index.scss imported at the root
d. External Service
• Studio Ghibli Films API (REST endpoint)
• Request/response flow (fetch request, JSON payload)
e. Docker / Deployment
• docker-compose service “app”
• Build → container image → exposes port 3001 → maps to host
Relationships & Data Flows
• Browser → HTTP GET / → static server → index.html + JS/CSS/images → browser parses → Vue runtime loads
• Vue runtime (in-memory) executes fetch calls to the Ghibli API
• API returns JSON → Vue state updated → props flow down to presentational components → UI re-renders
• “Load more” triggers additional fetch calls
Architectural Patterns
• Component-based UI composition
• Unidirectional data flow: fetch → root state → props → child components
• Separation of concerns: styling (SCSS), assets, logic (JavaScript), markup (Vue templates)
• Containerization for consistent environment
Essential Details to Capture
• The component hierarchy under App.vue
• The SCSS stylesheet import at the root
• The Docker service build → expose → run cycle
• The “load more” pagination loop (multiple fetch calls)