How thebuggeddev/anatomy works
This repository’s main product is Anatomy Atelier, a localized interactive 3D anatomy learning experience; the README describes an underlying vinext starter rather than the application shown in the source. The user journey is locale-specific page rendering, organ exploration and learning interactions, with a 3D viewer loading models and presenting selectable hotspots. Localization and 3D rendering are the key internal layers. The README also documents optional ChatGPT sign-in and D1 support; their runtime use by the anatomy experience is not shown, so they remain separate optional capabilities.
Main entry points: page.tsx Locale page · AnatomyApp.tsx Anatomy experience · dictionaries.ts Dictionary loader · layout.tsx Locale layout
Components 20
Learning experience
- Locale page
app/[locale]/page.tsx - Anatomy experience
app/components/AnatomyApp.tsx - Anatomy content
app/lib/anatomy-data.ts
3D anatomy viewer
- Organ viewer UI
app/components/OrganViewer.tsx - 3D scene
app/lib/three/viewer.ts - Model loading
app/lib/three/loaders.ts - Hotspot layer
app/lib/three/hotspots.ts - Resource cleanup
app/lib/three/dispose.ts
Localization
- Locale layout
app/[locale]/layout.tsx - Locale configuration
app/i18n/config.ts - Dictionary loader
app/i18n/dictionaries.ts - UI translations
app/i18n/ui - Organ translations
app/i18n/organs - Localized content merge
app/i18n/merge.ts - Script fonts
app/i18n/fonts.ts
Optional platform
- ChatGPT identity
- Sign-in helpers
app/chatgpt-auth.ts - Optional D1 store
db/index.ts - Database schema
db/schema.ts
Other components
- Learner
Connections 19
- Learner → Locale page: opens locale
app/[locale]/page.tsx - Locale page → Locale configuration: validates locale
app/[locale]/page.tsx - Locale page → Dictionary loader: loads dictionary
app/[locale]/page.tsx - Locale page → Anatomy experience: renders experience
app/[locale]/page.tsx - Locale layout → Locale configuration: reads locale
app/[locale]/layout.tsx - Locale layout → Dictionary loader: loads metadata text
app/[locale]/layout.tsx - Locale layout → Script fonts: selects fonts
app/[locale]/layout.tsx - Dictionary loader → UI translations: loads translations
app/i18n/dictionaries.ts - Dictionary loader → Organ translations: loads organ text
app/i18n/dictionaries.ts - Anatomy experience → Anatomy content: reads anatomy
app/components/AnatomyApp.tsx - Anatomy experience → Organ viewer UI: renders viewer
app/components/AnatomyApp.tsx - Anatomy experience → Localized content merge: uses localized content
app/components/AnatomyApp.tsx - Organ viewer UI → 3D scene: controls scene
app/components/OrganViewer.tsx - Organ viewer UI → Localized content merge: uses hotspot types
app/components/OrganViewer.tsx - 3D scene → Model loading: loads models
app/lib/three/viewer.ts - 3D scene → Hotspot layer: manages hotspots
app/lib/three/viewer.ts - Model loading → Resource cleanup: cleans resources
app/lib/three/loaders.ts - ChatGPT identity → Sign-in helpers: provides identity
README.md - Optional D1 store → Database schema: configures ORM
db/index.ts