diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 0000000..e4fe34a --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,301 @@ +# Owlibou TTRPG — Roadmap + +Collaborative TTRPG platform with session notes, campaign management, and character tools. + +## Vision + +A unified platform for tabletop RPG players and game masters to: +- Collaborate in real-time during sessions +- Manage campaign data (characters, NPCs, locations, quests) +- Create characters with guided workflows +- Share files and information with granular access control + +## Architecture + +``` +owlibou-ttrpg/ +├── api/ # Rust backend (axum + PostgreSQL + MinIO) +└── suite/ # SvelteKit frontend (Tailwind CSS) +``` + +### Tech Stack + +| Layer | Technology | +|-------|------------| +| Backend | Rust + axum + tokio | +| Database | PostgreSQL (encrypted at-rest) | +| Real-time | WebSockets | +| Auth | JWT + Argon2 + OAuth2 | +| File Storage | MinIO (S3-compatible) | +| Frontend | SvelteKit + Tailwind CSS | + +--- + +## Phase 1: Foundation + +**Goal:** Core infrastructure and authentication + +### API Tasks +- [ ] Database connection pool setup +- [ ] SQLx migrations infrastructure +- [ ] Initial schema (users, campaigns, sessions, notes, files) +- [ ] At-rest encryption with pgcrypto +- [ ] JWT generation and validation +- [ ] Password hashing with Argon2 +- [ ] Auth endpoints + - [ ] POST `/auth/register` + - [ ] POST `/auth/login` + - [ ] POST `/auth/magic-link` + - [ ] POST `/auth/verify-magic-link` + - [ ] POST `/auth/refresh` + - [ ] POST `/auth/logout` +- [ ] OAuth2 integration (optional for Phase 1) + - [ ] Google + - [ ] GitHub + - [ ] Discord +- [ ] Error handling middleware +- [ ] Request logging/tracing + +### Frontend Tasks +- [ ] Auth pages + - [ ] Login page + - [ ] Register page + - [ ] Magic link verification page +- [ ] Auth state management +- [ ] Protected route handling +- [ ] API client with auth headers +- [ ] Basic UI components (Button, Input, Card, Modal) +- [ ] Toast/notification system + +### Infrastructure +- [ ] Docker Compose for local dev (PostgreSQL, MinIO) +- [ ] Environment configuration +- [ ] CI pipeline (GitHub Actions / Gitea Actions) + +--- + +## Phase 2: Session Notes MVP + +**Goal:** Core session notes functionality — the primary use case + +### API Tasks +- [ ] Campaign endpoints + - [ ] GET/POST `/campaigns` + - [ ] GET/PUT/DELETE `/campaigns/:id` + - [ ] GET `/campaigns/:id/members` +- [ ] Player invite system + - [ ] POST `/campaigns/:id/invite` (generate invite token) + - [ ] POST `/invites/:token/accept` + - [ ] Email sending (optional, can use link-only first) +- [ ] Session endpoints + - [ ] GET/POST `/campaigns/:id/sessions` + - [ ] GET/PUT/DELETE `/sessions/:id` +- [ ] Note endpoints + - [ ] GET/POST `/sessions/:id/notes` + - [ ] GET/PUT/DELETE `/notes/:id` + - [ ] PUT `/notes/:id/visibility` +- [ ] Access control + - [ ] Note visibility (private, shared, public) + - [ ] GM can see all player notes + - [ ] Players can only see their own + shared +- [ ] File storage + - [ ] POST `/campaigns/:id/files` (multipart upload) + - [ ] GET `/files/:id` + - [ ] GET `/files/:id/download` + - [ ] DELETE `/files/:id` + - [ ] Presigned URL generation +- [ ] WebSocket server + - [ ] Connection with JWT auth + - [ ] Session room subscriptions + - [ ] Broadcast: note created/updated/deleted + - [ ] Broadcast: file shared + - [ ] Broadcast: player joined/left + +### Frontend Tasks +- [ ] Campaign management + - [ ] Campaign list page + - [ ] Create campaign form + - [ ] Campaign settings page +- [ ] Player invites + - [ ] Invite modal (generate link) + - [ ] Accept invite page + - [ ] Member list view +- [ ] Session management + - [ ] Session list within campaign + - [ ] Create session form + - [ ] Session detail page +- [ ] Note editor + - [ ] Rich text editor (Tiptap or similar) + - [ ] Note visibility selector + - [ ] Real-time sync indicator +- [ ] File sharing + - [ ] File upload UI (drag & drop) + - [ ] File list view + - [ ] File preview (images, PDFs) + - [ ] Download button +- [ ] Real-time updates + - [ ] WebSocket connection management + - [ ] Live note updates + - [ ] Player presence indicators +- [ ] GM dashboard + - [ ] Overview of all notes + - [ ] Quick share controls + - [ ] Player activity view + +### Data Model + +```sql +-- Core tables for Phase 2 +users (id, email, password_hash, display_name, avatar_url, email_verified, created_at, updated_at) +campaigns (id, owner_id, name, description, ruleset, created_at, updated_at) +campaign_members (campaign_id, user_id, role, joined_at) +sessions (id, campaign_id, name, description, session_date, created_at, updated_at) +notes (id, session_id, author_id, title, content, visibility, created_at, updated_at) +note_shares (note_id, user_id) -- for selective sharing +files (id, campaign_id, uploader_id, filename, mime_type, size_bytes, storage_key, created_at) +file_shares (file_id, user_id) +invites (id, campaign_id, token, email, expires_at, used_at) +``` + +--- + +## Phase 3: Campaign Management + +**Goal:** Full campaign data hub functionality + +### Features +- [ ] Character management + - [ ] Character CRUD + - [ ] Link characters to campaigns + - [ ] Character sheet viewer +- [ ] NPC management + - [ ] NPC CRUD + - [ ] NPC visibility controls +- [ ] Location management + - [ ] Location CRUD + - [ ] Hierarchical locations (region → city → building) +- [ ] Item/equipment catalog +- [ ] Quest/objective tracking +- [ ] Tagging system + - [ ] Tag entities for organization + - [ ] Filter by tags +- [ ] Relationship mapping + - [ ] Link characters to locations, quests, etc. +- [ ] Search functionality + - [ ] Full-text search across entities +- [ ] Import/export + - [ ] JSON export + - [ ] CSV export + - [ ] Bulk import with validation + +--- + +## Phase 4: Character Builder + +**Goal:** Guided character creation with rule validation + +### Features +- [ ] Ruleset plugin system + - [ ] DSA (Das Schwarze Auge) + - [ ] D&D 5e + - [ ] Generic/freeform +- [ ] Step-by-step wizard + - [ ] Race/species selection + - [ ] Class/profession selection + - [ ] Attribute allocation + - [ ] Skills and abilities + - [ ] Equipment selection + - [ ] Background/history +- [ ] Rule validation + - [ ] Point cost tracking + - [ ] Prerequisite checking + - [ ] Legal build verification +- [ ] Character sheet generation + - [ ] PDF export + - [ ] JSON export + - [ ] Print-friendly view +- [ ] Save to campaign + - [ ] Link created characters to campaigns + +--- + +## Phase 5: TaleSpire Integration + +**Goal:** Bridge between Owlibou and TaleSpire VTT + +### Features +- [ ] Character sheet companion view + - [ ] Display character stats alongside TaleSpire + - [ ] Quick reference for abilities/spells +- [ ] Stat sync (if Symbiotes API allows) + - [ ] Link character to TaleSpire creature + - [ ] Sync HP, conditions, etc. +- [ ] Overlay mode + - [ ] OBS-friendly overlay + - [ ] Streaming integration +- [ ] Import from TaleSpire + - [ ] Import creature stats + +--- + +## Phase 6: Polish & Production + +**Goal:** Production-ready deployment + +### Features +- [ ] Self-hosting support + - [ ] Docker image publication + - [ ] Helm chart (optional) + - [ ] Documentation for self-hosting +- [ ] Performance optimization + - [ ] Database query optimization + - [ ] Frontend bundle optimization + - [ ] CDN for static assets +- [ ] Security audit + - [ ] Penetration testing + - [ ] Dependency audit +- [ ] Backup & recovery + - [ ] Automated backups + - [ ] Point-in-time recovery +- [ ] Monitoring & logging + - [ ] Application metrics + - [ ] Error tracking + - [ ] Uptime monitoring + +--- + +## Future Ideas + +Features to consider after core platform is stable: + +- **Dice roller** — Built-in dice rolling with shared results +- **Initiative tracker** — Combat turn order management +- **Session scheduling** — Calendar integration for planning sessions +- **Voice/video links** — Quick links to Discord/Jitsi/etc. +- **Mobile app** — React Native or Capacitor wrapper +- **Offline mode** — PWA with local storage sync +- **AI integration** — NPC dialogue generation, session summaries +- **Marketplace** — Share/sell custom rulesets, character templates + +--- + +## Milestones + +| Milestone | Target | Description | +|-----------|--------|-------------| +| **M1: Hello World** | — | API serves health endpoint, frontend loads | +| **M2: Auth Complete** | — | Users can register, login, logout | +| **M3: Session Notes Alpha** | — | Core notes functionality working | +| **M4: Session Notes Beta** | — | Real-time sync, file sharing, invites | +| **M5: Public Beta** | — | Deployed, accepting early users | +| **M6: Campaign Hub** | — | Full campaign management | +| **M7: Character Builder** | — | First ruleset (DSA) complete | +| **M8: v1.0** | — | Production-ready, self-hostable | + +--- + +## Contributing + +This project is developed by **s0wlz x vikingowl**. + +See [LICENSE](LICENSE) for licensing information (AGPLv3).