@amogads/ui 1.0.1 → 1.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/README.md CHANGED
@@ -73,6 +73,7 @@ src/
73
73
  | **Tokens** | `@amogads/ui/tokens`<br/>`@amogads/ui/theme.css` | `SEMANTIC_TOKENS`, `CHART_TOKENS`, `SIDEBAR_TOKENS`, CSS custom properties |
74
74
  | **Primitives** | `@amogads/ui` | `Button`, `Input`, `Card`, `Table`, `Tabs`, `Dialog`, `Sheet`, `Drawer`, `Select`, `Checkbox`, `RadioGroup`, `Slider`, `Switch`, `Badge`, `Avatar`, `Breadcrumb`, `DropdownMenu`, `Popover`, `Tooltip`, `Command`, `ContextMenu`, `Pagination`, `Progress`, `ScrollArea`, `Skeleton`, `Sonner`, `Toaster`, `Spinner`, `Textarea`, `Toggle`, `Kbd`, `Label`, `Empty`, `Field`, `Form`, `InputGroup`, `InputOTP` |
75
75
  | **Business Components** | `@amogads/ui` | `PageHeader`, `DataTable`, `StatusBadge`, `FilterBar`, `FormSection`, `MetricCard`, `ConfirmDialog`, `PasswordInput`, `SignOutDialog`, `ThemeSwitch`, `ThemeSelector`, `SelectDropdown`, `LongText`, `Search`, `Stats01`, `DatePicker`, `QrCodeDisplay` |
76
+ | **Chat Components** | `@amogads/ui` | `ChatBubble`, `ChatInput`, `ChatHeader`, `TypingIndicator`, `ChatEmptyState`, `AiChatBubble` |
76
77
  | **Page Templates** | `@amogads/ui` | `ListTemplate`, `DetailTemplate`, `FormTemplate`, `WizardTemplate`, `DashboardTemplate`, `WorkspaceTemplate` |
77
78
 
78
79
  ---
@@ -147,110 +148,117 @@ Triggered via GitHub Actions Workflow Dispatch:
147
148
 
148
149
  ---
149
150
 
150
- ## 🤖 Cross-Repository Upgrade Automation
151
+ ## 🔄 Synchronization & Consuming App Workflow (`amogads` ↔ `amoganextapp`)
151
152
 
152
- AmogaDS provides a fully controlled, automated cross-repository dependency upgrade pipeline to keep all consuming applications up to date with `@amogads/ui` releases without risk of accidental code overwrites or regressions.
153
+ `amogads` is the central design system source of truth published to NPM as **`@amogads/ui`**. When you make changes to components, tokens, or templates in `amogads`, follow this standard manual branching workflow to synchronize and adopt changes into your consumer application (e.g. `amoganextapp`).
153
154
 
154
155
  ```
155
- @amogads/ui Release Published (e.g. v1.4.0)
156
-
157
- Discover Registered Apps in consumers-registry.json
158
-
159
- Authenticate via Ephemeral GitHub App Token (Zero PATs)
160
-
161
- Create Isolation Branch (chore/upgrade-amoga-ui-v1.4.0)
162
-
163
- Update package.json & Lockfile ONLY (Protected Code Guard)
164
-
165
- Run Consuming Application CI & Build Checks
166
-
167
- Generate Detailed PR (Changelog + Safety Checks + Rollback Guide)
168
-
169
- Application Owner Reviews & Merges Manually (No Auto-Merge)
156
+ ┌─────────────────────────────────────────────────────────────┐
157
+ │ Step 1: Update AmogaDS (Design System) │
158
+ - Edit components in amogads/src/design-system/... │
159
+ │ - Run tests / build: npm run build:package │
160
+ - Bump version & publish to NPM: npm publish │
161
+ └──────────────────────────────┬──────────────────────────────┘
162
+
163
+
164
+ ┌─────────────────────────────────────────────────────────────┐
165
+ │ Step 2: Create Branch on Consumer App (amoganextapp) │
166
+ - git checkout -b chore/update-amogads-vX.Y.Z │
167
+ │ - npm install @amogads/ui@latest │
168
+ - Verify app UI & build: npm run build │
169
+ └──────────────────────────────┬──────────────────────────────┘
170
+
171
+
172
+ ┌─────────────────────────────────────────────────────────────┐
173
+ │ Step 3: Merge Branch with Main │
174
+ │ - Commit & merge branch into amoganextapp/main │
175
+ │ - Push origin main │
176
+ └─────────────────────────────────────────────────────────────┘
170
177
  ```
