How rlynx0/creatures-den works
Creature’s Den is a web application for creating and viewing items with collaborative Markdown and drawing features, alongside accounts and administration. The main user journey is to enter the app, open or create an item, edit its content, and view it; item history provides a separate drawing-history view. The graph also captures Markdown rendering and collaboration, account workflows, and administrative tools. Relationships are limited to routes and calls supported by the excerpts; several page and persistence implementations are unsampled.
Main entry points: app.rs App router and shell · main.rs HTTP server · mod.rs Markdown editor and collaboration · history.rs Drawing history
Components 26
Application and routing
- HTTP server
src/main.rs - App router and shell
src/app.rs - Home page
src/app/pages/home.rs
Items and drawing
- Create item
src/app/pages/item/create.rs - Edit item
src/app/pages/item/edit.rs - View item
src/app/pages/item/view.rs - Drawing history
src/app/pages/item/history.rs - Drawing canvas
src/app/components/drawing/mod.rs - Drawing data types
src/draw_types.rs
Markdown collaboration
- Markdown editor and collaboration
src/app/components/markdown/mod.rs - Markdown decorations
src/app/components/markdown/decorations/parse.rs - CodeMirror bridge
src-js/cm-editor.js - WebSocket reconnect
src/app/components/ws_session.rs - WebSocket handlers
src/ws.rs
Accounts and access
- Login and joining
src/app/pages/login.rs - Invite joining
src/app/pages/join.rs - Profile settings
src/app/pages/profile.rs - Authentication
src/auth.rs
Administration and storage
- Admin pages
src/app/pages/admin/mod.rs - Trusted invites
src/app/pages/admin/trusted_invites.rs - User administration
src/app/pages/admin/users.rs - SQL console
src/app/pages/admin/sql_console.rs - Database backend
src/db_backend.rs - PostgreSQL
- Blob serving
src/blob.rs
Other components
- User
Connections 29
- User → HTTP server: sends requests
- HTTP server → App router and shell: dispatches page routes
- HTTP server → WebSocket handlers: dispatches WebSockets
- HTTP server → Authentication: applies auth layer
- App router and shell → Home page: routes to
- App router and shell → Create item: routes to
- App router and shell → Edit item: routes to
- App router and shell → View item: routes to
- App router and shell → Drawing history: routes to
- App router and shell → Login and joining: routes to
- App router and shell → Invite joining: routes to
- App router and shell → Profile settings: routes to
- App router and shell → Admin pages: routes to
- Edit item → Drawing canvas: shows editor
- View item → Drawing canvas: shows drawing
- Drawing history → Drawing data types: uses drawing data
- Markdown editor and collaboration → Markdown decorations: computes decorations
- Markdown editor and collaboration → CodeMirror bridge: creates editor
- CodeMirror bridge → Markdown editor and collaboration: requests decorations
- Markdown editor and collaboration → WebSocket reconnect: manages connection
- Markdown editor and collaboration → WebSocket handlers: connects to Markdown socket
- WebSocket handlers → PostgreSQL: persists data
- Profile settings → PostgreSQL: reads and writes profile
- Drawing history → PostgreSQL: reads history
- Trusted invites → PostgreSQL: manages invite records
- User administration → PostgreSQL: manages users
- SQL console → PostgreSQL: runs SQL
- Database backend → PostgreSQL: connects to
- HTTP server → Blob serving: serves blob route