Scope & Implementation Plan
This is a living document recording the planned scope and implementation progress for Nucleus.
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.nucleus.fast+docs.nucleus.fast - Cloudflare Access configured with Google Workspace IdP
- Favicons + dark browser chrome theming (iOS/Android)
Phase 7: People & Objectives ✅
Section titled “Phase 7: People & Objectives ✅”- People directory with search and org-chart
- Person profiles (contact details, DOB, superannuation, bank details)
- Objectives tool with balanced scorecard categories, priorities, and KPIs
- Objective hierarchy (company → department → squad → individual)
Phase 8: Integrations & Leave ✅
Section titled “Phase 8: Integrations & Leave ✅”- Connections admin (Slack, Google, Xero, Productive, GitHub, Email)
- Leave management with Xero payroll sync
- Leave sync to Productive, Google Calendar, and Slack
- Pays tool (Xero payroll integration)
- Calendar tool (Google Calendar integration)
- Holidays tool (public holiday management)
Phase 9: Documents, Performance & Insights ✅
Section titled “Phase 9: Documents, Performance & Insights ✅”- Documents tool (employee paperwork storage with Cloudflare R2)
- Announcements (comms distribution via Slack, Google Calendar, email)
- Performance tool (360 reviews, feedback cycles, KPI ratings, salary decisions)
- Insights & Reporting (headcount, retention, diversity, compensation, org structure)
Phase 10: Rebrand & Website ✅
Section titled “Phase 10: Rebrand & Website ✅”- Rebrand from DotCollective Tools to Nucleus
- Static marketing website at nucleus.fast
- Custom domain: nucleus.fast (Cloudflare Pages)
- Updated docs site with Nucleus branding
Phase 11: Companies, Contacts & Deals ✅
Section titled “Phase 11: Companies, Contacts & Deals ✅”- Companies directory with profiles and detail views
- Contacts directory linked to companies
- Deals pipeline with status tracking and company/contact association
- Permission-scoped views (own deals / squad / all)
Phase 12: Contracts ✅
Section titled “Phase 12: Contracts ✅”- Contract management (employment agreements, MSAs, NDAs)
- Public e-signature flow via tokenised URL (
/contracts/sign/:token) - Contract templates and status tracking
- R2 storage for signed documents
Phase 13: Recruitment ✅
Section titled “Phase 13: Recruitment ✅”- Job listings with public careers portal (
/careers/*) - Candidate tracking across pipeline stages
- Interview scheduling with calendar integration
- Recruitment scorecards and evaluation templates
- Interview booking via public token URL
Deployment
Section titled “Deployment”| Target | URL | Platform |
|---|---|---|
| App | app.nucleus.fast | Cloudflare Workers |
| Docs | docs.nucleus.fast | Cloudflare Pages |
| Website | nucleus.fast | Cloudflare Pages |
Auto-deploy via GitHub Actions on push to main.