171
178
 
172
179
  ---
173
180
 
174
- ### 1. Checking Version Status Across Applications
181
+ ### 📖 Step-by-Step Synchronization Example
175
182
 
176
- Run the central tracker from the `amogads/` directory:
183
+ #### Scenario: Adding a new prop or style tweak to `Button` in `amogads` and adopting it in `amoganextapp`.
184
+
185
+ #### Step 1: Make Changes and Publish in `amogads`
186
+ Navigate to the `amogads` directory:
177
187
  ```bash
178
- npm run consumers:status
188
+ cd amogads
189
+
190
+ # 1. Edit component (e.g. src/design-system/components/ui/button.tsx)
191
+ # 2. Build the package distribution
192
+ npm run build:package
193
+
194
+ # 3. Bump version (patch / minor / major)
195
+ npm version patch
196
+
197
+ # 4. Publish the updated package to NPM
198
+ npm publish --access public
199
+ ```
200
+ *(Example: `@amogads/ui` version is now `1.0.3` on NPM).*
201
+
202
+ #### Step 2: Create a Branch in `amoganextapp` & Update Dependency
203
+ Navigate back to your main application root (`amoganextapp`):
204
+ ```bash
205
+ cd .. # (in amoganextapp root)
206
+
207
+ # 1. Create a dedicated branch for the design system update
208
+ git checkout -b chore/update-amogads-v1.0.3
209
+
210
+ # 2. Install the newly published version from NPM
211
+ npm install @amogads/ui@latest
212
+
213
+ # 3. Test and verify locally
214
+ npm run dev
215
+ npm run build
179
216
  ```
180
217
 
181
- **Live Output Example**:
182
- ```text
183
- ===============================================================
184
- 🌟 AmogaDS (@amogads/ui) Central Consumer Tracker
185
- 📦 Current Design System Version: v1.0.0
186
- ===============================================================
187
-
188
- ┌─────────┬──────────────────────────────────┬──────────────────────────┬───────────┬──────────┬─────────────────┬────────────┬─────────────────────────┬───────────┐
189
- (index) │ Repository │ App Name │ Installed │ Target │ Status │ Automation │ Team │ Active PR │
190
- ├─────────┼──────────────────────────────────┼──────────────────────────┼───────────┼──────────┼─────────────────┼────────────┼─────────────────────────┼───────────┤
191
- 0 │ 'MohammadAmannn/shadcn-admin' │ 'Shadcn Admin Pilot App' │ 'v1.0.0' │ 'v1.0.0' │ '✅ up-to-date' │ 'enabled' │ '@amoga-admin' │ 'None' │
192
- 1 │ 'MohammadAmannn/amoga-analytics' │ 'Amoga Analytics Portal' │ 'v1.0.0' │ 'v1.0.0' │ '✅ up-to-date' │ 'enabled' │ '@amoga-analytics-team' │ 'None' │
193
- └─────────┴──────────────────────────────────┴──────────────────────────┴───────────┴──────────┴─────────────────┴────────────┴─────────────────────────┴───────────┘
194
-
195
- 📊 Summary: 2 registered apps | 2 up-to-date | 0 pending upgrade.
218
+ #### Step 3: Commit and Merge into `main`
219
+ ```bash
220
+ # 1. Stage and commit updated package.json & package-lock.json
221
+ git add package.json package-lock.json
222
+ git commit -m "chore(deps): update @amogads/ui to v1.0.3"
223
+
224
+ # 2. Switch to main and merge your branch
225
+ git checkout main
226
+ git merge chore/update-amogads-v1.0.3
227
+
228
+ # 3. Push to GitHub
229
+ git push origin main
196
230
  ```
197
231
 
198
232
  ---
199
233
 
200
- ### 2. How to Register a New Consuming Application
234
+ ## 🤖 Cross-Repository Registry & Automation Controls
201
235
 
202
- To register a new Next.js application for automated `@amogads/ui` upgrades, add an entry to [`consumers-registry.json`](consumers-registry.json):
236
+ AmogaDS maintains a consumer registry in [`consumers-registry.json`](consumers-registry.json) to track connected applications:
203
237
 
204
238
  ```json
