proagents 1.6.17 → 1.6.19

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.
Files changed (185) hide show
  1. package/.claude/settings.local.json +169 -0
  2. package/.proagents/AGENTS.md +2 -0
  3. package/.proagents/AI_INSTRUCTIONS.md +13 -0
  4. package/.proagents/ANTIGRAVITY.md +2 -0
  5. package/.proagents/BOLT.md +2 -0
  6. package/.proagents/CHATGPT.md +2 -0
  7. package/.proagents/CLAUDE.md +2 -0
  8. package/.proagents/GEMINI.md +2 -0
  9. package/.proagents/GROQ.md +2 -0
  10. package/.proagents/KIRO.md +2 -0
  11. package/.proagents/LOVABLE.md +2 -0
  12. package/.proagents/PROAGENTS.md +2 -0
  13. package/.proagents/REPLIT.md +2 -0
  14. package/.proagents/prompts/00-project-setup.md +878 -0
  15. package/.proagents/prompts/04-planning.md +38 -0
  16. package/.proagents/prompts/12-rnd.md +957 -0
  17. package/.proagents/workflow-modes/entry-modes.md +27 -0
  18. package/.proagents/worklog/_context.template.md +47 -0
  19. package/COMMANDS.md +654 -0
  20. package/README.md +16 -24
  21. package/package.json +2 -7
  22. package/.proagents/ai-models/README.md +0 -141
  23. package/.proagents/ai-models/cost-management.md +0 -362
  24. package/.proagents/ai-models/fallbacks.md +0 -342
  25. package/.proagents/ai-models/model-config.md +0 -318
  26. package/.proagents/ai-models/task-routing.md +0 -503
  27. package/.proagents/ai-training/README.md +0 -155
  28. package/.proagents/ai-training/continuous-learning.md +0 -413
  29. package/.proagents/ai-training/domain-knowledge.md +0 -378
  30. package/.proagents/ai-training/pattern-learning.md +0 -455
  31. package/.proagents/ai-training/training-data.md +0 -337
  32. package/.proagents/ai-training/user-preferences.md +0 -346
  33. package/.proagents/approval-workflows/README.md +0 -146
  34. package/.proagents/approval-workflows/approval-config.md +0 -332
  35. package/.proagents/approval-workflows/approval-stages.md +0 -503
  36. package/.proagents/approval-workflows/emergency-bypass.md +0 -351
  37. package/.proagents/approval-workflows/examples.md +0 -859
  38. package/.proagents/approval-workflows/notifications.md +0 -320
  39. package/.proagents/compliance/README.md +0 -206
  40. package/.proagents/compliance/access-control.md +0 -310
  41. package/.proagents/compliance/audit-logging.md +0 -444
  42. package/.proagents/compliance/compliance-frameworks.md +0 -429
  43. package/.proagents/compliance/reports.md +0 -491
  44. package/.proagents/compliance/retention-policies.md +0 -454
  45. package/.proagents/config-versioning/README.md +0 -120
  46. package/.proagents/config-versioning/changelog.md +0 -300
  47. package/.proagents/config-versioning/rollback.md +0 -283
  48. package/.proagents/config-versioning/versioning.md +0 -330
  49. package/.proagents/contract-testing/README.md +0 -223
  50. package/.proagents/contract-testing/contract-testing.md +0 -614
  51. package/.proagents/contract-testing/pact-integration.md +0 -507
  52. package/.proagents/contract-testing/schema-validation.md +0 -565
  53. package/.proagents/dependency-management/README.md +0 -140
  54. package/.proagents/dependency-management/automation.md +0 -363
  55. package/.proagents/dependency-management/compatibility.md +0 -319
  56. package/.proagents/dependency-management/security-scanning.md +0 -413
  57. package/.proagents/dependency-management/update-policies.md +0 -374
  58. package/.proagents/disaster-recovery/README.md +0 -247
  59. package/.proagents/disaster-recovery/automation.md +0 -366
  60. package/.proagents/disaster-recovery/backup-recovery.md +0 -571
  61. package/.proagents/disaster-recovery/incident-response.md +0 -565
  62. package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
  63. package/.proagents/disaster-recovery/runbooks.md +0 -603
  64. package/.proagents/disaster-recovery/scenarios.md +0 -892
  65. package/.proagents/disaster-recovery/testing.md +0 -438
  66. package/.proagents/environments/README.md +0 -244
  67. package/.proagents/environments/configuration.md +0 -437
  68. package/.proagents/environments/promotion.md +0 -434
  69. package/.proagents/environments/setup.md +0 -420
  70. package/.proagents/examples/README.md +0 -55
  71. package/.proagents/examples/backend-nodejs/README.md +0 -188
  72. package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
  73. package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
  74. package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
  75. package/.proagents/examples/fullstack-nextjs/README.md +0 -155
  76. package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
  77. package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
  78. package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
  79. package/.proagents/examples/mobile-react-native/README.md +0 -171
  80. package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
  81. package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
  82. package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
  83. package/.proagents/examples/web-frontend-react/README.md +0 -125
  84. package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
  85. package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
  86. package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
  87. package/.proagents/existing-projects/README.md +0 -65
  88. package/.proagents/existing-projects/challenges.md +0 -861
  89. package/.proagents/existing-projects/coexistence-mode.md +0 -483
  90. package/.proagents/existing-projects/compatibility-assessment.md +0 -541
  91. package/.proagents/existing-projects/gradual-adoption.md +0 -515
  92. package/.proagents/existing-projects/migration-strategies.md +0 -788
  93. package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
  94. package/.proagents/existing-projects/team-onboarding.md +0 -617
  95. package/.proagents/existing-projects/technical-debt-handling.md +0 -644
  96. package/.proagents/feature-flags/README.md +0 -263
  97. package/.proagents/feature-flags/ab-testing.md +0 -413
  98. package/.proagents/feature-flags/configuration.md +0 -420
  99. package/.proagents/feature-flags/kill-switches.md +0 -444
  100. package/.proagents/feature-flags/rollout-strategies.md +0 -392
  101. package/.proagents/history.log +0 -12
  102. package/.proagents/i18n/README.md +0 -133
  103. package/.proagents/i18n/extraction.md +0 -433
  104. package/.proagents/i18n/tms-integration.md +0 -332
  105. package/.proagents/i18n/translation-workflow.md +0 -413
  106. package/.proagents/i18n/validation.md +0 -355
  107. package/.proagents/logging/README.md +0 -276
  108. package/.proagents/logging/aggregation.md +0 -475
  109. package/.proagents/logging/log-levels.md +0 -376
  110. package/.proagents/logging/sensitive-data.md +0 -423
  111. package/.proagents/logging/structured-logging.md +0 -406
  112. package/.proagents/metrics/README.md +0 -69
  113. package/.proagents/metrics/code-quality-kpis.md +0 -461
  114. package/.proagents/metrics/deployment-metrics.md +0 -517
  115. package/.proagents/metrics/developer-productivity.md +0 -368
  116. package/.proagents/metrics/learning-effectiveness.md +0 -478
  117. package/.proagents/migrations/README.md +0 -77
  118. package/.proagents/migrations/from-claude-projects.md +0 -313
  119. package/.proagents/migrations/from-cursor-rules.md +0 -345
  120. package/.proagents/migrations/from-custom-workflows.md +0 -410
  121. package/.proagents/monitoring/README.md +0 -308
  122. package/.proagents/monitoring/alerting.md +0 -449
  123. package/.proagents/monitoring/dashboards.md +0 -454
  124. package/.proagents/monitoring/health-checks.md +0 -436
  125. package/.proagents/monitoring/metrics.md +0 -434
  126. package/.proagents/multi-project/README.md +0 -170
  127. package/.proagents/multi-project/coordinated-deploy.md +0 -510
  128. package/.proagents/multi-project/cross-project-deps.md +0 -395
  129. package/.proagents/multi-project/unified-changelog.md +0 -477
  130. package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
  131. package/.proagents/multi-project/workspace-config.md +0 -408
  132. package/.proagents/notifications/README.md +0 -151
  133. package/.proagents/notifications/channels.md +0 -457
  134. package/.proagents/notifications/preferences.md +0 -415
  135. package/.proagents/notifications/routing.md +0 -449
  136. package/.proagents/notifications/scheduling.md +0 -425
  137. package/.proagents/notifications/templates.md +0 -446
  138. package/.proagents/offline-mode/README.md +0 -145
  139. package/.proagents/offline-mode/caching.md +0 -344
  140. package/.proagents/offline-mode/offline-operations.md +0 -312
  141. package/.proagents/offline-mode/queue-specifications.md +0 -679
  142. package/.proagents/offline-mode/sync.md +0 -475
  143. package/.proagents/parallel-features/README.md +0 -85
  144. package/.proagents/parallel-features/conflict-detection.md +0 -226
  145. package/.proagents/parallel-features/dependency-management.md +0 -392
  146. package/.proagents/parallel-features/merge-coordination.md +0 -506
  147. package/.proagents/parallel-features/tracking-system.md +0 -416
  148. package/.proagents/performance/README.md +0 -59
  149. package/.proagents/performance/bundle-analysis.md +0 -375
  150. package/.proagents/performance/load-testing.md +0 -563
  151. package/.proagents/performance/runtime-metrics.md +0 -489
  152. package/.proagents/performance/web-vitals.md +0 -425
  153. package/.proagents/plugins/README.md +0 -139
  154. package/.proagents/plugins/creating-plugins.md +0 -504
  155. package/.proagents/plugins/plugin-api.md +0 -467
  156. package/.proagents/plugins/plugin-registry.md +0 -276
  157. package/.proagents/reporting/README.md +0 -158
  158. package/.proagents/reporting/dashboards.md +0 -366
  159. package/.proagents/reporting/exports.md +0 -524
  160. package/.proagents/reporting/quality-metrics.md +0 -385
  161. package/.proagents/reporting/templates/README.md +0 -56
  162. package/.proagents/reporting/templates/dashboard-config.json +0 -187
  163. package/.proagents/reporting/templates/metrics-queries.md +0 -427
  164. package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
  165. package/.proagents/reporting/templates/widgets.md +0 -451
  166. package/.proagents/reporting/velocity-metrics.md +0 -340
  167. package/.proagents/reverse-engineering/README.md +0 -151
  168. package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
  169. package/.proagents/reverse-engineering/code-analysis.md +0 -377
  170. package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
  171. package/.proagents/reverse-engineering/diagram-generation.md +0 -586
  172. package/.proagents/reverse-engineering/documentation-generation.md +0 -468
  173. package/.proagents/reverse-engineering/pattern-detection.md +0 -569
  174. package/.proagents/reverse-engineering/quality-assessment.md +0 -733
  175. package/.proagents/secrets/README.md +0 -278
  176. package/.proagents/secrets/access-control.md +0 -443
  177. package/.proagents/secrets/rotation.md +0 -403
  178. package/.proagents/secrets/scanning.md +0 -487
  179. package/.proagents/secrets/storage.md +0 -394
  180. package/.proagents/webhooks/README.md +0 -126
  181. package/.proagents/webhooks/endpoints.md +0 -298
  182. package/.proagents/webhooks/events.md +0 -316
  183. package/.proagents/webhooks/payloads.md +0 -325
  184. package/.proagents/webhooks/reliability.md +0 -363
  185. package/.proagents/webhooks/security.md +0 -380
