@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,369 @@
|
|
|
1
|
+
# Flutter Mobile Technology Profile
|
|
2
|
+
|
|
3
|
+
## 1. Purpose
|
|
4
|
+
|
|
5
|
+
This profile provides Flutter/Dart-specific execution rules for mobile application projects in the Tera system.
|
|
6
|
+
|
|
7
|
+
It is a **stack-specific Technology Profile** — loaded only when a project is classified as Mobile with Flutter as the chosen framework.
|
|
8
|
+
|
|
9
|
+
## 2. Identity
|
|
10
|
+
|
|
11
|
+
| Field | Value |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Profile ID | `flutter-mobile` |
|
|
14
|
+
| Stack | Flutter + Dart |
|
|
15
|
+
| Minimum Dart SDK | 3.0+ |
|
|
16
|
+
| Minimum Flutter SDK | 3.16+ (current stable channel) |
|
|
17
|
+
| Status | Available |
|
|
18
|
+
| Owner | Tera Agent (decision engine) / EngineeringAgent (execution) |
|
|
19
|
+
|
|
20
|
+
## 3. When to Load This Profile
|
|
21
|
+
|
|
22
|
+
Load `flutter-mobile.md` when:
|
|
23
|
+
|
|
24
|
+
- Project classification = **Mobile**
|
|
25
|
+
- Technology stack confirmed as **Flutter + Dart**
|
|
26
|
+
- `project-control/PROJECT_STATE.md` or `project-preparation/08_TECHNICAL_ARCHITECTURE.md` records `Active Technology Profile: flutter-mobile`
|
|
27
|
+
|
|
28
|
+
### Automatic activation triggers
|
|
29
|
+
|
|
30
|
+
| Trigger | Action |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Project type = Mobile AND Stack = Flutter | Load `flutter-mobile.md` as active profile |
|
|
33
|
+
| `PROJECT_STATE.md` sets `flutter-mobile` | Load immediately |
|
|
34
|
+
| Pre-Execution Gate detects mobile + Flutter | Verify profile is loaded; BLOCKED if not |
|
|
35
|
+
|
|
36
|
+
## 4. Project Structure
|
|
37
|
+
|
|
38
|
+
Standard Flutter project layout (created by `flutter create`):
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
lib/
|
|
42
|
+
main.dart
|
|
43
|
+
app.dart
|
|
44
|
+
core/
|
|
45
|
+
theme/
|
|
46
|
+
constants/
|
|
47
|
+
network/
|
|
48
|
+
router/
|
|
49
|
+
utils/
|
|
50
|
+
features/
|
|
51
|
+
{feature_name}/
|
|
52
|
+
data/
|
|
53
|
+
domain/
|
|
54
|
+
presentation/
|
|
55
|
+
l10n/ # Localization (ARB files)
|
|
56
|
+
test/
|
|
57
|
+
integration_test/
|
|
58
|
+
android/
|
|
59
|
+
ios/
|
|
60
|
+
web/ # Optional — web target
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Rules
|
|
64
|
+
|
|
65
|
+
- Do not create additional top-level directories unrelated to the project scope.
|
|
66
|
+
- Prefer feature-first structure over layer-first for medium+ projects.
|
|
67
|
+
- Keep `main.dart` minimal — app configuration belongs in `app.dart` or `core/`.
|
|
68
|
+
|
|
69
|
+
## 5. Architecture Guidance
|
|
70
|
+
|
|
71
|
+
| Concern | Recommendation |
|
|
72
|
+
|---|---|
|
|
73
|
+
| State Management | Provider / Riverpod / Bloc (choose per project complexity) |
|
|
74
|
+
| Navigation | GoRouter / AutoRoute |
|
|
75
|
+
| API Client | Dio / http |
|
|
76
|
+
| Local Storage | SharedPreferences / Hive / Isar / Drift (SQLite) |
|
|
77
|
+
| Dependency Injection | GetIt / Riverpod auto-dispose |
|
|
78
|
+
| Routing / Deep Links | GoRouter with deep link support |
|
|
79
|
+
| Localization | Flutter l10n (ARB files) + intl |
|
|
80
|
+
|
|
81
|
+
### Architecture rules
|
|
82
|
+
|
|
83
|
+
- Do not commit to a state management approach before confirming with the project's `TECHNICAL_ARCHITECTURE.md` or `PROJECT_RULES.md`.
|
|
84
|
+
- For small projects (1–3 screens, minimal state), Provider is sufficient.
|
|
85
|
+
- For medium+ projects, prefer Riverpod or Bloc.
|
|
86
|
+
- Do not add both Provider and Bloc — choose exactly one.
|
|
87
|
+
- Navigation must support deep links if the project uses push notifications or external links.
|
|
88
|
+
|
|
89
|
+
### Offline / Sync
|
|
90
|
+
|
|
91
|
+
| Scenario | Approach |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Read-only offline | Cache API responses with Hive/Isar |
|
|
94
|
+
| Write offline (queue) | Local DB (Drift/Isar) + sync engine |
|
|
95
|
+
| Real-time | WebSocket / Firebase Realtime / MQTT |
|
|
96
|
+
|
|
97
|
+
- Offline support must be explicitly requested in scope. Do not add offline capabilities by default.
|
|
98
|
+
- If offline is required, document the sync conflict resolution strategy (last-write-wins / timestamp / manual).
|
|
99
|
+
|
|
100
|
+
## 6. Permissions
|
|
101
|
+
|
|
102
|
+
Common Flutter permissions:
|
|
103
|
+
|
|
104
|
+
| Permission | Required For | Notes |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| Camera | Photo/video capture | `image_picker` or `camera` package |
|
|
107
|
+
| Location (background) | GPS tracking | `geolocator` + `permission_handler` |
|
|
108
|
+
| Location (foreground) | Map, near-by features | `geolocator` |
|
|
109
|
+
| Notifications | Push notifications | `firebase_messaging` / `flutter_local_notifications` |
|
|
110
|
+
| Storage (Android < 10) | File download/save | `permission_handler` |
|
|
111
|
+
| Photos/Media (Android 13+) | Image picker | Declare in `AndroidManifest.xml` |
|
|
112
|
+
| Biometric | Fingerprint/Face auth | `local_auth` |
|
|
113
|
+
|
|
114
|
+
### Rules
|
|
115
|
+
|
|
116
|
+
- Request permissions at runtime — do not assume they are granted.
|
|
117
|
+
- Handle denied / permanently-denied states gracefully (show rationale, open settings).
|
|
118
|
+
- Document every permission in the project's `15_SECURITY_AND_ACCESS_CONTROL.md` or `PROJECT_RULES.md`.
|
|
119
|
+
- **Do not add permissions not required by the approved scope.**
|
|
120
|
+
|
|
121
|
+
## 7. Push Notifications
|
|
122
|
+
|
|
123
|
+
| Service | Package | Notes |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| Firebase Cloud Messaging (FCM) | `firebase_messaging` | Default for Android + iOS |
|
|
126
|
+
| Local notifications | `flutter_local_notifications` | Scheduled / in-app notifications |
|
|
127
|
+
|
|
128
|
+
- FCM requires Firebase project setup + `google-services.json` (Android) + `GoogleService-Info.plist` (iOS).
|
|
129
|
+
- Local notifications do not require Firebase.
|
|
130
|
+
- Do not add push notifications unless explicitly in scope.
|
|
131
|
+
|
|
132
|
+
## 8. Secure Storage
|
|
133
|
+
|
|
134
|
+
| Use Case | Package |
|
|
135
|
+
|---|---|
|
|
136
|
+
| API tokens, keys | `flutter_secure_storage` |
|
|
137
|
+
| Biometric auth | `local_auth` |
|
|
138
|
+
|
|
139
|
+
- Do not store secrets in `SharedPreferences` or `Hive`.
|
|
140
|
+
- Use platform keystore (Keychain on iOS, EncryptedSharedPreferences on Android).
|
|
141
|
+
|
|
142
|
+
## 9. Testing
|
|
143
|
+
|
|
144
|
+
| Type | Tool | Notes |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| Unit tests | `flutter_test` | For models, services, controllers |
|
|
147
|
+
| Widget tests | `flutter_test` | For widgets with mocked dependencies |
|
|
148
|
+
| Integration tests | `integration_test` package | For full user flows |
|
|
149
|
+
| Golden tests | `alchemist` / `golden_toolkit` | For visual regression |
|
|
150
|
+
|
|
151
|
+
### Rules
|
|
152
|
+
|
|
153
|
+
- Unit tests are required for services, repositories, and state management.
|
|
154
|
+
- Widget tests are required for complex or reusable widgets.
|
|
155
|
+
- Integration tests are required for critical user flows (login, checkout, primary workflow).
|
|
156
|
+
- Golden tests are optional — use only when visual consistency is critical.
|
|
157
|
+
- Do not test generated code (freezed, json_serializable).
|
|
158
|
+
- Run `flutter test` before marking any task as complete.
|
|
159
|
+
|
|
160
|
+
## 10. Android Configuration
|
|
161
|
+
|
|
162
|
+
| Item | File | Notes |
|
|
163
|
+
|---|---|---|
|
|
164
|
+
| App ID | `android/app/build.gradle` | `applicationId` |
|
|
165
|
+
| Min SDK | `android/app/build.gradle` | Default 21; adjust per project |
|
|
166
|
+
| Target SDK | `android/app/build.gradle` | Latest stable |
|
|
167
|
+
| Signing | `android/key.properties` + `android/app/build.gradle` | Debug + Release keystore |
|
|
168
|
+
| ProGuard | `android/app/proguard-rules.pro` | Keep Flutter engine classes |
|
|
169
|
+
| Permissions | `android/app/src/main/AndroidManifest.xml` | Declare required permissions |
|
|
170
|
+
|
|
171
|
+
### Build commands
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Debug APK
|
|
175
|
+
flutter build apk --debug
|
|
176
|
+
|
|
177
|
+
# Release APK
|
|
178
|
+
flutter build apk --release
|
|
179
|
+
|
|
180
|
+
# App Bundle (recommended for Play Store)
|
|
181
|
+
flutter build appbundle --release
|
|
182
|
+
|
|
183
|
+
# Android AAB with split per ABI
|
|
184
|
+
flutter build appbundle --release --target-platform android-arm,android-arm64,android-x64
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## 11. iOS Configuration
|
|
188
|
+
|
|
189
|
+
| Item | File | Notes |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| Bundle ID | `ios/Runner.xcodeproj` / Xcode project | Reverse-domain |
|
|
192
|
+
| Minimum iOS version | `ios/Podfile` or Xcode project | Default 12.0 |
|
|
193
|
+
| Signing (dev) | Xcode Automatic signing | Requires Apple Developer account |
|
|
194
|
+
| Signing (release) | Xcode / Fastlane match | Distribution certificate |
|
|
195
|
+
| Permissions | `ios/Runner/Info.plist` | Privacy usage descriptions |
|
|
196
|
+
|
|
197
|
+
### Important Constraints
|
|
198
|
+
|
|
199
|
+
| Constraint | Notes |
|
|
200
|
+
|---|---|
|
|
201
|
+
| **iOS build requires macOS** | Flutter iOS builds only work on macOS with Xcode |
|
|
202
|
+
| **iOS simulator does not support camera/motion** | Test camera/location on real device |
|
|
203
|
+
| **App Store requires Apple Developer Program** | $99/year for distribution |
|
|
204
|
+
| **iOS code signing** | Manual or Fastlane; must match bundle ID |
|
|
205
|
+
|
|
206
|
+
### Build commands
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Debug (requires macOS + Xcode)
|
|
210
|
+
flutter build ios --debug
|
|
211
|
+
|
|
212
|
+
# Release (requires macOS + Xcode)
|
|
213
|
+
flutter build ios --release
|
|
214
|
+
|
|
215
|
+
# Archive for App Store (requires macOS + Xcode)
|
|
216
|
+
flutter build ios --release --no-codesign
|
|
217
|
+
# Then open ios/Runner.xcworkspace in Xcode -> Archive
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### iOS Validation Environment Constraint
|
|
221
|
+
|
|
222
|
+
```text
|
|
223
|
+
إذا كانت بيئة iOS غير متوفرة (لا يوجد macOS/Xcode):
|
|
224
|
+
- نفّذ Flutter + Android validation حيثما أمكن
|
|
225
|
+
- سجّل iOS validation كـ "Blocked by Environment" أو "Deferred"
|
|
226
|
+
- لا يُعتبر نجاح Android alone دليلاً على جاهزية iOS Release
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## 12. Environment Verification
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
# Verify Flutter SDK is installed
|
|
233
|
+
flutter doctor
|
|
234
|
+
|
|
235
|
+
# Verify Dart SDK version
|
|
236
|
+
dart --version
|
|
237
|
+
|
|
238
|
+
# Verify project dependencies
|
|
239
|
+
flutter pub get
|
|
240
|
+
|
|
241
|
+
# Run all tests
|
|
242
|
+
flutter test
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Pre-project package compatibility check
|
|
246
|
+
|
|
247
|
+
Before starting any Flutter project:
|
|
248
|
+
1. Run `flutter pub outdated` on a fresh test project.
|
|
249
|
+
2. Verify all intended packages are compatible with current Flutter/Dart version.
|
|
250
|
+
3. Log the Flutter/Dart version used in `PROJECT_STATE.md` or `PROJECT_RULES.md`.
|
|
251
|
+
|
|
252
|
+
## 13. Dependency Governance
|
|
253
|
+
|
|
254
|
+
| Rule | Notes |
|
|
255
|
+
|---|---|
|
|
256
|
+
| Use stable packages only (no beta/dev unless explicitly approved) | Check pub.dev for status |
|
|
257
|
+
| Prefer well-maintained packages (updated within 6 months) | Check last update date |
|
|
258
|
+
| Avoid duplicate packages for the same purpose | Choose one HTTP client, one state management, etc. |
|
|
259
|
+
| Document any package that requires platform-specific setup | Firebase, camera, maps, etc. |
|
|
260
|
+
| Run `flutter pub outdated` at project start and before major upgrades | Log versions used |
|
|
261
|
+
| Do not add packages without explicit scope approval | Every package must serve an approved feature |
|
|
262
|
+
|
|
263
|
+
## 14. Performance
|
|
264
|
+
|
|
265
|
+
| Concern | Guideline |
|
|
266
|
+
|---|---|
|
|
267
|
+
| Frame rate | Maintain 60fps (120fps on high-refresh devices) |
|
|
268
|
+
| Image loading | Use `cached_network_image`; avoid full-resolution images |
|
|
269
|
+
| List performance | Use `ListView.builder` / `GridView.builder` for large lists |
|
|
270
|
+
| State rebuilds | Minimize with `const` constructors, `select()` in Riverpod |
|
|
271
|
+
| Bundle size | Use `--split-debug-info`, `--obfuscate`, `--tree-shake-icons` |
|
|
272
|
+
| Memory | Dispose controllers, streams, and subscriptions |
|
|
273
|
+
|
|
274
|
+
### Build optimization
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Production build with optimizations
|
|
278
|
+
flutter build apk --release --split-debug-info=build/debug-info --obfuscate
|
|
279
|
+
flutter build appbundle --release --split-debug-info=build/debug-info --obfuscate
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## 15. Known Flutter Limits (Document These)
|
|
283
|
+
|
|
284
|
+
| Limit | Notes |
|
|
285
|
+
|---|---|
|
|
286
|
+
| **Platform-specific features** | Camera, Bluetooth, NFC, USB, fingerprint — require platform channels or native packages |
|
|
287
|
+
| **Background execution** | Limited on iOS; Android WorkManager for background tasks |
|
|
288
|
+
| **Desktop/web** | Flutter web and desktop are separate targets; not interchangeable with mobile |
|
|
289
|
+
| **Native performance** | Heavy 3D, real-time video processing, or complex animations may need native code |
|
|
290
|
+
| **Platform channels** | Custom native code requires Kotlin/Swift knowledge — specialist work |
|
|
291
|
+
|
|
292
|
+
### Escalation Path
|
|
293
|
+
|
|
294
|
+
When a requirement exceeds Flutter's capabilities (native-heavy, unsupported hardware, etc.):
|
|
295
|
+
|
|
296
|
+
1. **Assess** — Is this doable in Flutter with a package? If yes, proceed.
|
|
297
|
+
2. **Escalate to specialist** — If platform channels, native modules, or complex native features are needed, create a focused task for native development.
|
|
298
|
+
3. **Defer** — If the feature is optional and native-heavy, defer to a future phase.
|
|
299
|
+
4. **Request Tera decision** — If unclear, generate an AIS suggestion or ask Majed.
|
|
300
|
+
|
|
301
|
+
## 16. Security (Reference Only)
|
|
302
|
+
|
|
303
|
+
Refer to existing Tera security policies:
|
|
304
|
+
|
|
305
|
+
- `project-preparation/15_SECURITY_AND_ACCESS_CONTROL.md`
|
|
306
|
+
- `tera-system/TeraPreExecutionGate.md` (secret handling rules)
|
|
307
|
+
- `project-preparation/PROJECT_RULES.md`
|
|
308
|
+
|
|
309
|
+
Flutter-specific security notes:
|
|
310
|
+
|
|
311
|
+
- Use `flutter_secure_storage` for tokens — not `SharedPreferences`.
|
|
312
|
+
- Obfuscate release builds (`--obfuscate`).
|
|
313
|
+
- Do not hard-code API keys or secrets.
|
|
314
|
+
- Validate SSL/TLS in production (do not disable certificate verification).
|
|
315
|
+
- For biometric auth, use `local_auth` package.
|
|
316
|
+
|
|
317
|
+
## 17. QA / Acceptance (Reference Only)
|
|
318
|
+
|
|
319
|
+
Refer to:
|
|
320
|
+
|
|
321
|
+
- `project-preparation/10_TESTING_AND_ACCEPTANCE.md`
|
|
322
|
+
- `tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md` (§ Mobile Checklists)
|
|
323
|
+
- `tera-system/design-system/UI_ACCEPTANCE_GATE.md`
|
|
324
|
+
|
|
325
|
+
Flutter QA rules:
|
|
326
|
+
|
|
327
|
+
- Test on both Android and iOS (or document if iOS is environment-blocked).
|
|
328
|
+
- Test on at least one real device per target platform.
|
|
329
|
+
- Test offline/online states.
|
|
330
|
+
- Test permission grant/deny/deny-permanently flows.
|
|
331
|
+
- Test with weak network (throttled) if the app uses API calls.
|
|
332
|
+
- Test RTL/LTR layout for multilingual apps.
|
|
333
|
+
|
|
334
|
+
## 18. DevOps / Release (Reference Only)
|
|
335
|
+
|
|
336
|
+
Refer to:
|
|
337
|
+
|
|
338
|
+
- `project-control/PROJECT_DETAILED_EXECUTION_PLAN.md`
|
|
339
|
+
- `project-preparation/22_DEPLOYMENT_AND_ENVIRONMENTS.md`
|
|
340
|
+
- `tera-system/runtime/VERSION_LIFECYCLE_PROTOCOL.md`
|
|
341
|
+
|
|
342
|
+
Flutter release notes:
|
|
343
|
+
|
|
344
|
+
- Android: AAB for Play Store, APK for direct distribution.
|
|
345
|
+
- iOS: IPA via Xcode Archive + App Store Connect.
|
|
346
|
+
- Version strings in `pubspec.yaml`: `version: 1.0.0+1` (semantic + build number).
|
|
347
|
+
- For iOS, increment build number for each TestFlight submission.
|
|
348
|
+
|
|
349
|
+
## 19. References
|
|
350
|
+
|
|
351
|
+
| Topic | Source |
|
|
352
|
+
|---|---|
|
|
353
|
+
| Flutter official docs | https://docs.flutter.dev |
|
|
354
|
+
| Dart official docs | https://dart.dev |
|
|
355
|
+
| State management | Riverpod / Bloc / Provider |
|
|
356
|
+
| Flutter project structure guidelines | https://docs.flutter.dev/get-started/codelab |
|
|
357
|
+
| Tera Design Governance | `tera-system/design-system/` |
|
|
358
|
+
| Tera Mobile UI/UX Standards | `tera-system/design-system/MOBILE_UI_UX_STANDARDS.md` |
|
|
359
|
+
| Tera Pre-Execution Gate | `tera-system/TeraPreExecutionGate.md` |
|
|
360
|
+
| Tera QA/Acceptance | `tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md` |
|
|
361
|
+
| Tera Security | `tera-system/TeraPreExecutionGate.md` (Secret Handling) |
|
|
362
|
+
|
|
363
|
+
## 20. Profile Version
|
|
364
|
+
|
|
365
|
+
- **Current Profile Version:** 1.0.0
|
|
366
|
+
- **Last Updated:** 2026-07-15
|
|
367
|
+
- **Maintainer:** TeraSystemEvolutionAgent (حارس)
|
|
368
|
+
- **Flutter Baseline:** 3.16+ (stable channel)
|
|
369
|
+
- **Dart Baseline:** 3.0+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Technology Profile: nextjs-prisma
|
|
2
|
+
|
|
3
|
+
## 1. Profile Identity
|
|
4
|
+
|
|
5
|
+
- Profile ID: `nextjs-prisma`
|
|
6
|
+
- Language: TypeScript
|
|
7
|
+
- Framework: Next.js
|
|
8
|
+
- Database: PostgreSQL
|
|
9
|
+
- ORM: Prisma
|
|
10
|
+
- Package Manager / CLI: npm, npx
|
|
11
|
+
- Default Project Type: Web admin / internal business application
|
|
12
|
+
|
|
13
|
+
## 2. Applicability
|
|
14
|
+
|
|
15
|
+
Use this profile when the approved architecture is based on Next.js with TypeScript,
|
|
16
|
+
PostgreSQL, and Prisma.
|
|
17
|
+
|
|
18
|
+
## 3. Default Execution Order
|
|
19
|
+
|
|
20
|
+
1. Scaffold project.
|
|
21
|
+
2. Add ORM basics.
|
|
22
|
+
3. Define schema.
|
|
23
|
+
4. Apply database changes in a separate approved task.
|
|
24
|
+
5. Implement auth/permissions if approved.
|
|
25
|
+
6. Build backend workflows and UI in small batches.
|
|
26
|
+
|
|
27
|
+
## 4. First Task Rule
|
|
28
|
+
|
|
29
|
+
Safe first task:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Scaffold Next.js + TypeScript + install Prisma + create a basic prisma/schema.prisma + create .env.example only
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 5. Scaffold Rules
|
|
36
|
+
|
|
37
|
+
- Prefer an explicit scaffold command with explicit flags.
|
|
38
|
+
- Prefer disabling unwanted defaults at scaffold time.
|
|
39
|
+
- Directory name must come from the project/task context, not be hardcoded in the system.
|
|
40
|
+
|
|
41
|
+
Example safe pattern:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx create-next-app@latest <project-folder> --typescript --eslint --app --src-dir --import-alias "@/*" --use-npm
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 6. ORM / Database Rules
|
|
48
|
+
|
|
49
|
+
- Do not use `npx prisma init` if the task forbids creating `.env`.
|
|
50
|
+
- Create `prisma/schema.prisma` manually when needed.
|
|
51
|
+
- In the first task, allow only:
|
|
52
|
+
- `generator client`
|
|
53
|
+
- `datasource db`
|
|
54
|
+
- Do not add Prisma models in the first task.
|
|
55
|
+
- Treat `prisma generate`, `db push`, and migrations as separate tasks unless the user explicitly approves combining them.
|
|
56
|
+
- Prisma schema may define field types and relations.
|
|
57
|
+
- Business validation rules such as `amount > 0` must not become database constraints unless explicitly approved.
|
|
58
|
+
|
|
59
|
+
## 7. CLI Side Effects
|
|
60
|
+
|
|
61
|
+
- `create-next-app` creates scaffold files and may add UI/CSS defaults.
|
|
62
|
+
- Prisma commands may create `.env`, schema files, generated client code, or database-side changes.
|
|
63
|
+
- Package installation changes `package.json` and lockfiles.
|
|
64
|
+
|
|
65
|
+
## 8. Forbidden Defaults
|
|
66
|
+
|
|
67
|
+
Do not add by default in the first implementation task:
|
|
68
|
+
|
|
69
|
+
- Prisma models
|
|
70
|
+
- `ConnectionTest` model
|
|
71
|
+
- `db push`
|
|
72
|
+
- migrations
|
|
73
|
+
- `prisma generate`
|
|
74
|
+
- real database connection test
|
|
75
|
+
- UI
|
|
76
|
+
- API
|
|
77
|
+
- Auth
|
|
78
|
+
- `.env` with real values
|
|
79
|
+
|
|
80
|
+
## 9. Pre-Execution Gate Additions
|
|
81
|
+
|
|
82
|
+
- Confirm scaffold flags avoid unapproved CSS/UI defaults.
|
|
83
|
+
- Confirm Prisma command does not create `.env` when `.env.example` only is allowed.
|
|
84
|
+
- Confirm schema file is basic only if the task is still the first technical setup task.
|
|
85
|
+
- Confirm database apply commands are split into their own approved task.
|
|
86
|
+
|
|
87
|
+
## 10. UI Components (shadcn/ui + Teranoo Registry)
|
|
88
|
+
|
|
89
|
+
After scaffold, initialize shadcn/ui and add standard components:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# 1. تهيئة shadcn/ui (اختيار: Default style, Neutral color, CSS variables)
|
|
93
|
+
npx shadcn@latest init
|
|
94
|
+
|
|
95
|
+
# 2. إضافة المكونات الأساسية
|
|
96
|
+
npx shadcn@latest add button card input label form select table dropdown-menu dialog tabs
|
|
97
|
+
|
|
98
|
+
# 3. إضافة مكونات Teranoo Registry (حسب الحاجة)
|
|
99
|
+
npx shadcn@latest add dashboard-layout kpi-card --registry=./tera-system/teranoo-ui
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Standard component set for all UI projects:
|
|
103
|
+
`button card input label form select table dropdown-menu dialog tabs`
|
|
104
|
+
|
|
105
|
+
## 11. Acceptance Criteria Patterns
|
|
106
|
+
|
|
107
|
+
- Scaffold succeeds with the approved project structure only.
|
|
108
|
+
- No unapproved UI/CSS/theme files remain.
|
|
109
|
+
- No real secrets are written.
|
|
110
|
+
- No schema models or database apply commands run unless the task explicitly allows them.
|