205
239
  {
206
- "id": "my-new-app",
207
- "name": "My Next.js Application",
208
- "repository": "OrganizationOrOwner/my-new-app",
240
+ "id": "amoganextapp",
241
+ "name": "Amoga Next App",
242
+ "repository": "MohammadAmannn/amoganextapp",
209
243
  "defaultBranch": "main",
210
244
  "packagePath": "package.json",
211
- "currentVersion": "1.0.0",
212
- "targetVersion": "1.0.0",
245
+ "currentVersion": "1.0.2",
246
+ "targetVersion": "1.0.2",
213
247
  "updateStatus": "up-to-date",
214
- "automationStatus": "enabled",
215
- "team": "@my-app-team",
216
- "lastCheckedAt": "2026-08-24T11:00:00Z",
217
- "lastUpgradedAt": "2026-08-24T11:00:00Z",
218
- "activePrUrl": null
248
+ "automationStatus": "disabled",
249
+ "team": "@MohammadAmannn"
219
250
  }
220
251
  ```
221
252
 
222
- #### Field Reference:
223
- * `repository`: GitHub repository in `owner/repo` format.
224
- * `defaultBranch`: Target branch for PRs (usually `main`).
225
- * `automationStatus`: Set to `"enabled"` to receive PRs, or `"paused"` / `"disabled"` to hold updates.
226
- * `team`: Team handle or maintainer notified for PR review.
227
-
228
- ---
229
-
230
- ### 3. Application Code Protection & Security
231
-
232
- The automation engine ([scripts/upgrade-consumers.mjs](scripts/upgrade-consumers.mjs)) enforces strict boundaries:
233
- * **Zero Personal Access Tokens (PATs)**: Uses GitHub App installation tokens scoped with minimum required permissions (`contents: write`, `pull_requests: write`).
234
- * **Protected File Zones**: `app/`, `features/`, `components/custom/`, `src/lib/`, `src/services/`, and state stores are **never modified**.
235
- * **Strict Whitelist**: Automation is only allowed to touch `package.json` and lockfiles (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`). Any unexpected file modification immediately aborts the pipeline.
236
-
237
- ---
253
+ ### Automation Modes:
254
+ * `"automationStatus": "disabled"` *(Default)*: Automated GitHub Action PR bot is disabled. Developers manage their own branch creation, local verification, and merge into `main`.
255
+ * `"automationStatus": "enabled"`: GitHub Actions will automatically clone the consumer, create a branch, and submit a PR via GitHub REST API whenever a release occurs.
238
256
 
239
- ### 4. Reviewing & Merging an Upgrade PR (Developer Guide)
240
-
241
- When an automated upgrade PR is opened in your consuming application:
242
-
243
- 1. **Inspect Version Diff & Changelog**: Check whether the release is `PATCH`, `MINOR`, or `MAJOR` in the PR description.
244
- 2. **Verify CI Status**: Ensure all automated checks (`Lint`, `Typecheck`, `Build`, `Tests`) pass on the PR branch.
245
- 3. **Local Visual Verification (Optional)**:
246
- ```bash
247
- git fetch origin chore/upgrade-amoga-ui-vX.Y.Z
248
- git checkout chore/upgrade-amoga-ui-vX.Y.Z
249
- npm install
250
- npm run dev
251
- ```
252
- Check light/dark mode and key user flows (forms, tables, navigation).
253
- 4. **Manual Approval & Merge**: Approve and merge the PR. *(Auto-merging is intentionally disabled for safety).*
257
+ ### Check Status Across Consumers:
258
+ Run from the `amogads/` directory:
259
+ ```bash
260
+ npm run consumers:status
261
+ ```
254
262
 
255
263
  ---
256
264