How ge-m-zhang/spoticast-calendar-vue works
Project Type and Purpose
• This is a single-page application (SPA) built with Vue 3 + Composition API and TypeScript.
• It visualizes podcast episode release dates (pulled from the Spotify API) in a calendar interface with rich accessibility features.
Main System Components
a. Client Browser
• Renders index.html and runs the compiled Vue app.
• Hosts user interactions: search, navigation, modal dialogs.
b. Web Server / Hosting Container
• Nginx server (Dockerized) serves static assets.
• Dockerfile + docker-compose.yml define the production container.
c. Vue Frontend Application
• src/main.ts bootstraps the app.
• App.vue is root component.
• src/components: UI elements (SearchSection, CalendarSection, modals).
• src/assets & public: CSS, env.js for runtime config.
d. State Management
e. API Layer
• src/api/spotify.ts & src/auth/getAccessToken.ts handle Spotify OAuth and REST calls (Axios).
f. Calendar Library
• FullCalendar integration (src/configs/fullcalendar.config.ts) renders events.
g. Utilities
• src/utils: keyboard navigation, formatters.
h. External Service
• Spotify Web API: search podcasts and fetch episodes.
Deployment & Dev Tooling
• Development: Vite dev server (vite.config.ts) serves the SPA with hot reload.
• Production: Build artifacts served by Nginx in a Docker container.
• Configuration injection via public/env.js (populated from environment variables in entrypoint.sh).
Relationships & Data Flows
• User → Browser UI → Vue Components → Pinia Store → API Layer → Spotify API → back to Store → Calendar Component → rendered on screen.
• On initial page load, Nginx serves the SPA.
• Env vars flow from Docker-compose/env files → entrypoint.sh → public/env.js → application at runtime.
Architectural Patterns & Design Principles
• Component-based architecture (Vue components grouped by feature).
• Unidirectional data flow: components read/write store.
• Separation of concerns:
• API logic separated in src/api and src/auth
• UI in src/components
• State in src/stores
• Configuration in src/configs
• Accessibility baked into component design (keyboard navigation util, ARIA attributes).