# 25006675-png/island_life architecture

> Architecture diagram of the GitHub repository 25006675-png/island_life, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/25006675-png/island_life
- Repository: https://github.com/25006675-png/island_life

## Overview

Island Life turns a student’s schedule and check-ins into a shared 3D island that makes personal workload and mood visible, while keeping calendar details private. The main flow is sign-in or demo entry, schedule planning/import, activity and mood check-ins, then a rendered island and peer view; the gardener and rewards offer supportive actions. The graph includes the main domain stages and backend integrations. Some feature links are documented in the README; unsampled modules are represented only where the source index or README supports their role.

Main entry points: [`src/life.js`](https://github.com/25006675-png/island_life/blob/main/src/life.js) (Activity and Island Life), [`src/main.js`](https://github.com/25006675-png/island_life/blob/main/src/main.js) (App and Renderer), [`src/calendar.js`](https://github.com/25006675-png/island_life/blob/main/src/calendar.js) (Calendar Import UI), [`supabase/functions/google-calendar/index.ts`](https://github.com/25006675-png/island_life/blob/main/supabase/functions/google-calendar/index.ts) (Google Calendar Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and World"]
  node_app["App and Renderer<br/>[main.js]"]
  node_world["Demo World Data<br/>[world.js]"]
  node_climate["Load and Climate<br/>[climate.js]"]
  node_atmosphere["Sky and Atmosphere<br/>[atmosphere.js]"]
  node_forest["Island Forest<br/>[forest.js]"]
  node_groves["Peer Groves<br/>[groves.js]"]
end

subgraph group_planning["Schedule and Check-ins"]
  node_data["Domain Data<br/>[data.js]"]
  node_plan["Planner<br/>[plan.js]"]
  node_calendarui["Calendar Import UI<br/>[calendar.js]"]
  node_timetable["Timetable Path<br/>[timetable.js]"]
  node_readings["Personal Readings<br/>[readings.js]"]
  node_gate["Gate Check-in<br/>[gate.js]"]
  node_life["Activity and Island Life<br/>[life.js]"]
  node_fairy["Drain Check-in Fairy<br/>[fairy.js]"]
  node_flower["Mood Check-in Flower<br/>[flower.js]"]
end

subgraph group_social["Peers and Support"]
  node_photos["Golden Window Photos<br/>[photos.js]"]
  node_buddy["Friends and Bridges<br/>[buddy.js]"]
  node_gardener["Gardener Advice<br/>[index.ts]"]
  node_shop["Decor and Dewdrops<br/>[shop.js]"]
end

subgraph group_platform["Accounts and Services"]
  node_account["Account and Sign-in<br/>[account.js]"]
  node_backend["Supabase Adapter<br/>[backend.js]"]
  node_calendarfn["Google Calendar Service<br/>[index.ts]"]
  node_eventutils["Calendar Event Mapping<br/>[events.ts]"]
  node_gemini["Gemini Assistance<br/>[gemini.ts]"]
  node_supabase[("Supabase")]
end

subgraph group_assets["World Assets"]
  node_treeassets["Tree Asset Generation<br/>[ghibli_studio.py]"]
end

node_student(("Student"))
node_google["Google Calendar"]
node_geminisvc["Gemini API"]

node_student -.->|"opens"| node_app
node_app -->|"loads demo"| node_world
node_app -->|"initializes"| node_life
node_app -->|"creates sky"| node_atmosphere
node_app -->|"renders world"| node_forest
node_life -->|"reads state"| node_data
node_life -->|"uses readings"| node_readings
node_life -->|"uses dates"| node_plan
node_life -->|"loads photo"| node_photos
node_life -->|"persists actions"| node_backend
node_life -->|"uses workload"| node_climate
node_life -->|"uses peer data"| node_groves
node_calendarui -->|"reads categories"| node_data
node_calendarui -->|"reads schedule"| node_plan
node_calendarui -->|"uses timetable"| node_timetable
node_calendarui -->|"syncs calendar"| node_backend
node_timetable -->|"reads categories"| node_data
node_timetable -->|"uses gate"| node_gate
node_account -->|"uses account API"| node_backend
node_account -->|"loads sky"| node_world
node_backend -->|"reads and writes"| node_supabase
node_calendarfn -->|"maps events"| node_eventutils
node_calendarfn -->|"classifies events"| node_gemini
node_calendarfn -->|"stores sync data"| node_supabase
node_calendarfn -->|"syncs events"| node_google
node_gemini -->|"requests suggestions"| node_geminisvc
node_gardener -->|"requests advice"| node_gemini
node_gardener -->|"reads account context"| node_supabase
node_student -.->|"plans activities"| node_calendarui
node_student -.->|"checks in mood"| node_gate
node_student -.->|"rates activity drain"| node_fairy
node_student -.->|"shares moment"| node_photos
node_student -.->|"spends dewdrops"| node_shop
node_buddy -.->|"connects islands"| node_groves
node_treeassets -.->|"supplies tree assets"| node_forest

click node_app "https://github.com/25006675-png/island_life/blob/main/src/main.js"
click node_world "https://github.com/25006675-png/island_life/blob/main/src/world.js"
click node_climate "https://github.com/25006675-png/island_life/blob/main/src/climate.js"
click node_atmosphere "https://github.com/25006675-png/island_life/blob/main/src/atmosphere.js"
click node_forest "https://github.com/25006675-png/island_life/blob/main/src/forest.js"
click node_groves "https://github.com/25006675-png/island_life/blob/main/src/groves.js"
click node_data "https://github.com/25006675-png/island_life/blob/main/src/data.js"
click node_plan "https://github.com/25006675-png/island_life/blob/main/src/plan.js"
click node_calendarui "https://github.com/25006675-png/island_life/blob/main/src/calendar.js"
click node_timetable "https://github.com/25006675-png/island_life/blob/main/src/timetable.js"
click node_readings "https://github.com/25006675-png/island_life/blob/main/src/readings.js"
click node_gate "https://github.com/25006675-png/island_life/blob/main/src/gate.js"
click node_life "https://github.com/25006675-png/island_life/blob/main/src/life.js"
click node_fairy "https://github.com/25006675-png/island_life/blob/main/src/fairy.js"
click node_flower "https://github.com/25006675-png/island_life/blob/main/src/flower.js"
click node_photos "https://github.com/25006675-png/island_life/blob/main/src/photos.js"
click node_buddy "https://github.com/25006675-png/island_life/blob/main/src/buddy.js"
click node_gardener "https://github.com/25006675-png/island_life/blob/main/supabase/functions/gardener/index.ts"
click node_shop "https://github.com/25006675-png/island_life/blob/main/src/shop.js"
click node_account "https://github.com/25006675-png/island_life/blob/main/src/account.js"
click node_backend "https://github.com/25006675-png/island_life/blob/main/src/backend.js"
click node_calendarfn "https://github.com/25006675-png/island_life/blob/main/supabase/functions/google-calendar/index.ts"
click node_eventutils "https://github.com/25006675-png/island_life/blob/main/supabase/functions/_shared/events.ts"
click node_gemini "https://github.com/25006675-png/island_life/blob/main/supabase/functions/_shared/gemini.ts"
click node_treeassets "https://github.com/25006675-png/island_life/blob/main/models/trees/_common/ghibli_studio.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_world,node_climate,node_atmosphere,node_forest,node_groves toneBlue
class node_data,node_plan,node_calendarui,node_timetable,node_readings,node_gate,node_life,node_fairy,node_flower toneAmber
class node_photos,node_buddy,node_gardener,node_shop,node_geminisvc toneMint
class node_account,node_backend,node_calendarfn,node_eventutils,node_gemini,node_supabase toneRose
class node_treeassets,node_student,node_google toneIndigo
```

## Components

### Entry and World

- [App and Renderer](https://github.com/25006675-png/island_life/blob/main/src/main.js): `src/main.js`
- [Demo World Data](https://github.com/25006675-png/island_life/blob/main/src/world.js): `src/world.js`
- [Load and Climate](https://github.com/25006675-png/island_life/blob/main/src/climate.js): `src/climate.js`
- [Sky and Atmosphere](https://github.com/25006675-png/island_life/blob/main/src/atmosphere.js): `src/atmosphere.js`
- [Island Forest](https://github.com/25006675-png/island_life/blob/main/src/forest.js): `src/forest.js`
- [Peer Groves](https://github.com/25006675-png/island_life/blob/main/src/groves.js): `src/groves.js`

### Schedule and Check-ins

- [Domain Data](https://github.com/25006675-png/island_life/blob/main/src/data.js): `src/data.js`
- [Planner](https://github.com/25006675-png/island_life/blob/main/src/plan.js): `src/plan.js`
- [Calendar Import UI](https://github.com/25006675-png/island_life/blob/main/src/calendar.js): `src/calendar.js`
- [Timetable Path](https://github.com/25006675-png/island_life/blob/main/src/timetable.js): `src/timetable.js`
- [Personal Readings](https://github.com/25006675-png/island_life/blob/main/src/readings.js): `src/readings.js`
- [Gate Check-in](https://github.com/25006675-png/island_life/blob/main/src/gate.js): `src/gate.js`
- [Activity and Island Life](https://github.com/25006675-png/island_life/blob/main/src/life.js): `src/life.js`
- [Drain Check-in Fairy](https://github.com/25006675-png/island_life/blob/main/src/fairy.js): `src/fairy.js`
- [Mood Check-in Flower](https://github.com/25006675-png/island_life/blob/main/src/flower.js): `src/flower.js`

### Peers and Support

- [Golden Window Photos](https://github.com/25006675-png/island_life/blob/main/src/photos.js): `src/photos.js`
- [Friends and Bridges](https://github.com/25006675-png/island_life/blob/main/src/buddy.js): `src/buddy.js`
- [Gardener Advice](https://github.com/25006675-png/island_life/blob/main/supabase/functions/gardener/index.ts): `supabase/functions/gardener/index.ts`
- [Decor and Dewdrops](https://github.com/25006675-png/island_life/blob/main/src/shop.js): `src/shop.js`

### Accounts and Services

- [Account and Sign-in](https://github.com/25006675-png/island_life/blob/main/src/account.js): `src/account.js`
- [Supabase Adapter](https://github.com/25006675-png/island_life/blob/main/src/backend.js): `src/backend.js`
- [Google Calendar Service](https://github.com/25006675-png/island_life/blob/main/supabase/functions/google-calendar/index.ts): `supabase/functions/google-calendar/index.ts`
- [Calendar Event Mapping](https://github.com/25006675-png/island_life/blob/main/supabase/functions/_shared/events.ts): `supabase/functions/_shared/events.ts`
- [Gemini Assistance](https://github.com/25006675-png/island_life/blob/main/supabase/functions/_shared/gemini.ts): `supabase/functions/_shared/gemini.ts`
- **Supabase**

### World Assets

- [Tree Asset Generation](https://github.com/25006675-png/island_life/blob/main/models/trees/_common/ghibli_studio.py): `models/trees/_common/ghibli_studio.py`

### Other components

- **Student**
- **Google Calendar**
- **Gemini API**

## Connections

- Student → App and Renderer: opens
- App and Renderer → Demo World Data: loads demo (evidence: `src/main.js`)
- App and Renderer → Activity and Island Life: initializes (evidence: `src/main.js`)
- App and Renderer → Sky and Atmosphere: creates sky (evidence: `src/main.js`)
- App and Renderer → Island Forest: renders world (evidence: `src/main.js`)
- Activity and Island Life → Domain Data: reads state (evidence: `src/life.js`)
- Activity and Island Life → Personal Readings: uses readings (evidence: `src/life.js`)
- Activity and Island Life → Planner: uses dates (evidence: `src/life.js`)
- Activity and Island Life → Golden Window Photos: loads photo (evidence: `src/life.js`)
- Activity and Island Life → Supabase Adapter: persists actions (evidence: `src/life.js`)
- Activity and Island Life → Load and Climate: uses workload (evidence: `src/life.js`)
- Activity and Island Life → Peer Groves: uses peer data (evidence: `src/life.js`)
- Calendar Import UI → Domain Data: reads categories (evidence: `src/calendar.js`)
- Calendar Import UI → Planner: reads schedule (evidence: `src/calendar.js`)
- Calendar Import UI → Timetable Path: uses timetable (evidence: `src/calendar.js`)
- Calendar Import UI → Supabase Adapter: syncs calendar (evidence: `src/calendar.js`)
- Timetable Path → Domain Data: reads categories (evidence: `src/timetable.js`)
- Timetable Path → Gate Check-in: uses gate (evidence: `src/timetable.js`)
- Account and Sign-in → Supabase Adapter: uses account API (evidence: `src/account.js`)
- Account and Sign-in → Demo World Data: loads sky (evidence: `src/account.js`)
- Supabase Adapter → Supabase: reads and writes (evidence: `src/backend.js`)
- Google Calendar Service → Calendar Event Mapping: maps events (evidence: `supabase/functions/google-calendar/index.ts`)
- Google Calendar Service → Gemini Assistance: classifies events (evidence: `supabase/functions/google-calendar/index.ts`)
- Google Calendar Service → Supabase: stores sync data (evidence: `supabase/functions/google-calendar/index.ts`)
- Google Calendar Service → Google Calendar: syncs events (evidence: `README.md`)
- Gemini Assistance → Gemini API: requests suggestions (evidence: `supabase/functions/_shared/gemini.ts`)
- Gardener Advice → Gemini Assistance: requests advice (evidence: `supabase/functions/gardener/index.ts`)
- Gardener Advice → Supabase: reads account context (evidence: `supabase/functions/gardener/index.ts`)
- Student → Calendar Import UI: plans activities (evidence: `README.md`)
- Student → Gate Check-in: checks in mood (evidence: `README.md`)
- Student → Drain Check-in Fairy: rates activity drain (evidence: `README.md`)
- Student → Golden Window Photos: shares moment (evidence: `README.md`)
- Student → Decor and Dewdrops: spends dewdrops (evidence: `README.md`)
- Friends and Bridges → Peer Groves: connects islands (evidence: `README.md`)
- Tree Asset Generation → Island Forest: supplies tree assets (evidence: `README.md`)
