Org App
Features & Capabilities
Org App - Features & Capabilities Report
Template Version: 1.0.0 Generated: 2026-01-22 Package:
@epicdm/flowstate-app-orgApp ID:org
Table of Contents
- Overview
- App Identity
- Feature Categories
- Capabilities
- Data Models
- User Workflows
- Integration Points
- Architecture Summary
- Quality & Compliance
Overview
Purpose
The Org App is the central administration application for FlowState. It provides comprehensive management of organizations, workspaces, users, and attributes (categories and tags). It also handles external sync configuration for integrating with third-party services like GitHub. This app establishes the foundational multi-tenant structure that all other FlowState applications depend on.
Target Users
| User Type | Description | Primary Use Cases |
|---|---|---|
| System Administrators | Global system management | Create organizations, configure sync providers |
| Organization Owners | Org-level management | Manage workspaces, define attributes, invite users |
| Workspace Administrators | Workspace-level settings | Configure workspace attributes, manage workspace users |
Value Proposition
- Multi-Tenant Foundation: Organizations > Workspaces hierarchy
- Attribute System: Flexible categories and tags for entity classification
- External Sync: Connect to GitHub and custom APIs
- OAuth Integration: Secure third-party authentication
- Preset Seeding: Quick setup with predefined attribute sets
App Identity
| Property | Value |
|---|---|
| ID | org |
| Display Name | Organizations |
| Package Name | @epicdm/flowstate-app-org |
| Version | 1.0.0 |
| Category | business |
| Icon | building-2 |
| Color | #3B82F6 |
| Base Path | /apps/org |
| Permissions | database |
Entry Points
| Entry Point | Path | Description |
|---|---|---|
| Main Export | src/index.ts | Primary package export |
| Standalone | src/standalone.tsx | Standalone app entry |
| App Component | src/App.tsx | Main React component with routing |
| Plugin | src/plugin.ts | FlowState plugin registration |
Feature Categories
Category 1: Organization Management
Manage multi-tenant organizations
Feature: Organization CRUD Operations
| Property | Details |
|---|---|
| ID | org-crud |
| Status | Implemented |
| Priority | High |
Description: Create, view, edit, and manage organizations. Organizations serve as the top-level tenant container for all FlowState data.
User Story: As a system administrator, I want to manage organizations so that I can support multiple tenants with data isolation.
Acceptance Criteria:
- [x] Create organizations with name and metadata
- [x] View organizations in list view
- [x] Edit organization details
- [x] Auto-select newly created org if none selected
- [x] Persist selection to localStorage
Implementation:
| Component | Path | Purpose |
|---|---|---|
| OrganizationsPage | src/pages/OrganizationsPage.tsx | Org management page |
| OrgsPage | @epicdm/flowstate-app-framework | Shared org component |
Routes:
/orgs- Organization list and management
Category 2: Workspace Management
Organize work into logical workspaces
Feature: Workspace CRUD Operations
| Property | Details |
|---|---|
| ID | workspace-crud |
| Status | Implemented |
| Priority | High |
Description: Create and manage workspaces within organizations. Workspaces provide logical groupings of projects, tasks, and other entities.
User Story: As an organization owner, I want to create workspaces so that I can organize work into logical groupings.
Acceptance Criteria:
- [x] Create workspaces within organizations
- [x] View workspaces in list view
- [x] Edit workspace details
- [x] Auto-select newly created workspace if none selected
- [x] Persist selection to localStorage
Implementation:
| Component | Path | Purpose |
|---|---|---|
| WorkspacesPageComponent | src/pages/WorkspacesPage.tsx | Workspace management page |
| WorkspacesPage | @epicdm/flowstate-app-framework | Shared workspace component |
Routes:
/workspaces- Workspace list and management
Category 3: User Management
View and manage organization users
Feature: User Directory
| Property | Details |
|---|---|
| ID | user-directory |
| Status | Implemented |
| Priority | Medium |
Description: View and manage users within the organization. Provides a directory of all organization members.
User Story: As an organization owner, I want to view users so that I can manage organization membership.
Acceptance Criteria:
- [x] View users in list view
- [x] Display user details and roles
- [x] Filter and search users
Implementation:
| Component | Path | Purpose |
|---|---|---|
| UsersPageComponent | src/pages/UsersPage.tsx | User directory page |
| UsersPage | @epicdm/flowstate-app-framework | Shared users component |
Routes:
/users- User directory
Category 4: Attribute Management
Define categories and tags for entity classification
Feature: Attribute CRUD Operations
| Property | Details |
|---|---|
| ID | attribute-crud |
| Status | Implemented |
| Priority | High |
Description: Create, edit, and delete attributes (categories and tags) that apply across the organization. Attributes can be seeded from presets or created manually.
User Story: As an organization owner, I want to define attributes so that I can classify and organize entities consistently.
Acceptance Criteria:
- [x] Create categories with title, name, description, color
- [x] Create tags with title, name, description, color
- [x] Edit existing attributes
- [x] Delete attributes
- [x] Archive attributes
- [x] Color picker with default palette
Implementation:
| Component | Path | Purpose |
|---|---|---|
| AttributesPage | src/pages/AttributesPage.tsx | Attribute management page |
| AttributeFormModal | src/pages/AttributesPage.tsx | Create/edit modal |
| AttributeManager | @epicdm/flowstate-app-framework | Shared attribute manager |
| useAttributes | @epicdm/flowstate-app-framework | Attribute operations hook |
Routes:
/attributes- Attribute management
Feature: Attribute Seeding
| Property | Details |
|---|---|
| ID | attribute-seeding |
| Status | Implemented |
| Priority | Medium |
Description: Seed attributes from predefined presets for quick setup. Multiple preset types are available for different use cases.
User Story: As an organization owner, I want to seed default attributes so that I can quickly set up standard categories and tags.
Acceptance Criteria:
- [x] Seed from single preset
- [x] Seed from multiple presets
- [x] Skip existing attributes to prevent duplicates
- [x] Show seed button when no attributes exist
- [x] Report seeding results
Implementation:
| Component | Path | Purpose |
|---|---|---|
| AttributeSeedService | @epicdm/flowstate-app-framework | Seeding service |
| handleSeedDefaults | src/pages/AttributesPage.tsx | Single preset handler |
| handleSeedFromPresets | src/pages/AttributesPage.tsx | Multi-preset handler |
Category 5: Sync Configuration
Configure external data source synchronization
Feature: Sync Settings
| Property | Details |
|---|---|
| ID | sync-settings |
| Status | Implemented |
| Priority | Medium |
Description: Configure synchronization with external data sources including GitHub and custom APIs. Supports OAuth authentication for secure connections.
User Story: As a workspace administrator, I want to configure sync providers so that I can integrate external data into FlowState.
Acceptance Criteria:
- [x] View available sync providers
- [x] Configure provider settings
- [x] Register built-in providers (GitHub, Custom API)
- [x] Handle OAuth authentication flows
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SyncPage | src/pages/SyncPage.tsx | Sync settings page |
| SyncSettingsTab | @epicdm/flowstate-app-framework | Shared sync component |
| registerBuiltInProviders | @epicdm/flowstate-app-framework | Provider registration |
Routes:
/sync- Sync configuration
Feature: OAuth Callback Handling
| Property | Details |
|---|---|
| ID | oauth-callback |
| Status | Implemented |
| Priority | Medium |
Description: Handle OAuth callbacks from external sync providers, completing the authentication flow.
User Story: As a user, I want OAuth callbacks handled automatically so that my authentication completes seamlessly.
Acceptance Criteria:
- [x] Handle provider-specific callbacks
- [x] Redirect to sync page on success
- [x] Redirect to sync page with error on failure
- [x] Support multiple providers
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SyncOAuthCallbackPage | src/pages/SyncOAuthCallbackPage.tsx | Callback handler |
| FrameworkSyncOAuthCallbackPage | @epicdm/flowstate-app-framework | Shared callback component |
Routes:
/sync/callback/:providerId- OAuth callback endpoint
Capabilities
Core Capabilities
| Capability | Description | Implementation |
|---|---|---|
| Multi-Tenant Structure | Organization > Workspace hierarchy | RxDB collections with org/workspace IDs |
| Attribute System | Categories and tags for classification | AttributeModel with type field |
| External Sync | Connect to GitHub, custom APIs | Sync provider registry |
| OAuth Flows | Secure third-party authentication | OAuth callback handling |
| Preset Seeding | Quick attribute setup | AttributeSeedService with presets |
Technical Capabilities
| Capability | Status | Notes |
|---|---|---|
| CRUD Operations | Yes | Full CRUD on orgs, workspaces, attributes |
| Real-time Updates | Yes | RxDB reactive subscriptions |
| Offline Support | Yes | RxDB local-first architecture |
| Local Persistence | Yes | Selection persisted to localStorage |
| OAuth Support | Yes | Provider-based OAuth flows |
Integration Capabilities
| Integration | Type | Description |
|---|---|---|
| GitHub | External | GitHub repository sync |
| Custom API | External | Custom API endpoint sync |
| RxDB Server | Internal | Replication for data sync |
| FlowState Framework | Internal | Auth, layout, shared components |
Data Models
Collections Used
| Collection | Description | Operations | Source |
|---|---|---|---|
orgs | Organization records | CRUD, Query | @epicdm/flowstate-collections |
workspaces | Workspace records | CRUD, Query | @epicdm/flowstate-collections |
users | User records | Query | @epicdm/flowstate-collections |
attributes | Categories and tags | CRUD, Query | @epicdm/flowstate-collections |
Entity Relationships
Organization
|
+-- Workspaces (hasMany)
| |
| +-- Projects (hasMany)
| |
| +-- Tasks (hasMany)
| |
| +-- Attributes (hasMany, scoped)
|
+-- Users (hasMany, via membership)
|
+-- Attributes (hasMany, org-level)
Key Data Flows
User Action --> Component --> Framework Component --> RxDB Collection --> UI Update
|
+--> Service (AttributeSeedService)
|
+--> Replication --> Server
User Workflows
Workflow 1: Organization Setup
Initial organization creation and configuration
Trigger: New user or system administrator
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Navigate to Orgs | Sidebar | Orgs page displayed |
| 2 | Create organization | OrganizationsPage | Org created |
| 3 | Navigate to Workspaces | Sidebar | Workspaces page displayed |
| 4 | Create workspace | WorkspacesPageComponent | Workspace created |
| 5 | Navigate to Attributes | Sidebar | Attributes page displayed |
| 6 | Seed default attributes | AttributesPage | Attributes created |
Success Outcome: Organization fully configured with workspace and attributes Failure Handling: Validation errors shown, state preserved
Workflow 2: Attribute Management
Create custom attributes for entity classification
Trigger: Need to categorize or tag entities
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Navigate to Attributes | Sidebar | Attributes page displayed |
| 2 | Click create button | AttributeManager | Modal opens |
| 3 | Select type (category/tag) | AttributeFormModal | Type selected |
| 4 | Enter details | AttributeFormModal | Form filled |
| 5 | Select color | AttributeFormModal | Color selected |
| 6 | Save attribute | handleFormSubmit | Attribute created |
Success Outcome: New attribute available for entity classification Failure Handling: Validation errors shown in modal
Workflow 3: Sync Configuration
Connect external data source
Trigger: Need to import data from GitHub or API
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Navigate to Sync | Sidebar | Sync page displayed |
| 2 | Select provider | SyncSettingsTab | Provider options shown |
| 3 | Configure settings | SyncSettingsTab | Settings entered |
| 4 | Initiate OAuth (if needed) | SyncSettingsTab | OAuth flow starts |
| 5 | Complete OAuth | SyncOAuthCallbackPage | Callback processed |
| 6 | Redirect to Sync | Router | Sync page with success |
Success Outcome: External data source connected Failure Handling: Error redirect with message
Integration Points
Internal Integrations
| Integration | Package | Purpose |
|---|---|---|
| FlowState Framework | @epicdm/flowstate-app-framework | App container, auth, layout, shared components |
| Collections | @epicdm/flowstate-collections | Data models and schemas |
| RxDB React | @epicdm/flowstate-rxdb-react | Reactive subscriptions |
External Integrations
| Integration | Type | Configuration |
|---|---|---|
| GitHub | OAuth | GitHub App credentials |
| Custom API | API Key/OAuth | Custom endpoint configuration |
MCP Integration
| Tool | Purpose | Example Usage |
|---|---|---|
collection-query | Query orgs, workspaces | {"collection": "orgs", "selector": {}} |
collection-create | Create entities | {"collection": "attributes", "data": {...}} |
collection-update | Update attributes | {"collection": "attributes", "id": "...", "data": {...}} |
Architecture Summary
Directory Structure
src/
├── components/ # UI components
│ ├── Header.tsx # App header
│ └── Sidebar.tsx # Navigation sidebar
├── db/ # Database configuration
│ ├── collections.ts # Collection exports
│ ├── schema.ts # Schema exports
│ └── types.ts # Type exports
├── pages/ # Page components
│ ├── AttributesPage.tsx # Attribute management
│ ├── OrganizationsPage.tsx # Org management
│ ├── SyncOAuthCallbackPage.tsx # OAuth callback
│ ├── SyncPage.tsx # Sync settings
│ ├── UsersPage.tsx # User directory
│ └── WorkspacesPage.tsx # Workspace management
├── App.tsx # Main app with routing
├── index.ts # Package exports
├── plugin.ts # FlowState plugin config
├── standalone.tsx # Standalone entry
└── styles.css # App styles
Key Architectural Patterns
| Pattern | Usage | Example |
|---|---|---|
| State Management | RxDB + Framework | Collections for data, framework for context |
| Data Flow | Reactive subscriptions | RxDB observables through hooks |
| Component Architecture | Framework delegation | Pages wrap shared framework components |
| Routing | React Router v6 | Flat route structure |
| Plugin System | FlowState plugins | Plugin registration in plugin.ts |
Framework Delegation
The Org App delegates most functionality to the FlowState App Framework:
| Local Component | Framework Component | Purpose |
|---|---|---|
| OrganizationsPage | OrgsPage | Org CRUD UI |
| WorkspacesPageComponent | WorkspacesPage | Workspace CRUD UI |
| UsersPageComponent | UsersPage | User directory UI |
| AttributesPage | AttributeManager, useAttributes | Attribute management |
| SyncPage | SyncSettingsTab | Sync configuration |
| SyncOAuthCallbackPage | SyncOAuthCallbackPage | OAuth handling |
Quality & Compliance
Test Coverage
| Test Type | Location | Coverage Target |
|---|---|---|
| Unit Tests | src/**/__tests__/ | >= 80% |
| E2E Tests | playwright/ | Critical paths |
Accessibility
| Requirement | Status | Notes |
|---|---|---|
| WCAG 2.1 AA | In Progress | Framework components follow standards |
| Keyboard Navigation | Yes | Tab navigation supported |
| Screen Reader Support | Partial | Aria labels on interactive elements |
| Focus Management | Yes | Modal focus trapping |
Security Considerations
| Consideration | Implementation |
|---|---|
| Multi-Tenant Isolation | Org/workspace IDs on all queries |
| OAuth Security | Secure callback handling |
| Input Validation | Form validation on all inputs |
| Local Storage | Selection persistence only |
FlowState Alignment
Spec-Driven Development
This app follows the FlowState Standard for spec-driven development:
- Requirements:
.flowstate/specs/{{feature-name}}/requirements.md - Design:
.flowstate/specs/{{feature-name}}/design.md - Wireframes:
.flowstate/specs/{{feature-name}}/wireframes.html - Tasks:
.flowstate/specs/{{feature-name}}/tasks.md
Quality Gates
| Gate | Requirement | Status |
|---|---|---|
| Test Coverage | >= 80% statements | In Progress |
| TypeScript Strict | No any without justification | Pass |
| Accessibility | WCAG 2.1 AA | In Progress |
| Documentation | 100% TSDoc on public APIs | In Progress |
| Security | No critical vulnerabilities | Pass |
Appendix
Related Documentation
| Document | Location | Purpose |
|---|---|---|
| FLOWSTATE.md | .flowstate/docs/FLOWSTATE.md | Development workflow |
| PROCESS.md | .flowstate/docs/PROCESS.md | Development process |
| TDD.md | .flowstate/steering/TDD.md | Testing standards |
| QUALITY.md | .flowstate/steering/QUALITY.md | Code quality |
Version History
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2026-01-22 | Claude | Initial documentation |