@tera-system/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +13 -0
- package/MANIFEST.json +24 -0
- package/README.md +67 -0
- package/RELEASES.md +28 -0
- package/WELCOME.md +35 -0
- package/agents/application-blueprint.md +407 -0
- package/agents/auditor.md +665 -0
- package/agents/design-reviewer.md +392 -0
- package/agents/domain-expert-agent.md +510 -0
- package/agents/domain-research-agent.md +360 -0
- package/agents/engineering-agent-dotnet.md +218 -0
- package/agents/engineering-agent-phaser.md +275 -0
- package/agents/engineering-agent-typescript.md +300 -0
- package/agents/engineering-agent.md +143 -0
- package/agents/monitor.md +395 -0
- package/agents/production-erp-expert.md +506 -0
- package/agents/project-knowledge-agent.md +271 -0
- package/agents/qa-agent.md +498 -0
- package/agents/tera-business-transformation-consultant.md +290 -0
- package/agents/tera-client-engagement.md +891 -0
- package/agents/tera-software-designer.md +237 -0
- package/agents/tera-strategic-advisor.md +325 -0
- package/agents/tera-system-evolution.md +759 -0
- package/agents/tera.md +520 -0
- package/agents/ui-designer.md +426 -0
- package/commands/tera-approve.md +34 -0
- package/commands/tera-diagnose.md +47 -0
- package/commands/tera-gate.md +40 -0
- package/commands/tera-help.md +41 -0
- package/commands/tera-new-project.md +35 -0
- package/commands/tera-plan.md +34 -0
- package/commands/tera-request-build.md +45 -0
- package/commands/tera-resume.md +34 -0
- package/commands/tera-review.md +52 -0
- package/commands/tera-status.md +38 -0
- package/commands/tera-update.md +48 -0
- package/core/project-control/templates/TASK_TEMPLATE.md +146 -0
- package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +285 -0
- package/core/tera-system/AGENT_DEPENDENCY_MAP.md +117 -0
- package/core/tera-system/AGENT_GENERATION_TEMPLATE.md +312 -0
- package/core/tera-system/AGENT_PERMISSION_MODEL.md +343 -0
- package/core/tera-system/AIS_PROTOCOL.md +191 -0
- package/core/tera-system/TERA_AGENT_CONDUCT.md +102 -0
- package/core/tera-system/TERA_CONTINUOUS_IMPROVEMENT_POLICY.md +111 -0
- package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +291 -0
- package/core/tera-system/TERA_PROJECT_DECISION.md +281 -0
- package/core/tera-system/TERA_USER_GUIDE.md +462 -0
- package/core/tera-system/TOOLING_AND_MCP_POLICY.md +285 -0
- package/core/tera-system/TeraApplicationQuestionBank.md +362 -0
- package/core/tera-system/TeraArchitectureMap.md +91 -0
- package/core/tera-system/TeraClientPolicy.md +366 -0
- package/core/tera-system/TeraHelperAgents.md +970 -0
- package/core/tera-system/TeraPolicyMap.md +131 -0
- package/core/tera-system/TeraPreExecutionGate.md +818 -0
- package/core/tera-system/TeraPreparationDocumentationGovernance.md +370 -0
- package/core/tera-system/TeraPricingPolicy.md +674 -0
- package/core/tera-system/TeraProjectIntakePolicy.md +164 -0
- package/core/tera-system/TeraScenarioStressTests.md +168 -0
- package/core/tera-system/TeraSubAgents.md +854 -0
- package/core/tera-system/TeraSystemMaintenanceChecklist.md +80 -0
- package/core/tera-system/TeraTokenPolicy.md +362 -0
- package/core/tera-system/Tera_Project_Preparation_Files.md +1045 -0
- package/core/tera-system/agent-helpers/application-blueprint-details.md +177 -0
- package/core/tera-system/client-helpers/tera-client-engagement-discovery-domains.md +99 -0
- package/core/tera-system/client-helpers/tera-client-engagement-gates.md +258 -0
- package/core/tera-system/client-helpers/tera-client-engagement-pricing.md +341 -0
- package/core/tera-system/client-helpers/tera-client-engagement-protocols.md +692 -0
- package/core/tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md +195 -0
- package/core/tera-system/consulting-helpers/BTCA_REPORT_TEMPLATES.md +266 -0
- package/core/tera-system/design-system/ACCESSIBILITY_RULES.md +31 -0
- package/core/tera-system/design-system/COMPONENT_LIBRARY_SCHEMA.md +46 -0
- package/core/tera-system/design-system/DESIGN_MD_INTEGRATION.md +59 -0
- package/core/tera-system/design-system/DESIGN_REVIEW_STANDARDS.md +241 -0
- package/core/tera-system/design-system/DESIGN_SOURCE_PROTOCOL.md +61 -0
- package/core/tera-system/design-system/DESIGN_SYSTEM_OVERVIEW.md +66 -0
- package/core/tera-system/design-system/DESIGN_TOKENS_SCHEMA.md +66 -0
- package/core/tera-system/design-system/EXTERNAL_REFERENCE_ANALYSIS.md +52 -0
- package/core/tera-system/design-system/FIGMA_INTEGRATION.md +138 -0
- package/core/tera-system/design-system/INTERNAL_KITS_INDEX.md +26 -0
- package/core/tera-system/design-system/LAYOUT_PATTERNS.md +52 -0
- package/core/tera-system/design-system/MOBILE_UI_UX_STANDARDS.md +342 -0
- package/core/tera-system/design-system/RTL_LTR_RULES.md +39 -0
- package/core/tera-system/design-system/UI_ACCEPTANCE_GATE.md +80 -0
- package/core/tera-system/design-system/kits/KIT_ADMIN_DASHBOARD.md +102 -0
- package/core/tera-system/engineering-governance/ENGINEERING_AGENT_RESPONSIBILITIES.md +210 -0
- package/core/tera-system/engineering-governance/ENGINEERING_BEST_PRACTICES.md +468 -0
- package/core/tera-system/engineering-governance/ENGINEERING_GOVERNANCE_GATE.md +131 -0
- package/core/tera-system/engineering-governance/ENGINEERING_REVIEW_CHECKLIST.md +129 -0
- package/core/tera-system/engineering-governance/QUALITY_GATE_THRESHOLDS.md +159 -0
- package/core/tera-system/engineering-helpers/engineering-agent-core.md +171 -0
- package/core/tera-system/knowledge-base/OPENHANDS_ARCHITECTURE_REFERENCE.md +243 -0
- package/core/tera-system/knowledge-base/manufacturing/00_INDEX.md +32 -0
- package/core/tera-system/knowledge-base/manufacturing/01_MANUFACTURING_ERP_CORE_CONCEPTS.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/02_SAP_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/03_DYNAMICS_365_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/04_ORACLE_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/05_ODOO_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/06_ERPNEXT_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/07_MANUFACTURING_COSTING_GUIDE.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/08_PRODUCTION_DISCOVERY_QUESTIONS.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/09_MANUFACTURING_BLUEPRINT_CHECKLIST.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/10_PRODUCTION_TEST_SCENARIOS.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/11_QUALITY_REWORK_AND_SCRAP_GUIDE.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/12_MRP_AND_PLANNING_GUIDE.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/13_LOCAL_AND_REGIONAL_MANUFACTURING_CONTEXT.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/14_VENDOR_COMPARISON_MATRIX.md +7 -0
- package/core/tera-system/product-standards/maintenance-apps/BEST_PRACTICES_DOMAIN.md +325 -0
- package/core/tera-system/product-standards/maintenance-apps/STANDARD_DEFINITION.md +142 -0
- package/core/tera-system/profiles/PROFILES_INDEX.md +57 -0
- package/core/tera-system/profiles/TEMPLATE.md +47 -0
- package/core/tera-system/profiles/dotnet-blazor-ef.md +76 -0
- package/core/tera-system/profiles/dotnet-razorpages-adonet.md +137 -0
- package/core/tera-system/profiles/dotnet-wpf-sqlite.md +159 -0
- package/core/tera-system/profiles/effect-bun-opencode.md +109 -0
- package/core/tera-system/profiles/flutter-mobile.md +369 -0
- package/core/tera-system/profiles/nextjs-prisma.md +110 -0
- package/core/tera-system/profiles/phaser-react-node.md +302 -0
- package/core/tera-system/profiles/react-pwa.md +97 -0
- package/core/tera-system/runtime/CLIENT_DISCOVERY_PROTOCOL.md +145 -0
- package/core/tera-system/runtime/DOMAIN_INTELLIGENCE_PROTOCOL.md +124 -0
- package/core/tera-system/runtime/MVP_DEFINITION_PROTOCOL.md +176 -0
- package/core/tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md +646 -0
- package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS.md +50 -0
- package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CLIENT.md +355 -0
- package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CORE.md +799 -0
- package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES.md +908 -0
- package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md +584 -0
- package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md +376 -0
- package/core/tera-system/runtime/TERA_SOLUTION_PREPARATION_PROTOCOL.md +335 -0
- package/core/tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md +397 -0
- package/core/tera-system/runtime/VERSION_LIFECYCLE_PROTOCOL.md +296 -0
- package/core/tera-system/semgrep-rules/README.md +32 -0
- package/core/tera-system/semgrep-rules/tera-security.yml +66 -0
- package/core/tera-system/semgrep-rules/tera-standards.yml +49 -0
- package/core/tera-system/teranoo-ui/README.md +48 -0
- package/core/tera-system/teranoo-ui/components/button.tsx +51 -0
- package/core/tera-system/teranoo-ui/components/card.tsx +49 -0
- package/core/tera-system/teranoo-ui/components/dashboard-layout.tsx +36 -0
- package/core/tera-system/teranoo-ui/components/data-table.tsx +146 -0
- package/core/tera-system/teranoo-ui/components/empty-state.tsx +31 -0
- package/core/tera-system/teranoo-ui/components/kpi-card.tsx +42 -0
- package/core/tera-system/teranoo-ui/components/page-header.tsx +25 -0
- package/core/tera-system/teranoo-ui/components/search-input.tsx +40 -0
- package/core/tera-system/teranoo-ui/components/sidebar.tsx +66 -0
- package/core/tera-system/teranoo-ui/components/stats-card.tsx +37 -0
- package/core/tera-system/teranoo-ui/registry.json +77 -0
- package/core/tera-system/teranoo-ui/styles/teranoo-theme.css +61 -0
- package/opencode.tera.example.json +30 -0
- package/package.json +37 -0
- package/scripts/build.mjs +110 -0
- package/scripts/install.js +244 -0
- package/scripts/lib/license.mjs +90 -0
- package/scripts/lib/public-key.pem +3 -0
- package/scripts/tera-license.mjs +63 -0
- package/tools/tera-clean.ps1 +97 -0
- package/tools/tera-fetch.ps1 +165 -0
- package/tools/tera-release.ps1 +96 -0
- package/tools/tera-schedule.ps1 +59 -0
- package/tools/tera-update.ps1 +472 -0
- package/tools/tera-watch.ps1 +154 -0
- package/tools/update-client-repositories.ps1 +92 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Layout Patterns
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide approved layout patterns that can be selected or adapted per project.
|
|
6
|
+
|
|
7
|
+
## Patterns
|
|
8
|
+
|
|
9
|
+
### 1. Admin Shell
|
|
10
|
+
|
|
11
|
+
Use for ERP, CRM, dashboards, internal systems.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
Topbar + collapsible sidebar + wide content area + cards/tables
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Rules:
|
|
18
|
+
- Sidebar width: 260px expanded / 72px collapsed by default.
|
|
19
|
+
- Content max width: full responsive canvas unless form-focused.
|
|
20
|
+
- Header area contains page title, breadcrumbs, primary action.
|
|
21
|
+
|
|
22
|
+
### 2. Data Table Workspace
|
|
23
|
+
|
|
24
|
+
Use for data-heavy management screens.
|
|
25
|
+
|
|
26
|
+
Rules:
|
|
27
|
+
- Filters above table or in collapsible panel.
|
|
28
|
+
- Primary action in header.
|
|
29
|
+
- Row actions compact and consistent.
|
|
30
|
+
- Pagination or infinite scroll must be chosen explicitly.
|
|
31
|
+
|
|
32
|
+
### 3. Form Detail Layout
|
|
33
|
+
|
|
34
|
+
Use for create/edit/detail workflows.
|
|
35
|
+
|
|
36
|
+
Rules:
|
|
37
|
+
- Group fields into sections.
|
|
38
|
+
- Sticky action bar only when forms are long.
|
|
39
|
+
- Validation appears near fields.
|
|
40
|
+
|
|
41
|
+
### 4. Public Landing Layout
|
|
42
|
+
|
|
43
|
+
Use for public websites and marketing pages.
|
|
44
|
+
|
|
45
|
+
Rules:
|
|
46
|
+
- Hero, value propositions, proof, CTA, FAQ.
|
|
47
|
+
- Not default for internal ERP/admin apps.
|
|
48
|
+
|
|
49
|
+
## Forbidden
|
|
50
|
+
|
|
51
|
+
- Do not mix unrelated layout patterns in one screen without decision.
|
|
52
|
+
- Do not create separate screens when one management workspace is sufficient for MVP.
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Mobile UI/UX Standards
|
|
2
|
+
|
|
3
|
+
## 1. Purpose
|
|
4
|
+
|
|
5
|
+
This file defines the mobile-specific design standards and UX rules for Flutter mobile application projects.
|
|
6
|
+
|
|
7
|
+
It is an **extension** to `tera-system/design-system/` — loaded only when a project is classified as **Mobile**.
|
|
8
|
+
|
|
9
|
+
It does not replace:
|
|
10
|
+
- `tera-system/design-system/DESIGN_REVIEW_STANDARDS.md`
|
|
11
|
+
- `tera-system/design-system/UI_ACCEPTANCE_GATE.md`
|
|
12
|
+
- `project-preparation/28_UI_UX_GUIDELINES.md`
|
|
13
|
+
|
|
14
|
+
It supplements them with mobile-specific concerns.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 2. Core Principle
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Mobile is not "shrunk web."
|
|
22
|
+
A mobile-first design is built from mobile interaction patterns, not from scaling down a desktop interface.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
| Wrong Approach | Correct Approach |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Shrink web layout to fit mobile | Design for touch-first, thumb zones, and screen size |
|
|
28
|
+
| Use desktop hover patterns | Use tap, swipe, long-press gestures |
|
|
29
|
+
| Stack desktop navigation inside mobile | Use bottom navigation, tab bars, or drawer |
|
|
30
|
+
| Keep desktop forms as-is | Break forms into steps, use mobile keyboards |
|
|
31
|
+
| Show full tables | Use cards, lists, or horizontal scroll |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Platform Patterns
|
|
36
|
+
|
|
37
|
+
### 3.1 Android (Material Design 3)
|
|
38
|
+
|
|
39
|
+
- Use Material 3 components (M3) as the baseline.
|
|
40
|
+
- Navigation: Bottom Navigation Bar (3–5 destinations) or Navigation Rail (tablet/landscape).
|
|
41
|
+
- App Bar: Standard `AppBar` with title + actions.
|
|
42
|
+
- FAB: Floating Action Button for primary action when appropriate.
|
|
43
|
+
- Back navigation: System back button + AppBar back arrow.
|
|
44
|
+
- Dialogs: `AlertDialog`, `BottomSheet` for selections.
|
|
45
|
+
|
|
46
|
+
### 3.2 iOS (Cupertino / Human Interface Guidelines)
|
|
47
|
+
|
|
48
|
+
- Use Cupertino widgets for native iOS feel when the app is iOS-only or platform-adaptive.
|
|
49
|
+
- Navigation: Tab Bar (bottom) + Navigation Stack.
|
|
50
|
+
- App Bar: Large title + inline title patterns (`.large`, `.inline`).
|
|
51
|
+
- Back navigation: Swipe-back gesture + back chevron.
|
|
52
|
+
- Sheets: Modal bottom sheets for actions and filters.
|
|
53
|
+
- Pickers: iOS-style wheel pickers for date/time/option selection.
|
|
54
|
+
|
|
55
|
+
### 3.3 Cross-Platform (Platform Adaptive)
|
|
56
|
+
|
|
57
|
+
When targeting both Android and iOS:
|
|
58
|
+
|
|
59
|
+
- Use `ThemeData` + `CupertinoThemeData` for platform-adaptive styling.
|
|
60
|
+
- Use `Platform.isAndroid` / `Platform.isIOS` sparingly — prefer adaptive widgets.
|
|
61
|
+
- Navigation: `GoRouter` with platform-adaptive transitions (slide iOS, fade Android).
|
|
62
|
+
- Dialogs: `adaptive` dialogs that match platform conventions.
|
|
63
|
+
|
|
64
|
+
**Rule:** Do not force iOS users into Android navigation patterns or vice versa. Use platform detection for navigation style, date pickers, and dialog styles.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 4. Touch Targets
|
|
69
|
+
|
|
70
|
+
| Element | Minimum Size | Notes |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| Buttons (tappable) | 48 x 48 dp | 44 pt on iOS; 48 dp recommended by Material |
|
|
73
|
+
| Icon buttons | 48 x 48 dp | Include adequate padding |
|
|
74
|
+
| List items | 48 dp height | Minimum tap target per item |
|
|
75
|
+
| Form fields | 48 dp height | Comfortable for text entry |
|
|
76
|
+
| Links / inline taps | 44 x 44 dp | Ensure adequate hit area |
|
|
77
|
+
|
|
78
|
+
### Spacing rules
|
|
79
|
+
- Minimum 8 dp between tappable elements.
|
|
80
|
+
- Content padding: 16 dp (mobile) / 24 dp (tablet).
|
|
81
|
+
- Touch targets should include visual feedback (ink splash / highlight).
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 5. Gestures
|
|
86
|
+
|
|
87
|
+
| Gesture | Use Case | Fallback |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| Tap | Primary action (button click, select) | Always have a visible button alternative |
|
|
90
|
+
| Long press | Context menu, reorder, delete | Provide icon button as fallback |
|
|
91
|
+
| Swipe (horizontal) | Dismiss, navigate between tabs | Always have a tap/button alternative |
|
|
92
|
+
| Swipe (vertical) | Pull-to-refresh, scroll | Always have a refresh button alternative |
|
|
93
|
+
| Pinch | Zoom in/out | Provide +/- zoom buttons |
|
|
94
|
+
| Drag | Reorder list items | Provide move up/down buttons |
|
|
95
|
+
|
|
96
|
+
### Critical Rule
|
|
97
|
+
```text
|
|
98
|
+
Never rely on gestures as the only way to perform a primary action.
|
|
99
|
+
Always provide a visible tappable alternative.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 6. Safe Areas and Notch
|
|
105
|
+
|
|
106
|
+
- Use `SafeArea` widget to avoid notch, status bar, home indicator on iOS.
|
|
107
|
+
- Use `MediaQuery.padding` and `ViewInsets` for keyboard handling.
|
|
108
|
+
- On Android: handle cutouts (notch/punch-hole) via `systemUIOverlayStyle`.
|
|
109
|
+
|
|
110
|
+
### Keyboard Behavior
|
|
111
|
+
- When keyboard opens: scroll content, do not overlap input fields.
|
|
112
|
+
- Use `resizeToAvoidBottomInset: true` in Scaffold.
|
|
113
|
+
- Provide "Done" / dismiss keyboard button for numeric fields.
|
|
114
|
+
- Test all forms with keyboard open.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 7. Navigation
|
|
119
|
+
|
|
120
|
+
| Pattern | Best For | Notes |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| Bottom Navigation Bar | 3–5 top-level destinations | Standard mobile pattern |
|
|
123
|
+
| Tab Bar (iOS) | 2–5 top-level destinations | iOS-native feel |
|
|
124
|
+
| Navigation Drawer | 5+ destinations, settings | Use only when bottom nav is insufficient |
|
|
125
|
+
| Stack Navigation | Drill-down (list → detail) | Default for sub-screens |
|
|
126
|
+
| Modal / Bottom Sheet | Filters, actions, picks | Keep sheets short; avoid nested scroll |
|
|
127
|
+
|
|
128
|
+
### Navigation hierarchy
|
|
129
|
+
- Max 3 levels deep for primary workflows (tab → list → detail).
|
|
130
|
+
- For deeper navigation, use breadcrumbs or step indicators.
|
|
131
|
+
- Do not mix Bottom Navigation + Drawer unless absolutely necessary.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 8. Loading, Empty, Error, Offline States
|
|
136
|
+
|
|
137
|
+
Every screen must handle these states:
|
|
138
|
+
|
|
139
|
+
| State | UI Element | Notes |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| **Loading** | Skeleton shimmer / CircularProgressIndicator | Show immediately on navigation |
|
|
142
|
+
| **Empty** | Illustration + message + CTA | "No items yet — Create first item" |
|
|
143
|
+
| **Error** | Error illustration + message + retry button | "Something went wrong — Try again" |
|
|
144
|
+
| **Offline** | Offline banner / snackbar + cached content | Show at top; allow browsing cached data |
|
|
145
|
+
| **Permission denied** | Rationale explanation + settings button | "Camera access needed — Open Settings" |
|
|
146
|
+
|
|
147
|
+
### Offline Behavior
|
|
148
|
+
- Show offline indicator immediately when connectivity is lost.
|
|
149
|
+
- If offline data is available, show it with a "cached" label.
|
|
150
|
+
- If offline data is not available, show the offline state with a retry button.
|
|
151
|
+
- Reconnect automatically when connectivity returns.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 9. Permissions
|
|
156
|
+
|
|
157
|
+
Handle every permission state gracefully:
|
|
158
|
+
|
|
159
|
+
| State | Action |
|
|
160
|
+
|---|---|
|
|
161
|
+
| Not yet requested | Request at the moment of need (not on app start) |
|
|
162
|
+
| Granted | Proceed with the feature |
|
|
163
|
+
| Denied | Show explanation + request again |
|
|
164
|
+
| Permanently denied | Show explanation + "Open Settings" button |
|
|
165
|
+
| Restricted (parental control) | Show "Not available" message |
|
|
166
|
+
|
|
167
|
+
### Rules
|
|
168
|
+
- Request permissions **contextually** — when the user triggers the feature, not at app start.
|
|
169
|
+
- Explain **why** the permission is needed before requesting (use a dialog or bottom sheet).
|
|
170
|
+
- Never crash on denied permissions.
|
|
171
|
+
- Test all permission flows (grant, deny, deny permanently).
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 10. Responsive Layout
|
|
176
|
+
|
|
177
|
+
| Device | Layout Behavior |
|
|
178
|
+
|---|---|
|
|
179
|
+
| **Phone (portrait)** | Single column, bottom navigation |
|
|
180
|
+
| **Phone (landscape)** | Single column, consider hiding bottom nav behind hamburger |
|
|
181
|
+
| **Small tablet (7")** | Adaptive — single or two-column depending on content |
|
|
182
|
+
| **Large tablet (10"+) / Foldable** | Two-column layout (master-detail) or navigation rail |
|
|
183
|
+
| **Foldable (unfolded)** | Treat as tablet when unfolded, phone when folded |
|
|
184
|
+
|
|
185
|
+
### Rules
|
|
186
|
+
- Use `LayoutBuilder` or `MediaQuery.size` to adapt layout.
|
|
187
|
+
- Do not hard-code a single layout for all screen sizes.
|
|
188
|
+
- Test on both phone (360–428 dp) and tablet (600–900 dp) widths.
|
|
189
|
+
- Support portrait and landscape (or explicitly lock to portrait if the UI breaks).
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 11. Portrait / Landscape
|
|
194
|
+
|
|
195
|
+
| Application Type | Orientation Rule |
|
|
196
|
+
|---|---|
|
|
197
|
+
| Form-heavy apps | Portrait preferred; landscape acceptable |
|
|
198
|
+
| Media/video apps | Both required |
|
|
199
|
+
| Games (simple) | Landscape preferred |
|
|
200
|
+
| Reader / document apps | Both required |
|
|
201
|
+
| Camera / barcode apps | Portrait preferred |
|
|
202
|
+
|
|
203
|
+
- Document orientation support in `PROJECT_RULES.md`.
|
|
204
|
+
- If landscape is supported, do not crop or break the UI.
|
|
205
|
+
- Use `OrientationBuilder` to adapt layout when orientation changes.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 12. RTL / LTR
|
|
210
|
+
|
|
211
|
+
For Arabic/RTL projects (Tera's primary market):
|
|
212
|
+
|
|
213
|
+
- Set `Directionality.rtl` at the app root.
|
|
214
|
+
- Test all screens with long Arabic text (no truncation or overflow).
|
|
215
|
+
- Verify leading/trailing alignment: RTL uses leading = right, trailing = left.
|
|
216
|
+
- Check icon alignment: back arrow = right-pointing in RTL.
|
|
217
|
+
- Test both RTL and LTR if the app supports multiple languages.
|
|
218
|
+
|
|
219
|
+
### Standard RTL adjustments
|
|
220
|
+
- Padding/margin: reverse left/right values when switching locale.
|
|
221
|
+
- Icons: flip horizontally if they imply direction (arrows, chevrons).
|
|
222
|
+
- Text alignment: auto-align with `TextAlign.start` / `TextAlign.end`.
|
|
223
|
+
- Sliders and progress: reverse direction for RTL.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 13. Accessibility (Mobile)
|
|
228
|
+
|
|
229
|
+
| Requirement | Standard |
|
|
230
|
+
|---|---|
|
|
231
|
+
| Touch target size | 48 x 48 dp minimum |
|
|
232
|
+
| Text contrast | WCAG AA minimum (4.5:1 normal text, 3:1 large) |
|
|
233
|
+
| Screen reader | `Semantics` widget for custom widgets |
|
|
234
|
+
| Focus order | Logical (LTR: top→bottom→left→right) |
|
|
235
|
+
| Reduce motion | Support `AnimationController` with `disableAnimations` |
|
|
236
|
+
| Font scaling | Support system font size changes; test with large fonts |
|
|
237
|
+
| Button labels | Use `Semantics` labels for icon-only buttons |
|
|
238
|
+
|
|
239
|
+
### Checklist
|
|
240
|
+
- [ ] All icons have `Semantics` labels.
|
|
241
|
+
- [ ] All form fields have `Semantics` hints/labels.
|
|
242
|
+
- [ ] Custom gestures have accessible alternatives.
|
|
243
|
+
- [ ] System font size changes do not break layout.
|
|
244
|
+
- [ ] Screen reader reads content in correct order.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 14. Platform Adaptation
|
|
249
|
+
|
|
250
|
+
When building for both platforms:
|
|
251
|
+
|
|
252
|
+
| Element | Android | iOS | Adaptive |
|
|
253
|
+
|---|---|---|---|
|
|
254
|
+
| App bar | Material AppBar | CupertinoNavBar | Platform-adaptive |
|
|
255
|
+
| Bottom nav | BottomNavigationBar | CupertinoTabBar | Platform-adaptive |
|
|
256
|
+
| Switch | Material Switch | CupertinoSwitch | Platform-adaptive |
|
|
257
|
+
| Slider | Material Slider | CupertinoSlider | Platform-adaptive |
|
|
258
|
+
| Date picker | Material DatePicker | CupertinoDatePicker | Platform-adaptive |
|
|
259
|
+
| Time picker | Material TimePicker | CupertinoTimerPicker | Platform-adaptive |
|
|
260
|
+
| Dialog | AlertDialog | CupertinoAlertDialog | Platform-adaptive |
|
|
261
|
+
| Activity indicator | CircularProgressIndicator | CupertinoActivityIndicator | Platform-adaptive |
|
|
262
|
+
|
|
263
|
+
Use `ThemeMode.system` as default to respect user's system theme (light/dark).
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 15. Icons, Splash Screen, and Store Assets
|
|
268
|
+
|
|
269
|
+
### App Icon
|
|
270
|
+
- Android: Adaptive icon (foreground + background layers).
|
|
271
|
+
- iOS: App icon set in Assets.xcassets (multiple sizes).
|
|
272
|
+
- Generate from a single source using `flutter_launcher_icons`.
|
|
273
|
+
|
|
274
|
+
### Splash Screen
|
|
275
|
+
- Use `flutter_native_splash` package for native splash.
|
|
276
|
+
- Keep splash simple: logo + brand background.
|
|
277
|
+
- Configure for both light and dark mode.
|
|
278
|
+
|
|
279
|
+
### Store Assets
|
|
280
|
+
| Asset | Android | iOS |
|
|
281
|
+
|---|---|---|
|
|
282
|
+
| Screenshots | 1–8 per device type (phone, tablet) | 1–8 per device type |
|
|
283
|
+
| Feature graphic | 1024 x 500 px | N/A |
|
|
284
|
+
| App icon | 512 x 512 px | 1024 x 1024 px |
|
|
285
|
+
| Description | 4000 chars max | 4000 chars max |
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## 16. Design Review Additions (Mobile)
|
|
290
|
+
|
|
291
|
+
In addition to `DESIGN_REVIEW_STANDARDS.md`, mobile designs must be checked for:
|
|
292
|
+
|
|
293
|
+
- [ ] Touch targets meet minimum 48x48 dp.
|
|
294
|
+
- [ ] No gesture-only primary actions.
|
|
295
|
+
- [ ] All states handled: loading, empty, error, offline, permission-denied.
|
|
296
|
+
- [ ] Safe areas respected (notch, status bar, home indicator).
|
|
297
|
+
- [ ] Keyboard does not overlap input fields.
|
|
298
|
+
- [ ] Platform patterns respected (Android vs iOS conventions).
|
|
299
|
+
- [ ] RTL layouts tested with long text.
|
|
300
|
+
- [ ] Font scaling does not break layout.
|
|
301
|
+
- [ ] Dark mode tested if supported.
|
|
302
|
+
- [ ] Both portrait and landscape tested (if landscape is supported).
|
|
303
|
+
- [ ] Tablet layout adapted (not just stretched phone UI).
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 17. UI Acceptance Gate — Mobile Additions
|
|
308
|
+
|
|
309
|
+
When the project is **Mobile**, the UI Acceptance Gate (from `UI_ACCEPTANCE_GATE.md`) must include these additional checks:
|
|
310
|
+
|
|
311
|
+
| Check | Required Result |
|
|
312
|
+
|---|---|
|
|
313
|
+
| Touch targets ≥ 48x48 dp | PASS |
|
|
314
|
+
| All states handled (loading, empty, error, offline, permission) | PASS |
|
|
315
|
+
| Safe areas respected | PASS |
|
|
316
|
+
| Keyboard behavior tested | PASS |
|
|
317
|
+
| Platform patterns applied (Material vs Cupertino) | PASS / N/A |
|
|
318
|
+
| RTL/LTR tested | PASS / N/A |
|
|
319
|
+
| Portrait and landscape tested | PASS / N/A |
|
|
320
|
+
| Font scaling tested | PASS |
|
|
321
|
+
| Screen reader accessible | PASS |
|
|
322
|
+
| At least one real device test per target platform | PASS / N/A |
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## 18. References
|
|
327
|
+
|
|
328
|
+
| Topic | Source |
|
|
329
|
+
|---|---|
|
|
330
|
+
| Material Design 3 | https://m3.material.io |
|
|
331
|
+
| Apple Human Interface Guidelines | https://developer.apple.com/design/human-interface-guidelines |
|
|
332
|
+
| Flutter platform adaptation | https://docs.flutter.dev/platform-integration |
|
|
333
|
+
| Flutter accessibility | https://docs.flutter.dev/accessibility |
|
|
334
|
+
| Tera Design Review Standards | `tera-system/design-system/DESIGN_REVIEW_STANDARDS.md` |
|
|
335
|
+
| Tera UI Acceptance Gate | `tera-system/design-system/UI_ACCEPTANCE_GATE.md` |
|
|
336
|
+
| Tera Flutter Profile | `tera-system/profiles/flutter-mobile.md` |
|
|
337
|
+
|
|
338
|
+
## 19. Version
|
|
339
|
+
|
|
340
|
+
- **Version:** 1.0.0
|
|
341
|
+
- **Last Updated:** 2026-07-15
|
|
342
|
+
- **Maintainer:** TeraSystemEvolutionAgent (حارس)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# RTL / LTR Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Ensure Arabic and multilingual UI behaves correctly.
|
|
6
|
+
|
|
7
|
+
## Direction Decision
|
|
8
|
+
|
|
9
|
+
Every UI project must record:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Primary direction: RTL / LTR / Both
|
|
13
|
+
Primary language:
|
|
14
|
+
Secondary language:
|
|
15
|
+
Mirroring required: Yes / No
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## RTL Rules
|
|
19
|
+
|
|
20
|
+
- Sidebar defaults to the right for Arabic unless user prefers otherwise.
|
|
21
|
+
- Icons with direction meaning must be mirrored.
|
|
22
|
+
- Numeric and code values may remain LTR inside RTL UI.
|
|
23
|
+
- Table alignment follows data type: text aligns start, numbers align end.
|
|
24
|
+
- Breadcrumbs and step indicators must respect direction.
|
|
25
|
+
|
|
26
|
+
## LTR Rules
|
|
27
|
+
|
|
28
|
+
- Sidebar defaults to left.
|
|
29
|
+
- Do not hardcode left/right in CSS when logical properties are possible.
|
|
30
|
+
|
|
31
|
+
## Engineering Rule
|
|
32
|
+
|
|
33
|
+
Prefer logical CSS properties where possible:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
margin-inline-start / margin-inline-end
|
|
37
|
+
padding-inline-start / padding-inline-end
|
|
38
|
+
inset-inline-start / inset-inline-end
|
|
39
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# UI Acceptance Gate
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This gate is required for every `TASK-COD-*` that creates or modifies UI, frontend layout, visual styling, UI components, or interaction states.
|
|
6
|
+
|
|
7
|
+
## Mandatory Rule
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Any UI implementation task must pass UI_ACCEPTANCE_GATE before it can be accepted or closed.
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Pre-Task Requirements
|
|
14
|
+
|
|
15
|
+
- `Design Source Decision` exists.
|
|
16
|
+
- `project-preparation/28_UI_UX_GUIDELINES.md` exists for visual UI work.
|
|
17
|
+
- Raw sources are saved in `project-preparation/design-source/` when applicable.
|
|
18
|
+
- TASK file includes UI Source, UI Rules, UI Acceptance, and Design Gap Handling.
|
|
19
|
+
- If `Design Source Mode = FIGMA_DESIGN_FILE`: Figma analysis must be completed and rules extracted into `28_UI_UX_GUIDELINES.md` before implementation.
|
|
20
|
+
|
|
21
|
+
## Gate Checklist
|
|
22
|
+
|
|
23
|
+
| Check | Required Result |
|
|
24
|
+
|---|---|
|
|
25
|
+
| UI source mode is recorded | PASS |
|
|
26
|
+
| `28_UI_UX_GUIDELINES.md` used as primary design source | PASS |
|
|
27
|
+
| No invented colors, spacing, typography, or component style | PASS |
|
|
28
|
+
| Component rules followed | PASS |
|
|
29
|
+
| Layout pattern followed | PASS |
|
|
30
|
+
| RTL/LTR rules followed | PASS / N/A |
|
|
31
|
+
| Responsive behavior matches rules | PASS / N/A |
|
|
32
|
+
| Accessibility baseline checked | PASS |
|
|
33
|
+
| Forbidden styling avoided | PASS |
|
|
34
|
+
| Design gaps recorded instead of guessed | PASS / N/A |
|
|
35
|
+
| Existing component patterns reused where available | PASS / N/A |
|
|
36
|
+
| **If FIGMA_DESIGN_FILE: Figma tokens/components matched** | PASS / N/A |
|
|
37
|
+
|
|
38
|
+
## Outcomes
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
PASS
|
|
42
|
+
NEEDS_FIX
|
|
43
|
+
BLOCKED_DESIGN_GAP
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`BLOCKED_DESIGN_GAP` means the task cannot continue until Tera or the user resolves a missing design rule.
|
|
47
|
+
|
|
48
|
+
## UI Acceptance Gate Result
|
|
49
|
+
|
|
50
|
+
Use this template inside the related `project-control/tasks/TASK-COD-XXX.md` before accepting or closing any UI/Frontend task.
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## UI Acceptance Gate Result
|
|
54
|
+
|
|
55
|
+
| Check | Result | Evidence | Notes |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| UI source mode recorded | PASS / FAIL | | |
|
|
58
|
+
| `28_UI_UX_GUIDELINES.md` used as primary design source | PASS / FAIL | | |
|
|
59
|
+
| No invented colors, spacing, typography, or component style | PASS / FAIL | | |
|
|
60
|
+
| Component rules followed | PASS / FAIL | | |
|
|
61
|
+
| Layout pattern followed | PASS / FAIL | | |
|
|
62
|
+
| RTL/LTR rules followed | PASS / FAIL / N/A | | |
|
|
63
|
+
| Responsive behavior matches rules | PASS / FAIL / N/A | | |
|
|
64
|
+
| Accessibility baseline checked | PASS / FAIL | | |
|
|
65
|
+
| Forbidden styling avoided | PASS / FAIL | | |
|
|
66
|
+
| Design gaps recorded instead of guessed | PASS / FAIL / N/A | | |
|
|
67
|
+
| Existing component patterns reused where available | PASS / FAIL / N/A | | |
|
|
68
|
+
| If FIGMA_DESIGN_FILE: Figma tokens/components matched | PASS / FAIL / N/A | | |
|
|
69
|
+
|
|
70
|
+
Gate Status: PASS / NEEDS_FIX / BLOCKED_DESIGN_GAP
|
|
71
|
+
|
|
72
|
+
Design Gaps:
|
|
73
|
+
- ...
|
|
74
|
+
|
|
75
|
+
Required Fixes:
|
|
76
|
+
- ...
|
|
77
|
+
|
|
78
|
+
Reviewer:
|
|
79
|
+
- Tera / UIVisualDesignerAgent / qa-agent / Other
|
|
80
|
+
```
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# KIT_ADMIN_DASHBOARD.md
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Default internal Tera design kit for ERP, CRM, admin panels, internal tools, and dashboards without an external design source.
|
|
6
|
+
|
|
7
|
+
It is a starting point, not a mandatory final identity.
|
|
8
|
+
|
|
9
|
+
## Visual Direction
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Clean administrative dashboard.
|
|
13
|
+
Calm, structured, readable, business-oriented.
|
|
14
|
+
Optimized for RTL Arabic and data-heavy screens.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Design Tokens
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
colors:
|
|
21
|
+
background: "#F6F7F9"
|
|
22
|
+
surface: "#FFFFFF"
|
|
23
|
+
surface-muted: "#F1F3F5"
|
|
24
|
+
border: "#E2E8F0"
|
|
25
|
+
border-strong: "#CBD5E1"
|
|
26
|
+
text: "#111827"
|
|
27
|
+
text-muted: "#64748B"
|
|
28
|
+
primary: "#1F4E79"
|
|
29
|
+
primary-hover: "#173B5C"
|
|
30
|
+
secondary: "#F59E0B"
|
|
31
|
+
accent: "#0F766E"
|
|
32
|
+
success: "#16A34A"
|
|
33
|
+
warning: "#F59E0B"
|
|
34
|
+
danger: "#DC2626"
|
|
35
|
+
info: "#2563EB"
|
|
36
|
+
|
|
37
|
+
typography:
|
|
38
|
+
font-family-ar: "Cairo, Tajawal, sans-serif"
|
|
39
|
+
font-family-en: "Inter, system-ui, sans-serif"
|
|
40
|
+
h1: "28px / 1.25 / 700"
|
|
41
|
+
h2: "22px / 1.3 / 700"
|
|
42
|
+
h3: "18px / 1.35 / 600"
|
|
43
|
+
body: "14px / 1.6 / 400"
|
|
44
|
+
small: "12px / 1.5 / 400"
|
|
45
|
+
button: "14px / 1.2 / 600"
|
|
46
|
+
|
|
47
|
+
spacing:
|
|
48
|
+
base-unit: 4px
|
|
49
|
+
scale: [4, 8, 12, 16, 24, 32, 48, 64]
|
|
50
|
+
|
|
51
|
+
radius:
|
|
52
|
+
sm: "4px"
|
|
53
|
+
md: "8px"
|
|
54
|
+
lg: "12px"
|
|
55
|
+
xl: "16px"
|
|
56
|
+
full: "999px"
|
|
57
|
+
|
|
58
|
+
shadow:
|
|
59
|
+
none: "none"
|
|
60
|
+
sm: "0 1px 2px rgba(15, 23, 42, 0.06)"
|
|
61
|
+
md: "0 4px 12px rgba(15, 23, 42, 0.08)"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Layout Rules
|
|
65
|
+
|
|
66
|
+
- Default pattern: Admin Shell.
|
|
67
|
+
- Sidebar: right side for RTL, 260px expanded, 72px collapsed.
|
|
68
|
+
- Topbar: height 64px, contains search/user/actions when needed.
|
|
69
|
+
- Content padding: 24px desktop, 16px tablet, 12px mobile.
|
|
70
|
+
- Cards use white surface, 1px border, 12px radius.
|
|
71
|
+
- Tables prioritize readability and compact row actions.
|
|
72
|
+
|
|
73
|
+
## Component Rules
|
|
74
|
+
|
|
75
|
+
- Primary button: primary background, white text, md radius.
|
|
76
|
+
- Secondary button: surface background, border, text color.
|
|
77
|
+
- Danger button: danger background only for destructive actions.
|
|
78
|
+
- Inputs: label above, 40px height, visible focus ring.
|
|
79
|
+
- Tables: sticky header when long, clear empty state, pagination by default.
|
|
80
|
+
- Alerts: use status colors with text labels, not color alone.
|
|
81
|
+
|
|
82
|
+
## RTL/LTR
|
|
83
|
+
|
|
84
|
+
- Arabic RTL default.
|
|
85
|
+
- Use logical CSS properties where possible.
|
|
86
|
+
- Numeric values may remain LTR inside RTL UI.
|
|
87
|
+
|
|
88
|
+
## Forbidden Styling
|
|
89
|
+
|
|
90
|
+
- No random gradients.
|
|
91
|
+
- No unapproved dark mode.
|
|
92
|
+
- No extra UI libraries without approval.
|
|
93
|
+
- No arbitrary Tailwind classes outside token system when a token exists.
|
|
94
|
+
- No mixing with unrelated brand styles.
|
|
95
|
+
|
|
96
|
+
## Best For
|
|
97
|
+
|
|
98
|
+
- ERP modules
|
|
99
|
+
- CRM dashboards
|
|
100
|
+
- admin panels
|
|
101
|
+
- internal CRUD apps
|
|
102
|
+
- procurement/inventory/accounting screens
|