Odessa / The Hive — Prototype Reference
Complete inventory of the Odessa prototype app, an earlier iteration of HiveJournal built on Next.js 15 + Clerk + Firebase + Drizzle ORM. Located at
/Users/sandonjurowski/Library/Mobile Documents/com~apple~CloudDocs/Desktop/_CLOUDONLY-SilverLamp/odessa-1/. Preserved as a reference for concepts and components that could be ported to HiveJournal 2026.Status: Archived prototype. Not running in production. Many concepts have already been shipped in different forms in HiveJournal 2026 (drops currency, journal entries, streak tracking, gamification). Others (levels/atoms, zen space, hex grid social structure, insect visitors, voice interface) remain unported and could inform future features.
Tech stack
| Layer | Technology |
|---|---|
| Framework | Next.js 15.2.4 (App Router) |
| UI | React 18.2.0 + Tailwind CSS 4 + Headless UI + Heroicons + Lucide |
| Auth | Clerk (user management) + Firebase (backend services) |
| Database ORM | Drizzle ORM 0.41.0 |
| Database clients | PostgreSQL (pg), LibSQL (@libsql/client), Neon Serverless |
| Forms | react-hook-form + zod |
| Styling utils | class-variance-authority, clsx, tailwind-merge |
| Dates | date-fns 4.1.0 |
| Webhooks | Svix 1.62.0 |
App structure
Authentication routes ((auth) group)
| Route | Purpose |
|---|---|
/sign-in/[[...sign-in]] | Clerk sign-in |
/sign-in/sso-callback | SSO callback |
/sign-up/[[...sign-up]] | Clerk sign-up |
/sign-up/sso-callback | SSO callback |
Dashboard routes ((dashboard) group)
| Route | Purpose | Key components |
|---|---|---|
/dashboard | Main dashboard | — |
/tasks | Task management | TaskList with filtering, creation, editing |
/levels | Personal metrics tracking | Energy, focus, sleep, stress meters with targets |
/journal | Journal entries | Mood tracking (1-10), tagging, privacy controls, AI insights |
/zen | Mindfulness practices | Meditation, breathing, focus, sound activities with timer |
/stream | Activity stream/feed | Check-ins, level updates, atom usage, Unsplash backgrounds, insect visitors |
/hive | Social community | Tabs: Community, Challenges, Users. Battle system, teams, posts |
/profile | User profile | — |
/settings | User settings | — |
API routes
| Endpoint | Methods | Description |
|---|---|---|
/api/tasks | GET, POST | List/create tasks with status/priority/tag filters |
/api/tasks/[id] | GET, PUT, DELETE | Individual task operations |
/api/tasks/early-buzz | GET | Early buzz tier features |
/api/levels | GET, POST | Level management (energy, focus, sleep, stress) |
/api/levels/[id] | GET, PUT, DELETE | Individual level operations |
/api/atoms | GET, POST | Intervention/atom management |
/api/atoms/[id] | GET, PUT, DELETE | Individual atom operations |
/api/journal | GET, POST | Journal entries with mood/tag/privacy filtering |
/api/journal/[id] | GET, PUT, DELETE | Individual entry operations |
/api/zen | GET, POST | Zen activities by type/difficulty/duration |
/api/zen/[id] | GET, PUT, DELETE | Individual zen item operations |
/api/stream | GET | Activity stream (50 items) |
/api/hive | GET | Hive community stats + user data |
/api/drops | GET | User drops balance |
/api/drops/add | POST | Award drops |
/api/auth/firebase-token | POST | Clerk → Firebase token exchange |
/api/backgrounds | GET | Background images |
/api/unsplash | GET | Unsplash integration |
/api/webhooks/clerk | POST | Clerk webhook for user sync |
/api/user-profile | POST | Profile management |
Feature deep dives
Levels & Atoms system
The most architecturally mature feature in the prototype. Users define personal metrics ("levels") and track interventions ("atoms") that affect them.
Levels:
- Customisable metrics: energy, focus, sleep quality, stress, hydration, mood, etc.
- Measurement types: scale (0-10), numeric, percentage, boolean
- Target values and critical thresholds
- Historical trend analysis with correlation tracking
- Color-coded visualisation
- Per-level notification configuration
- Default categories: physical, mental, emotional
Atoms (interventions):
- Actions the user can take to improve levels: meditation, power nap, deep work, walk, gratitude, digital sunset
- Types: intervention (one-off), habit (recurring), ritual (scheduled)
- Effectiveness ratings (learned from usage data)
- Duration and effort tracking (1-10 scales)
- Impact scoring (how much it moved the target level)
- Usage history with outcome recording
Recommendation engine (designed, partially implemented):
- Correlates atom usage with level improvements
- Suggests atoms based on current level deficits
- Learns from historical effectiveness per user
Files:
- Schema:
/levels-atoms-schema.js - Service:
/levels-atoms-service.js - UI:
/levels-atoms-ui.tsx - API:
/web/src/app/api/levels/,/web/src/app/api/atoms/ - Page:
/web/src/app/(dashboard)/levels/page.tsx
HiveJournal 2026 equivalent: Partially covered by satisfaction quick values + sleep tracker + action notes. The Levels/Atoms concept goes further — the personalisable metric creation + effectiveness learning + recommendation engine have no equivalent in the current codebase.
Zen Space (personal sanctuary)
A gamified personal environment that visually deteriorates when the user doesn't engage with the app. Decoration and maintenance costs drops currency.
Deterioration system (0-1 scale):
- 0.0-0.2: pristine (clean, vibrant)
- 0.2-0.4: slight wear (muted colours, small cracks)
- 0.4-0.6: notable decay (overgrowth, dust, broken items)
- 0.6-0.8: significant deterioration (structural damage, darkness)
- 0.8-1.0: abandoned (ruins, complete darkness)
Environmental themes: garden, forest, beach, mountain, room — each with unique decay visuals.
Decoration marketplace: items with rarity tiers (common, uncommon, rare, legendary), purchasable with drops. Placement and positioning system.
Visitor mechanics: friends/supporters can visit your space, leave comments, and help restore deteriorated elements.
Files:
- Architecture:
/zen-space-architecture.js - UI:
/zen-space-ui.tsx - Page:
/web/src/app/(dashboard)/zen/page.tsx - API:
/web/src/app/api/zen/
HiveJournal 2026 equivalent: No equivalent. The deterioration-as-engagement concept is unique to Odessa.
Hive social structure
A hexagonal social graph where users occupy cells in a honeycomb, forming micro-teams (3 people) and macro-teams (blue vs. yellow) that compete in weekly battles.
Structure:
- Each user occupies a hex cell
- 7-cell clusters form neighbourhoods
- 3-person micro-teams within each cluster
- Two macro-teams (Blue and Yellow) compete weekly
- Support tokens flow between users (giving/receiving)
Battle system:
- Weekly competitions between blue and yellow teams
- Users earn contributions through engagement
- AI warriors represent each team (Phoenix, Thunder Drake)
- Strength/defense/agility tokens
- Battle shop for spending earned tokens
Subscription tiers:
earlybuzz(free): basic featuresdreampro(premium): full hive access, advanced atoms, AI insights
Files:
- Architecture:
/hive-platform-architecture.js - Visualisation diagram:
/hive-visualization.mermaid - UI:
/honeycomb-ui.tsx - Hex math:
/web/src/lib/hex-grid/index.ts - Hex component:
/web/src/components/HexGrid.tsx - Hive page:
/web/src/app/(dashboard)/hive/page.tsx - Hive components:
/web/src/app/(dashboard)/hive/components/HiveUsers.tsx— hexagonal user grid with clip-path presetsHiveFeed.tsx— social feedHiveChallenges.tsx— team challengesUserProfileModal.tsx— profile overlayCreatePostModal.tsx— post creation
HiveJournal 2026 equivalent: Partially covered by Workout Window battles + JQ Bridge connections. The hex-grid spatial model, cell clustering, and support-token economy have no equivalent.
Insect visitor system
Animated SVG creatures that appear on the stream page as a delightful Easter egg. Users can click them for drops.
Creature types: moth (gray), butterfly (pink), ladybug (red), dragonfly (blue)
Behaviour:
- Triggers at random intervals (0-5s after enabled)
- Spawns from icon position
- Paths toward random screen edges via physics simulation
- Duration: 2 seconds with fly-in CSS animation
- Click interaction awards 5 drops
- Hover state pauses movement
- Responsive to window resize
Files:
- Component:
/web/src/components/insect-visitor.tsx - Context:
/web/src/contexts/InsectContext.tsx(toggle on/off) - CSS:
@keyframes fly-inin/web/src/app/globals.css
HiveJournal 2026 equivalent: No equivalent. Purely delightful — could be ported to the DreamPro stream or the world map.
CSS animation library
Defined in /web/src/app/globals.css:
| Animation | Duration | Description |
|---|---|---|
flow | 30s linear | Horizontal scroll, pauses on hover |
sparkle (3 variants) | 1.2s cubic-bezier | Staggered sparkle effects |
float | 3s | Vertical bobbing with rotation |
fly-in | 2s cubic-bezier | Trajectory with rotation for insect visitors |
float-up | 1s ease-out | Fade-out upward motion |
Voice interface (designed, not built)
A proactive voice assistant for iPad that initiates conversations based on context.
Capabilities:
- Idle detection (triggers after period of no interaction)
- Prioritisation engine (what's most important to discuss now)
- Recurring task analysis (pattern detection)
- Proactive reminder triggers
- Conversation history tracking
- NLP pipeline for intent recognition
Files:
/proactive-voice-interface.js/odessa-llm-integration.js
HiveJournal 2026 equivalent: JQ chatbot covers some of this (note analysis, routine scanning). The proactive voice initiation and iPad-specific interface have no equivalent.
Google Calendar integration (designed, partially built)
Capabilities:
- OAuth authentication and token management
- Calendar event CRUD
- Multi-calendar support
- Two-way sync (read/write)
- Task → calendar event conversion
Files:
- Service:
/google-calendar-integration.js - UI:
/calendar-integration-ui.tsx
HiveJournal 2026 equivalent: Already shipped in HiveJournal 2026 (migration 063, /api/google-calendar/). The Odessa design is similar but less mature.
LLM integration (designed, partially built)
Multi-provider AI integration for creative writing assistance.
Capabilities:
- Multiple LLM providers (OpenAI, Anthropic, local)
- Project context maintenance
- Content generation for chapters, characters, settings, plots
- Brainstorming with context awareness
- Revision suggestions
- Creative writing with memory
Files:
/odessa-llm-integration.js
HiveJournal 2026 equivalent: JQ chatbot + note analysis + AI background generation. The creative-writing-specific features (character development, plot analysis) have no equivalent.
Database schema
Implemented (Drizzle ORM):
users (
id TEXT PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
name TEXT,
drops INTEGER DEFAULT 0,
state TEXT,
latitude REAL,
longitude REAL,
createdAt TIMESTAMP,
updatedAt TIMESTAMP
)
Designed but not migrated: Full schemas for tasks, levels, atoms, journal entries, zen spaces, hive cells, teams, battles, achievements, conversations, and creative projects are documented in the root-level architecture files but were never migrated into the database.
System diagrams
Two Mermaid diagrams capture the full architecture:
hive-visualization.mermaid — social structure: cell clustering (7-person groups), micro-teams (3-person), macro-teams (blue/yellow), support token economy, battle shop, gamification tiers.
odessa-system-diagram.mermaid — system architecture: user interfaces (iPad, Web, Mobile, SMS), API gateway, core services (User, Task, Reminder, Voice, NLP, Notification), data storage, external integrations (TTS, STT, Calendar, Weather).
What to port to HiveJournal 2026 (prioritised)
High value, distinct from existing features
- Levels & Atoms — personalisable wellness metrics with learned effectiveness. Goes beyond the current satisfaction/sleep/action system by adding metric customisation, atom recommendations, and correlation tracking.
- Insect visitors — delightful animated SVG creatures. Low effort to port, high engagement value. Could appear on the DreamPro stream or citizen scientist map.
- Hex grid visualisation — spatial social graph. The coordinate math (
hex-grid/index.ts) is reusable for any map-like display. Could enhance the citizen scientist world map or the Life Map. - Zen Space deterioration — engagement mechanic where a personal environment decays without interaction. Novel retention concept.
- CSS animation library — sparkle, float, fly-in, flow animations. Small, self-contained, immediately reusable.
Already ported (in different form)
- Journal entries → HiveJournal journal system
- Task management → user_tasks + product_tasks
- Drops currency → drops currency system
- Streak tracking → Workout Window chains
- Team battles → Workout Window weekly battles
- Google Calendar → Google Calendar integration
- AI integration → JQ chatbot + note analysis
Interesting but lower priority
- Voice interface patterns — proactive conversation initiation, idle detection
- LLM creative writing — character/plot development assistance
- Battle shop — spending earned tokens on cosmetics
File tree (key files only)
odessa-1/
├── _plan.txt # Integration plan for Claude-generated files
├── _claude-talk-1.txt # Architecture conversation transcript
├── odessa-blueprint.js # System architecture (560 lines)
├── levels-atoms-schema.js # Data models (281 lines)
├── levels-atoms-service.js # Metrics service
├── levels-atoms-ui.tsx # Metrics UI template
├── zen-space-architecture.js # Engagement mechanics
├── zen-space-ui.tsx # Environment UI template
├── honeycomb-ui.tsx # Hive UI template
├── hive-platform-architecture.js # Social system
├── hive-visualization.mermaid # Social structure diagram
├── odessa-system-diagram.mermaid # System architecture diagram
├── proactive-voice-interface.js # Voice service
├── odessa-llm-integration.js # LLM service
├── google-calendar-integration.js # Calendar service
├── calendar-integration-ui.tsx # Calendar UI template
├── web/
│ ├── src/
│ │ ├── app/
│ │ │ ├── (auth)/sign-in, sign-up
│ │ │ ├── (dashboard)/
│ │ │ │ ├── hive/
│ │ │ │ │ ├── page.tsx
│ │ │ │ │ └── components/
│ │ │ │ │ ├── HiveUsers.tsx
│ │ │ │ │ ├── HiveFeed.tsx
│ │ │ │ │ ├── HiveChallenges.tsx
│ │ │ │ │ ├── UserProfileModal.tsx
│ │ │ │ │ └── CreatePostModal.tsx
│ │ │ │ ├── journal/page.tsx
│ │ │ │ ├── levels/page.tsx
│ │ │ │ ├── tasks/page.tsx
│ │ │ │ ├── zen/page.tsx
│ │ │ │ ├── stream/page.tsx
│ │ │ │ ├── profile/page.tsx
│ │ │ │ └── settings/page.tsx
│ │ │ ├── api/ (18 route groups)
│ │ │ └── globals.css # Animation library
│ │ ├── components/
│ │ │ ├── insect-visitor.tsx # Animated SVG creatures
│ │ │ ├── HexGrid.tsx # Hexagonal grid
│ │ │ └── ui/ (user-avatar, etc.)
│ │ ├── contexts/
│ │ │ ├── InsectContext.tsx
│ │ │ └── AuthContext.tsx
│ │ ├── hooks/
│ │ │ └── useFirebase.ts
│ │ └── lib/
│ │ ├── db/schema.ts # Drizzle schema
│ │ ├── hex-grid/index.ts # Hex coordinate math
│ │ └── firebase.ts
│ └── public/images/backgrounds/
└── docs/