Scope & Implementation Plan
This is a living document recording the planned scope and implementation progress for the DotCollective Tools platform.
Tech Stack
Section titled “Tech Stack”| Layer | Choice |
|---|---|
| Frontend | React 19 + Vite + TypeScript |
| Routing | TanStack Router (file-based) |
| UI | shadcn/ui (neutral, new-york) + Tailwind CSS v4 |
| State | TanStack Query (server) + React Context (auth) |
| API | Hono on Cloudflare Workers |
| Database | Cloudflare D1 (edge SQLite) |
| Auth | Cloudflare Access + Google Workspace |
| Permissions | RBAC with 5 access levels in D1 |
| AI (near-term) | Anthropic SDK (@anthropic-ai/sdk) |
| AI (future) | Mastra.ai on CF Workers |
| Automation | Cloudflare Workflows |
| Docs | Starlight (Astro) + MDX on CF Pages |
| Package Manager | pnpm with workspaces |
Implementation Phases
Section titled “Implementation Phases”Phase 1: Project Scaffolding ✅
Section titled “Phase 1: Project Scaffolding ✅”- Vite + React + TypeScript project
- Tailwind CSS v4 + shadcn/ui components
- TanStack Router + Query setup
- Wrangler + D1 configuration
- Database schema and seed data
- Starlight docs site
- README, AGENTS.md, CLAUDE.md
- Claude Code settings and slash commands
- GitHub labels (11 labels: tool:*, type:*, priority:*)
- pnpm workspaces (root app + docs/)
Phase 2: App Shell + Routing ✅
Section titled “Phase 2: App Shell + Routing ✅”- TanStack Router file-based routes
- App shell (sidebar + header + content area)
- Sidebar navigation with permission filtering
- User menu with avatar dropdown (name, email, access level, job role)
- Route files: dashboard, onboarding, scorecards, admin
Phase 3: Worker + Auth + Permissions ✅
Section titled “Phase 3: Worker + Auth + Permissions ✅”- Hono Worker with health endpoint
- Cloudflare Access JWT validation (header + cookie fallback)
- Auth middleware (JWT → user upsert in D1)
- Permission middleware (tool-level can_view/can_update/can_manage)
- Data scoping by access level (own / own+squad / all)
-
GET /api/users/meendpoint with full permissions map - Frontend AuthContext +
canView/canUpdate/canManagehelpers - Admin section (Executive only) with tabs:
- Users table (access level + job role management)
- Squads table (create, edit, assign members, set managers)
- Permissions matrix (tools × access levels, toggle view/update/manage)
Phase 4: Onboarding Tool ✅
Section titled “Phase 4: Onboarding Tool ✅”- API endpoints for phases, items, progress (with role filtering + data scoping)
- Onboarding page with expandable phase cards
- Role filtering (All/DM/DL)
- Progress tracking with checkboxes and notes
- Overall progress summary bar
- 5 phases, 39 items seeded in D1
Phase 5: Scorecards Tool ✅
Section titled “Phase 5: Scorecards Tool ✅”- API endpoints for scorecards CRUD (with full data scoping)
- Scorecard creation and editing
- KPI section with status cycling (pending/on-track/at-risk/off-track)
- Monthly financial metrics table (6-month rolling, editable)
- Role-based scorecards (DM/DL/TL) with item definitions
- Score items with status cycling + notes
Phase 6: Dashboard + Polish ✅
Section titled “Phase 6: Dashboard + Polish ✅”- Dashboard with onboarding progress summary + recent scorecards cards
- End-to-end API testing (all endpoints verified)
- Frontend build passing (516KB JS + 65KB CSS)
- Production deployment to Cloudflare Workers
- Docs deployed to Cloudflare Pages
- GitHub Actions CI/CD (auto-deploy app + docs on push to main)
- Custom domains:
app.dotcollective.com.au+docs.app.dotcollective.com.au - Cloudflare Access configured with Google Workspace IdP
- Favicons + dark browser chrome theming (iOS/Android)
Deployment
Section titled “Deployment”| Target | URL | Platform |
|---|---|---|
| App | app.dotcollective.com.au | Cloudflare Workers |
| Docs | docs.app.dotcollective.com.au | Cloudflare Pages |
Auto-deploy via GitHub Actions on push to main.
Future Scope (Post-MVP)
Section titled “Future Scope (Post-MVP)”- AI agents via Mastra.ai (resourcing, scheduling, onboarding automation)
- Cloudflare Workflows for deterministic automations (account provisioning, etc.)
- Additional tools as agency needs evolve (resourcing, time tracking, client briefs)
- Agent monitoring + approval queues in admin section