How muraseryosuke/murase-dosei works
Project type and purpose
• This is a serverless, static-site web application that aggregates personal online activities into a single timeline.
• It uses GitHub Pages for hosting, GitHub Actions for automation, and a single JSON file (timeline.json) in the repo as its data store.
File structure
• Top level:
• .github/workflows/fetch.yml – scheduled CI workflow to fetch new data
• scripts/fetch_activities.js – Node script that calls external APIs and updates timeline.json
• timeline.json – the canonical timeline data stored in the repo
• index.html – the single-page frontend that reads timeline.json and renders the timeline
• package.json – project metadata, dev dependencies (e.g., for the fetch script)
• There are no backend servers or databases; everything runs as scheduled jobs and static assets.
README for additional insights
• Workflow steps: schedule → fetch from Spotify API → commit JSON → GitHub Pages deploy
• Frontend loads and groups events by date, supports infinite scroll and dark mode
• Entire stack: vanilla HTML/CSS/JS + GitHub Actions + GitHub Pages
Main components and interactions
a. External Services
• Spotify API (future: other services)
b. Automation Pipeline
• GitHub Actions scheduler (defined in fetch.yml)
• scripts/fetch_activities.js (runs under Node.js)
• Commits updated timeline.json back to the repository
c. Data Store
• timeline.json in the Git repo acts as the persistent store
d. Hosting
• GitHub Pages serves static assets (index.html + JS + CSS + timeline.json)
e. Client
• User’s browser loads index.html, fetches timeline.json, renders the UI
Relationships and data flow
1. Scheduler triggers GitHub Actions at configured intervals.
2. Action runs fetch_activities.js, which:
– Reads existing timeline.json from the repo
– Calls Spotify API, merges new activity data
– Writes back to timeline.json and commits to the repo
3. Repo changes auto-deploy to GitHub Pages.
4. End users navigate to the site; browser:
– Downloads index.html and supporting JS/CSS
– Fetches timeline.json via HTTP
– Dynamically renders grouped events with infinite scroll
Architectural patterns and principles
• Serverless / CI-driven data ingestion
• Static-site single-page application
• Git as both source control and data store
• Clear separation: automation layer vs. frontend layer