@@ -1,553 +0,0 @@
1
- # Full-Stack Next.js Workflow Example
2
-
3
- Complete workflow for adding a User Dashboard feature to a Next.js application.
4
-
5
- ---
6
-
7
- ## Feature Request
8
-
9
- > "Add a user dashboard page that shows user statistics, recent activity, and quick actions."
10
-
11
- ---
12
-
13
- ## Phase 0: Initialization
14
-
15
- ### Mode Detection
16
- ```
17
- Detected: Full Workflow Mode
18
- Reason: New feature with UI, API, and database components
19
- Project Type: Full-stack (Next.js)
20
- ```
21
-
22
- ### Branch Creation
23
- ```bash
24
- git checkout -b feature/user-dashboard
25
- ```
26
-
27
- ---
28
-
29
- ## Phase 1: Codebase Analysis
30
-
31
- ### Project Structure
32
- ```
33
- Existing structure detected:
34
- ├── app/
35
- │ ├── (auth)/
36
- │ ├── (main)/
37
- │ ├── api/
38
- │ └── layout.tsx
39
- ├── components/
40
- ├── lib/
41
- ├── prisma/
42
- └── [configs]
43
-
44
- Framework: Next.js 14 (App Router)
45
- Database: PostgreSQL + Prisma
46
- Auth: NextAuth.js
47
- Styling: Tailwind CSS
48
- State: React Query
49
- ```
50
-
51
- ### Existing Patterns
52
- ```yaml
53
- patterns_detected:
54
- pages: "app/(group)/[route]/page.tsx"
55
- api_routes: "app/api/[resource]/route.ts"
56
- components: "components/[category]/[Name].tsx"
57
- data_fetching: "React Query with server components"
58
- auth: "NextAuth with session provider"
59
- ```
60
-
61
- ---
62
-
63
- ## Phase 2: Requirements
64
-
65
- ### User Stories
66
- ```markdown
67
- 1. As a user, I want to see my dashboard when I log in
68
- - Acceptance: Dashboard shows after successful login
69
- - Acceptance: Redirects to login if not authenticated
70
-
71
- 2. As a user, I want to see my activity statistics
72
- - Acceptance: Shows total posts, comments, likes
73
- - Acceptance: Shows activity trend chart
74
-
75
- 3. As a user, I want to see my recent activity
76
- - Acceptance: Lists last 10 activities
77
- - Acceptance: Shows activity type and timestamp
78
-
79
- 4. As a user, I want quick actions available
80
- - Acceptance: "New Post" button
81
- - Acceptance: "Edit Profile" button
82
- - Acceptance: "View Analytics" button
83
- ```
84
-
85
- ### Technical Requirements
86
- ```yaml
87
- requirements:
88
- authentication: "Required - redirect if not logged in"
89
- database:
90
- - "Query user statistics"
91
- - "Query recent activities"
92
- api:
93
- - "GET /api/dashboard/stats"
94
- - "GET /api/dashboard/activity"
95
- performance:
96
- - "Initial load < 2s"
97
- - "Use server components where possible"
98
- ```
99
-
100
- ---
101
-
102
- ## Phase 3: UI Design
103
-
104
- ### Component Breakdown
105
- ```
106
- DashboardPage
107
- ├── DashboardHeader
108
- │ └── WelcomeMessage
109
- ├── StatsGrid
110
- │ ├── StatCard (Posts)
111
- │ ├── StatCard (Comments)
112
- │ ├── StatCard (Likes)
113
- │ └── StatCard (Views)
114
- ├── ActivityChart
115
- │ └── LineChart (weekly activity)
116
- ├── RecentActivity
117
- │ └── ActivityItem[] (list)
118
- └── QuickActions
119
- ├── ActionButton (New Post)
120
- ├── ActionButton (Edit Profile)
121
- └── ActionButton (Analytics)
122
- ```
123
-
124
- ### Design Specifications
125
- ```yaml
126
- layout:
127
- type: "responsive grid"
128
- desktop: "2 columns"
129
- mobile: "single column"
130
-
131
- components:
132
- StatCard:
133
- size: "200px × 120px"
134
- content: "icon, value, label, trend"
135
- style: "card with shadow, hover effect"
136
-
137
- ActivityChart:
138
- type: "line chart"
139
- data: "7 days activity"
140
- library: "recharts"
141
-
142
- RecentActivity:
143
- items: 10
144
- content: "icon, description, timestamp"
145
- style: "list with hover"
146
-
147
- QuickActions:
148
- layout: "horizontal buttons"
149
- style: "primary, secondary variants"
150
- ```
151
-
152
- ---
153
-
154
- ## Phase 4: Implementation Plan
155
-
156
- ### File Structure
157
- ```
158
- Create:
159
- ├── app/(main)/dashboard/
160
- │ ├── page.tsx # Dashboard page (server component)
161
- │ ├── loading.tsx # Loading skeleton
162
- │ └── error.tsx # Error boundary
163
- ├── app/api/dashboard/
164
- │ ├── stats/route.ts # Stats API
165
- │ └── activity/route.ts # Activity API
166
- ├── components/dashboard/
167
- │ ├── StatsGrid.tsx
168
- │ ├── StatCard.tsx
169
- │ ├── ActivityChart.tsx
170
- │ ├── RecentActivity.tsx
171
- │ ├── QuickActions.tsx
172
- │ └── index.ts
173
- ├── lib/
174
- │ └── dashboard.ts # Dashboard queries
175
- └── types/
176
- └── dashboard.types.ts # Type definitions
177
- ```
178
-
179
- ### Implementation Order
180
- ```
181
- 1. Types and interfaces
182
- 2. Database queries (lib/dashboard.ts)
183
- 3. API routes
184
- 4. UI components (bottom-up)
185
- 5. Page integration
186
- 6. Loading and error states
187
- ```
188
-
189
- ---
190
-
191
- ## Phase 5: Implementation
192
-
193
- ### Types (types/dashboard.types.ts)
194
- ```typescript
195
- export interface DashboardStats {
196
- posts: number;
197
- comments: number;
198
- likes: number;
199
- views: number;
200
- trends: {
201
- posts: number; // percentage change
202
- comments: number;
203
- likes: number;
204
- views: number;
205
- };
206
- }
207
-
208
- export interface ActivityItem {
209
- id: string;
210
- type: 'post' | 'comment' | 'like' | 'follow';
211
- description: string;
212
- timestamp: Date;
213
- metadata?: Record<string, unknown>;
214
- }
215
-
216
- export interface DashboardData {
217
- stats: DashboardStats;
218
- recentActivity: ActivityItem[];
219
- chartData: ChartDataPoint[];
220
- }
221
-
222
- export interface ChartDataPoint {
223
- date: string;
224
- value: number;
225
- }
226
- ```
227
-
228
- ### Database Queries (lib/dashboard.ts)
229
- ```typescript
230
- import { prisma } from '@/lib/db';
231
-
232
- export async function getDashboardStats(userId: string): Promise<DashboardStats> {
233
- const [posts, comments, likes, views] = await Promise.all([
234
- prisma.post.count({ where: { authorId: userId } }),
235
- prisma.comment.count({ where: { authorId: userId } }),
236
- prisma.like.count({ where: { post: { authorId: userId } } }),
237
- prisma.postView.count({ where: { post: { authorId: userId } } }),
238
- ]);
239
-
240
- // Calculate trends (compare to last week)
241
- const lastWeek = new Date();
242
- lastWeek.setDate(lastWeek.getDate() - 7);
243
-
244
- const [prevPosts, prevComments] = await Promise.all([
245
- prisma.post.count({
246
- where: {
247
- authorId: userId,
248
- createdAt: { lt: lastWeek },
249
- },
250
- }),
251
- prisma.comment.count({
252
- where: {
253
- authorId: userId,
254
- createdAt: { lt: lastWeek },
255
- },
256
- }),
257
- ]);
258
-
259
- return {
260
- posts,
261
- comments,
262
- likes,
263
- views,
264
- trends: {
265
- posts: calculateTrend(prevPosts, posts),
266
- comments: calculateTrend(prevComments, comments),
267
- likes: 0,
268
- views: 0,
269
- },
270
- };
271
- }
272
-
273
- export async function getRecentActivity(
274
- userId: string,
275
- limit = 10
276
- ): Promise<ActivityItem[]> {
277
- const activities = await prisma.activity.findMany({
278
- where: { userId },
279
- orderBy: { createdAt: 'desc' },
280
- take: limit,
281
- });
282
-
283
- return activities.map((a) => ({
284
- id: a.id,
285
- type: a.type as ActivityItem['type'],
286
- description: a.description,
287
- timestamp: a.createdAt,
288
- metadata: a.metadata as Record<string, unknown>,
289
- }));
290
- }
291
-
292
- function calculateTrend(prev: number, current: number): number {
293
- if (prev === 0) return current > 0 ? 100 : 0;
294
- return Math.round(((current - prev) / prev) * 100);
295
- }
296
- ```
297
-
298
- ### API Routes (app/api/dashboard/stats/route.ts)
299
- ```typescript
300
- import { NextResponse } from 'next/server';
301
- import { getServerSession } from 'next-auth';
302
- import { authOptions } from '@/lib/auth';
303
- import { getDashboardStats } from '@/lib/dashboard';
304
-
305
- export async function GET() {
306
- const session = await getServerSession(authOptions);
307
-
308
- if (!session?.user?.id) {
309
- return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
310
- }
311
-
312
- try {
313
- const stats = await getDashboardStats(session.user.id);
314
- return NextResponse.json({ data: stats });
315
- } catch (error) {
316
- console.error('Dashboard stats error:', error);
317
- return NextResponse.json(
318
- { error: 'Failed to fetch stats' },
319
- { status: 500 }
320
- );
321
- }
322
- }
323
- ```
324
-
325
- ### StatCard Component (components/dashboard/StatCard.tsx)
326
- ```typescript
327
- import { memo } from 'react';
328
- import { TrendingUp, TrendingDown } from 'lucide-react';
329
- import { cn } from '@/lib/utils';
330
-
331
- interface StatCardProps {
332
- title: string;
333
- value: number;
334
- trend?: number;
335
- icon: React.ReactNode;
336
- }
337
-
338
- export const StatCard = memo(function StatCard({
339
- title,
340
- value,
341
- trend,
342
- icon,
343
- }: StatCardProps) {
344
- const isPositive = trend && trend > 0;
345
- const isNegative = trend && trend < 0;
346
-
347
- return (
348
- <div className="rounded-lg border bg-card p-6 shadow-sm">
349
- <div className="flex items-center justify-between">
350
- <div className="text-muted-foreground">{icon}</div>
351
- {trend !== undefined && (
352
- <div
353
- className={cn(
354
- 'flex items-center text-sm',
355
- isPositive && 'text-green-600',
356
- isNegative && 'text-red-600'
357
- )}
358
- >
359
- {isPositive ? <TrendingUp className="h-4 w-4" /> : null}
360
- {isNegative ? <TrendingDown className="h-4 w-4" /> : null}
361
- <span className="ml-1">{Math.abs(trend)}%</span>
362
- </div>
363
- )}
364
- </div>
365
- <div className="mt-4">
366
- <p className="text-3xl font-bold">{value.toLocaleString()}</p>
367
- <p className="text-sm text-muted-foreground">{title}</p>
368
- </div>
369
- </div>
370
- );
371
- });
372
- ```
373
-
374
- ### Dashboard Page (app/(main)/dashboard/page.tsx)
375
- ```typescript
376
- import { Suspense } from 'react';
377
- import { redirect } from 'next/navigation';
378
- import { getServerSession } from 'next-auth';
379
- import { authOptions } from '@/lib/auth';
380
- import { getDashboardStats, getRecentActivity } from '@/lib/dashboard';
381
- import { StatsGrid } from '@/components/dashboard/StatsGrid';
382
- import { RecentActivity } from '@/components/dashboard/RecentActivity';
383
- import { QuickActions } from '@/components/dashboard/QuickActions';
384
- import { ActivityChart } from '@/components/dashboard/ActivityChart';
385
-
386
- export const metadata = {
387
- title: 'Dashboard',
388
- description: 'Your personal dashboard',
389
- };
390
-
391
- export default async function DashboardPage() {
392
- const session = await getServerSession(authOptions);
393
-
394
- if (!session?.user) {
395
- redirect('/login');
396
- }
397
-
398
- const [stats, activity] = await Promise.all([
399
- getDashboardStats(session.user.id),
400
- getRecentActivity(session.user.id),
401
- ]);
402
-
403
- return (
404
- <div className="container py-8">
405
- <h1 className="text-3xl font-bold mb-8">
406
- Welcome back, {session.user.name}
407
- </h1>
408
-
409
- <div className="grid gap-8">
410
- <StatsGrid stats={stats} />
411
-
412
- <div className="grid gap-8 lg:grid-cols-2">
413
- <Suspense fallback={<div>Loading chart...</div>}>
414
- <ActivityChart userId={session.user.id} />
415
- </Suspense>
416
-
417
- <RecentActivity activities={activity} />
418
- </div>
419
-
420
- <QuickActions />
421
- </div>
422
- </div>
423
- );
424
- }
425
- ```
426
-
427
- ---
428
-
429
- ## Phase 6: Testing
430
-
431
- ### Test Files Created
432
- ```
433
- tests/
434
- ├── components/dashboard/
435
- │ ├── StatCard.test.tsx
436
- │ ├── StatsGrid.test.tsx
437
- │ └── RecentActivity.test.tsx
438
- ├── lib/
439
- │ └── dashboard.test.ts
440
- └── api/dashboard/
441
- └── stats.test.ts
442
- ```
443
-
444
- ### Sample Test (StatCard.test.tsx)
445
- ```typescript
446
- import { render, screen } from '@testing-library/react';
447
- import { FileText } from 'lucide-react';
448
- import { StatCard } from '@/components/dashboard/StatCard';
449
-
450
- describe('StatCard', () => {
451
- it('renders value and title', () => {
452
- render(
453
- <StatCard
454
- title="Total Posts"
455
- value={42}
456
- icon={<FileText />}
457
- />
458
- );
459
-
460
- expect(screen.getByText('42')).toBeInTheDocument();
461
- expect(screen.getByText('Total Posts')).toBeInTheDocument();
462
- });
463
-
464
- it('shows positive trend with green color', () => {
465
- render(
466
- <StatCard
467
- title="Posts"
468
- value={42}
469
- trend={15}
470
- icon={<FileText />}
471
- />
472
- );
473
-
474
- const trend = screen.getByText('15%');
475
- expect(trend).toHaveClass('text-green-600');
476
- });
477
- });
478
- ```
479
-
480
- ### Coverage Report
481
- ```
482
- File | % Stmts | % Branch | % Funcs | % Lines |
483
- ------------------------|---------|----------|---------|---------|
484
- components/dashboard/ | 92.5 | 88.2 | 100 | 92.0 |
485
- lib/dashboard.ts | 95.0 | 90.0 | 100 | 94.5 |
486
- api/dashboard/ | 88.0 | 85.0 | 100 | 87.5 |
487
- ------------------------|---------|----------|---------|---------|
488
- All files | 91.8 | 87.7 | 100 | 91.3 |
489
- ```
490
-
491
- ---
492
-
493
- ## Phase 7: Documentation
494
-
495
- ### Component Documentation
496
- - README added to components/dashboard/
497
- - Props documented with TypeScript interfaces
498
- - Usage examples provided
499
-
500
- ### API Documentation
501
- ```yaml
502
- # Added to docs/api/dashboard.yaml
503
- paths:
504
- /api/dashboard/stats:
505
- get:
506
- summary: Get user dashboard statistics
507
- security:
508
- - bearerAuth: []
509
- responses:
510
- 200:
511
- description: Dashboard statistics
512
- 401:
513
- description: Unauthorized
514
- ```
515
-
516
- ---
517
-
518
- ## Phase 8: Deployment
519
-
520
- ### Pre-Deployment Checklist
521
- - [x] All tests passing
522
- - [x] TypeScript build succeeds
523
- - [x] ESLint passes
524
- - [x] Database migrations ready
525
- - [x] Environment variables documented
526
-
527
- ### Deployment
528
- ```bash
529
- # Merge to develop
530
- git checkout develop
531
- git merge feature/user-dashboard
532
-
533
- # Deploy to staging
534
- vercel --prod
535
- ```
536
-
537
- ---
538
-
539
- ## Summary
540
-
541
- ```
542
- Feature: User Dashboard
543
- Duration: 4 hours
544
- Files Created: 15
545
- Tests Added: 12
546
- Coverage: 91.8%
547
-
548
- Decisions Made:
549
- - Used server components for initial data fetch
550
- - Used React Query for client-side refetching
551
- - Used Recharts for activity visualization
552
- - Followed existing component patterns
553
- ```
@@ -1,171 +0,0 @@
1
- # Mobile React Native Example
2
-
3
- Complete walkthrough of ProAgents workflow for a React Native mobile application.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- This example demonstrates how to use ProAgents to build features in a React Native application for iOS and Android. It covers mobile-specific patterns, navigation, and platform considerations.
10
-
11
- ---
12
-
13
- ## Project Type
14
-
15
- - **Framework:** React Native 0.72+ / Expo
16
- - **Language:** TypeScript
17
- - **Navigation:** React Navigation
18
- - **State Management:** Zustand
19
- - **Testing:** Jest + React Native Testing Library
20
-
21
- ---
22
-
23
- ## Files in This Example
24
-
25
- | File | Description |
26
- |------|-------------|
27
- | [workflow-example.md](./workflow-example.md) | Step-by-step workflow phases |
28
- | [proagents.config.yaml](./proagents.config.yaml) | Project-specific configuration |
29
-
30
- ---
31
-
32
- ## What You'll Learn
33
-
34
- ### 1. Mobile Project Analysis
35
- - Understanding React Native project structure
36
- - Identifying platform-specific code (iOS/Android)
37
- - Navigation flow mapping
38
- - Native module detection
39
-
40
- ### 2. Mobile UI Design
41
- - Converting mobile designs to components
42
- - Platform-specific styling (iOS vs Android)
43
- - Responsive layouts for different devices
44
- - Gesture handling patterns
45
-
46
- ### 3. Implementation
47
- - Screen components and navigation
48
- - Platform-specific code when needed
49
- - Async storage and data persistence
50
- - API integration with offline support
51
-
52
- ### 4. Testing
53
- - Component tests with Testing Library
54
- - Navigation flow tests
55
- - Snapshot testing for UI consistency
56
- - Device-specific testing considerations
57
-
58
- ---
59
-
60
- ## Quick Start
61
-
62
- ```bash
63
- # Copy configuration to your React Native project
64
- cp proagents.config.yaml /path/to/your/react-native-project/
65
-
66
- # Start a new feature
67
- proagents feature start "Add push notification settings screen"
68
- ```
69
-
70
- ---
71
-
72
- ## Example Feature: Notification Settings
73
-
74
- The workflow-example.md demonstrates building:
75
- - Settings screen with toggle switches
76
- - Platform-specific notification permissions
77
- - Local storage for preferences
78
- - Deep linking to system settings
79
-
80
- ---
81
-
82
- ## Key Patterns Demonstrated
83
-
84
- ### Project Structure
85
- ```
86
- src/
87
- ├── screens/ # Screen components
88
- │ ├── HomeScreen.tsx
89
- │ └── SettingsScreen.tsx
90
- ├── components/ # Reusable components
91
- │ ├── ui/
92
- │ └── forms/
93
- ├── navigation/ # Navigation configuration
94
- │ └── RootNavigator.tsx
95
- ├── hooks/ # Custom hooks
96
- ├── services/ # API and native services
97
- ├── stores/ # State management
98
- └── utils/ # Utilities
99
- └── platform.ts # Platform helpers
100
- ```
101
-
102
- ### Platform-Specific Patterns
103
- ```typescript
104
- // Platform-specific code
105
- import { Platform } from 'react-native';
106
-
107
- const styles = StyleSheet.create({
108
- container: {
109
- paddingTop: Platform.OS === 'ios' ? 44 : 0,
110
- },
111
- });
112
-
113
- // Platform-specific files
114
- // Button.ios.tsx
115
- // Button.android.tsx
116
- ```
117
-
118
- ---
119
-
120
- ## Configuration Highlights
121
-
122
- ```yaml
123
- # From proagents.config.yaml
124
- project:
125
- type: "mobile"
126
- framework: "react-native"
127
-
128
- platforms:
129
- ios: true
130
- android: true
131
-
132
- testing:
133
- framework: "jest"
134
- coverage_threshold: 75
135
- snapshot_testing: true
136
-
137
- checkpoints:
138
- after_design: true # Review UI for both platforms
139
- before_deployment: true # Final review before app store
140
- ```
141
-
142
- ---
143
-
144
- ## Mobile-Specific Considerations
145
-
146
- ### Performance
147
- - List virtualization (FlatList)
148
- - Image optimization
149
- - Bundle size monitoring
150
- - Memory management
151
-
152
- ### Platform Differences
153
- - Navigation patterns (tabs vs drawer)
154
- - System UI (status bar, safe areas)
155
- - Permissions handling
156
- - Push notifications
157
-
158
- ### Testing on Devices
159
- - iOS Simulator testing
160
- - Android Emulator testing
161
- - Physical device testing
162
- - Different screen sizes
163
-
164
- ---
165
-
166
- ## Related Resources
167
-
168
- - [React Native Scaffolding Template](../../scaffolding/react-native/)
169
- - [UI Design Integration](../../ui-integration/)
170
- - [Testing Standards](../../testing-standards/)
171
- - [Performance Monitoring](../../performance/)