oneie 1.3.2 → 1.3.4
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/.claude/agents/engineering-architect.md +39 -56
- package/.claude/agents/engineering-developer.md +37 -57
- package/.claude/agents/engineering-director.md +37 -144
- package/.claude/agents/engineering-ingestor.md +229 -0
- package/.claude/agents/engineering-quality-assurance.md +40 -206
- package/.claude/agents/engineering-user-experience.md +36 -207
- package/.claude/agents/improver.md +454 -0
- package/.claude/agents/marketing-brand-identity.md +37 -48
- package/.claude/agents/marketing-director.md +9 -0
- package/.claude/agents/one-orchestrator.md +50 -136
- package/.claude/agents/story-teller.md +10 -0
- package/.claude/agents/task-master.md +10 -0
- package/.claude/agents/turbo-repo-builder.md +51 -0
- package/.claude/claude-code-hooks.json +20 -233
- package/.claude/commands/agent-balance +111 -0
- package/.claude/commands/agent.md +24 -7
- package/.claude/commands/cascade-status.md +128 -0
- package/.claude/commands/ingest.md +290 -0
- package/.claude/commands/ingestor.md +136 -0
- package/.claude/commands/mission.md +26 -8
- package/.claude/commands/one.md +351 -14
- package/.claude/commands/quality-check.md +204 -0
- package/.claude/commands/smart-route.md +220 -0
- package/.claude/commands/start.md +9 -8
- package/.claude/commands/story.md +18 -3
- package/.claude/commands/task.md +22 -1
- package/.claude/settings.local.json +19 -3
- package/.obsidian/core-plugins.json +3 -1
- package/.one/checklists/agent-quality-checklist.md +24 -15
- package/.one/checklists/story-quality-checklist.md +24 -15
- package/.one/checklists/task-quality-checklist.md +24 -15
- package/.one/templates/bun-workspace-guide-template.md +188 -0
- package/.one/templates/bunfig-template.toml +95 -0
- package/.one/templates/root-package-template.json +37 -21
- package/.one/templates/turbo-config-template.json +18 -3
- package/.one/tools/bump-core-version.js +0 -0
- package/.one/tools/bump-expansion-version.js +0 -0
- package/.one/tools/code-generators.js +0 -0
- package/.one/tools/compression-engine.js +638 -0
- package/.one/tools/content-deduplicator.js +336 -0
- package/.one/tools/convert-wav-to-mp3.js +0 -0
- package/.one/tools/foundation-wizard.js +0 -0
- package/.one/tools/generate-toc.js +0 -0
- package/.one/tools/ingestor/cascade-integration.js +523 -0
- package/.one/tools/ingestor/cli.ts +234 -0
- package/.one/tools/ingestor/context-mapper.ts +604 -0
- package/.one/tools/ingestor/error-handling-monitor.js +742 -0
- package/.one/tools/ingestor/file-discovery.ts +484 -0
- package/.one/tools/ingestor/file-transformer.ts +524 -0
- package/.one/tools/ingestor/ingestor-orchestrator.ts +416 -0
- package/.one/tools/ingestor/package.json +47 -0
- package/.one/tools/ingestor/usage-examples.md +458 -0
- package/.one/tools/lazy-loader.js +489 -0
- package/.one/tools/minimal-generators.js +0 -0
- package/.one/tools/performance-benchmark.js +300 -0
- package/.one/tools/premium-manager.js +0 -0
- package/.one/tools/semantic-release-sync-installer.js +0 -0
- package/.one/tools/size-memory-optimizer.js +475 -0
- package/.one/tools/sync-installer-version.js +0 -0
- package/.one/tools/text-to-speech.js +0 -0
- package/.one/tools/transformative-ai-engine.js +0 -0
- package/.one/workflows/safe-improvement-deployment.yaml +420 -0
- package/CLAUDE.md +30 -0
- package/README.md +43 -12
- package/bin/oneie/index.js +4 -4
- package/one/cache/benchmark-results.json +43 -0
- package/one/cache/file-index.json +12480 -0
- package/one/config/agent-routing.yaml +124 -0
- package/one/config/agent-skills.yaml +451 -0
- package/one/config/cache-config.yaml +304 -0
- package/one/config/feedback-templates.yaml +152 -0
- package/one/config/performance-config.yaml +281 -0
- package/one/config/quality-automation.yaml +405 -0
- package/one/config/routing-logic.yaml +292 -0
- package/one/data/task-registry.yaml +224 -0
- package/one/stories/story-1.10-parallel-task-execution-orchestration.md +119 -0
- package/one/stories/story-3.1-external-repository-foundation.md +374 -0
- package/one/stories/story-3.2-3-levels-architecture-integration.md +449 -0
- package/one/stories/story-3.3-multi-platform-application-development.md +677 -0
- package/one/stories/story-3.4-shared-package-system-ui-components.md +854 -0
- package/one/stories/story-3.5-backend-integration-production-deployment.md +1034 -0
- package/one/tasks/task-1.10.1-design-parallel-execution-architecture.md +108 -0
- package/one/tasks/task-1.10.2-create-task-dependency-mapping-system.md +82 -0
- package/one/tasks/task-1.10.3-build-agent-spawning-orchestration-engine.md +120 -0
- package/one/tasks/task-1.10.4-implement-task-queue-dependency-resolution.md +125 -0
- package/one/tasks/task-1.10.5-create-task-numbering-convention-system.md +542 -0
- package/one/tasks/task-3.1.1-external-repository-creation.md +303 -0
- package/one/tasks/task-3.1.2-turborepo-configuration-optimization.md +402 -0
- package/one/tasks/task-3.1.3-shared-configuration-packages.md +571 -0
- package/one/tasks/task-3.1.4-bun-package-management-optimization.md +627 -0
- package/one/tools/task-numbering-validator.js +429 -0
- package/package.json +1 -1
- package/quality-gate-optimization-analysis.md +260 -0
- package/turbo-benchmark.js +268 -0
- package/turbo-optimization-guide.md +163 -0
- package/turbo-workspace-template.json +83 -0
- package/turbo.json +178 -0
- package/.claude/commands/analyst.md +0 -70
- package/.claude/commands/architect.md +0 -67
- package/.claude/commands/commander.md +0 -78
- package/.claude/commands/deploy.md +0 -68
- package/.claude/commands/dev.md +0 -60
- package/.claude/commands/playbook.md +0 -81
- package/.claude/commands/pm.md +0 -64
- package/.claude/commands/po.md +0 -68
- package/.claude/commands/qa.md +0 -59
- package/.claude/commands/taskmaster.md +0 -85
- package/.claude/commands/ux-expert.md +0 -58
- package/.one/stories/bullstamp-attract-module-complete.md +0 -255
- package/.one/stories/bullstamp-deployment-master-plan.md +0 -518
- package/.one/stories/bullstamp-executive-implementation-summary.md +0 -254
- package/.one/stories/bullstamp-project-status-complete.md +0 -257
- package/.one/stories/obsidian-pandoc-config.md +0 -159
- package/.one/stories/story-1.1-perfect-filesystem-organization.md +0 -270
- package/.one/stories/story-1.1.1.md +0 -136
- package/.one/stories/story-1.1.md +0 -131
- package/.one/stories/story-1.2.md +0 -420
- package/.one/stories/story-1.3.md +0 -177
- package/.one/stories/story-1.4.md +0 -356
- package/.one/stories/story-1.5.md +0 -572
- package/.one/stories/story-1.6.md +0 -481
- package/.one/stories/story-1.7.md +0 -923
- package/.one/stories/story-1.8.md +0 -404
- package/.one/stories/story-2.0.md +0 -132
- package/.one/stories/story-2.1.md +0 -110
- package/.one/stories/story-2.2.md +0 -110
- package/.one/stories/story-2.3.md +0 -112
- package/.one/stories/story-2.4.md +0 -116
- package/.one/stories/story-2.5.md +0 -114
- package/.one/stories/story-3.1.md +0 -298
- package/.one/stories/story-3.10.md +0 -302
- package/.one/stories/story-3.11.md +0 -167
- package/.one/stories/story-3.12.md +0 -235
- package/.one/stories/story-3.13.md +0 -235
- package/.one/stories/story-3.14.md +0 -225
- package/.one/stories/story-3.15.md +0 -238
- package/.one/stories/story-3.16.md +0 -244
- package/.one/stories/story-3.17.md +0 -245
- package/.one/stories/story-3.18.md +0 -248
- package/.one/stories/story-3.2.md +0 -226
- package/.one/stories/story-3.3.md +0 -226
- package/.one/stories/story-3.4.md +0 -226
- package/.one/stories/story-3.5.md +0 -167
- package/.one/stories/story-3.6.md +0 -167
- package/.one/stories/story-3.7.md +0 -181
- package/.one/stories/story-3.8.md +0 -198
- package/.one/stories/story-3.9.md +0 -169
- package/.one/stories/story-4.1.md +0 -245
- package/.one/stories/story-4.2.md +0 -314
- package/.one/stories/story-4.3.md +0 -610
- package/.one/stories/story-4.4.md +0 -931
- package/.one/stories/story-4.5.md +0 -727
- package/.one/stories/story-4.6-consistency.md +0 -175
- package/.one/stories/story-5.1.md +0 -508
- package/.one/stories/story-5.2.md +0 -451
- package/.one/stories/story-5.3.md +0 -405
- package/.one/stories/story-5.4.md +0 -447
- package/.one/stories/story-5.5.md +0 -349
- package/.one/stories/story-5.6.md +0 -445
- package/.one/stories/story-6.1-text-content-engine.md +0 -144
- package/.one/stories/story-6.2-audio-content-engine.md +0 -145
- package/.one/stories/story-6.3-video-content-engine.md +0 -145
- package/.one/stories/story-6.4-visual-content-engine.md +0 -177
- package/.one/stories/story-6.5-cross-platform-distribution.md +0 -188
- package/.one/stories/story-6.6.ai-content-generation-pipeline.md +0 -196
- package/.one/stories/story-6.7-character-consistency-quality-control.md +0 -216
- package/.one/stories/story-6.8-claude-code-content-integration.md +0 -181
- package/.one/stories/story-6.8-content-production-workflows.md +0 -247
- package/.one/stories/story-7.1-implementation.md +0 -128
- package/.one/stories/story-7.1.md +0 -203
- package/.one/stories/story-7.2-implementation.md +0 -147
- package/.one/stories/story-7.2.md +0 -415
- package/.one/stories/story-7.3-implementation.md +0 -159
- package/.one/stories/story-7.3.md +0 -463
- package/.one/stories/story-7.4-implementation.md +0 -154
- package/.one/stories/story-7.4.md +0 -500
- package/.one/stories/story-validation-report.md +0 -169
- package/one/archive-index.json +0 -91
- /package/one/stories/{story-3.1-npx-oneie-turbo-enhancement.md → story-2.1.1-npx-oneie-turbo-enhancement.md} +0 -0
- /package/one/stories/{story-3.2-npx-connection-implementation.md → story-2.21-npx-connection-implementation.md} +0 -0
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
# Story 3.3: Multi-Platform Application Development
|
|
2
|
+
|
|
3
|
+
**Status:** 📋 READY FOR DEVELOPMENT
|
|
4
|
+
**Quality Gate:** ⭐ 0.0/5.0 stars (Initial) → Target: 4.0+ stars
|
|
5
|
+
**Story Lead:** Frontend Architect + Cross-Platform Specialist
|
|
6
|
+
**Mission:** Mission-3: Production Turbo Monorepo
|
|
7
|
+
**Estimated Effort:** Response Cycles 19-21
|
|
8
|
+
**Dependencies:** Story 3.1 (External Repository), Story 3.2 (3 Levels Integration) - Required
|
|
9
|
+
|
|
10
|
+
## 🎯 Story Objective
|
|
11
|
+
|
|
12
|
+
Develop a comprehensive suite of modern applications spanning web, desktop, and mobile platforms within the Turbo monorepo architecture. The primary focus is creating an Astro 5 web application with GitHub cloning capabilities, supported by Next.js 15 marketing platform, dedicated API services, and cross-platform Tauri applications.
|
|
13
|
+
|
|
14
|
+
## 📖 Story Narrative
|
|
15
|
+
|
|
16
|
+
**As a Frontend Architect,** I need to build a modern, multi-platform application suite that showcases the power of the ONE framework while providing real business value through GitHub repository management, marketing automation, and cross-platform accessibility, **so that** users can experience the full potential of AI-powered development tools across their preferred platforms and devices.
|
|
17
|
+
|
|
18
|
+
**The Challenge:** Modern applications need to work seamlessly across web, desktop, and mobile platforms while maintaining code sharing, consistent user experience, and optimal performance for each platform.
|
|
19
|
+
|
|
20
|
+
**The Solution:** Create a sophisticated multi-platform architecture using Astro 5 for the primary web experience, Next.js 15 for marketing/content, Tauri for desktop and mobile, and dedicated API services for backend functionality.
|
|
21
|
+
|
|
22
|
+
## 🏗️ Technical Architecture
|
|
23
|
+
|
|
24
|
+
### Application Portfolio Overview
|
|
25
|
+
```bash
|
|
26
|
+
/Users/toc/Server/repo/apps/
|
|
27
|
+
├── web/ # Astro 5 - Primary Application
|
|
28
|
+
│ ├── src/
|
|
29
|
+
│ │ ├── pages/ # File-based routing
|
|
30
|
+
│ │ ├── components/ # Astro components
|
|
31
|
+
│ │ ├── layouts/ # Page layouts
|
|
32
|
+
│ │ ├── integrations/ # GitHub API integration
|
|
33
|
+
│ │ └── styles/ # Global styles
|
|
34
|
+
│ ├── public/ # Static assets
|
|
35
|
+
│ ├── astro.config.mjs # Astro configuration
|
|
36
|
+
│ └── package.json # Dependencies
|
|
37
|
+
├── network/ # Next.js 15 - Marketing Platform
|
|
38
|
+
│ ├── app/ # App Router (Next.js 13+)
|
|
39
|
+
│ ├── components/ # React components
|
|
40
|
+
│ ├── lib/ # Utility functions
|
|
41
|
+
│ ├── public/ # Static assets
|
|
42
|
+
│ ├── next.config.js # Next.js configuration
|
|
43
|
+
│ └── package.json # Dependencies
|
|
44
|
+
├── api/ # Backend API Services
|
|
45
|
+
│ ├── src/
|
|
46
|
+
│ │ ├── routes/ # API endpoints
|
|
47
|
+
│ │ ├── services/ # Business logic
|
|
48
|
+
│ │ ├── middleware/ # Request handling
|
|
49
|
+
│ │ └── utils/ # Shared utilities
|
|
50
|
+
│ ├── server.ts # Express/Fastify server
|
|
51
|
+
│ └── package.json # Dependencies
|
|
52
|
+
├── desktop/ # Tauri Desktop Application
|
|
53
|
+
│ ├── src-tauri/ # Rust backend
|
|
54
|
+
│ ├── src/ # Frontend (React/Vue)
|
|
55
|
+
│ ├── tauri.conf.json # Tauri configuration
|
|
56
|
+
│ └── package.json # Dependencies
|
|
57
|
+
└── mobile/ # React Native Application
|
|
58
|
+
├── src/
|
|
59
|
+
│ ├── screens/ # Mobile screens
|
|
60
|
+
│ ├── components/ # React Native components
|
|
61
|
+
│ └── navigation/ # Navigation setup
|
|
62
|
+
├── metro.config.js # Metro bundler config
|
|
63
|
+
└── package.json # Dependencies
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 🎬 Implementation Tasks
|
|
67
|
+
|
|
68
|
+
### Task 3.3.1: Astro 5 Primary Web Application
|
|
69
|
+
**Agent:** Frontend Architect
|
|
70
|
+
**Estimated Effort:** 3 response cycles
|
|
71
|
+
**Priority:** Critical Primary App
|
|
72
|
+
|
|
73
|
+
**Technical Specifications:**
|
|
74
|
+
- Set up Astro 5 with TypeScript and modern tooling
|
|
75
|
+
- Implement GitHub API integration for repository cloning
|
|
76
|
+
- Create responsive UI with shadcn/ui components
|
|
77
|
+
- Build file-based routing with dynamic pages
|
|
78
|
+
- Configure SSR/SSG optimization for performance
|
|
79
|
+
|
|
80
|
+
**Core Features Implementation:**
|
|
81
|
+
```typescript
|
|
82
|
+
// apps/web/src/integrations/github-api.ts
|
|
83
|
+
export class GitHubRepositoryManager {
|
|
84
|
+
private apiKey: string;
|
|
85
|
+
private baseUrl = 'https://api.github.com';
|
|
86
|
+
|
|
87
|
+
async cloneRepository(repoUrl: string, targetPath: string): Promise<CloneResult> {
|
|
88
|
+
try {
|
|
89
|
+
const repoData = await this.fetchRepositoryData(repoUrl);
|
|
90
|
+
const cloneCommand = `git clone ${repoData.clone_url} ${targetPath}`;
|
|
91
|
+
|
|
92
|
+
return await this.executeCloneCommand(cloneCommand);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
return this.handleCloneError(error);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async listUserRepositories(username: string): Promise<Repository[]> {
|
|
99
|
+
const response = await fetch(`${this.baseUrl}/users/${username}/repos`, {
|
|
100
|
+
headers: this.getAuthHeaders()
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
return await response.json();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// apps/web/src/pages/clone/[repo].astro
|
|
108
|
+
---
|
|
109
|
+
import Layout from '../../layouts/Layout.astro';
|
|
110
|
+
import CloneInterface from '../../components/CloneInterface.astro';
|
|
111
|
+
|
|
112
|
+
const { repo } = Astro.params;
|
|
113
|
+
const repoData = await fetchRepositoryData(repo);
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
<Layout title={`Clone ${repoData.name}`}>
|
|
117
|
+
<main>
|
|
118
|
+
<CloneInterface repo={repoData} />
|
|
119
|
+
</main>
|
|
120
|
+
</Layout>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Quality Criteria:**
|
|
124
|
+
- GitHub API integration handles authentication and rate limiting
|
|
125
|
+
- Repository cloning works reliably with error handling
|
|
126
|
+
- Responsive design works across desktop and mobile breakpoints
|
|
127
|
+
- Page load times under 2 seconds with proper optimization
|
|
128
|
+
|
|
129
|
+
### Task 3.3.2: Next.js 15 Marketing Platform
|
|
130
|
+
**Agent:** Marketing Technology Specialist
|
|
131
|
+
**Estimated Effort:** 2 response cycles
|
|
132
|
+
**Priority:** High Marketing
|
|
133
|
+
|
|
134
|
+
**Technical Specifications:**
|
|
135
|
+
- Set up Next.js 15 with App Router and React Server Components
|
|
136
|
+
- Implement marketing pages with SEO optimization
|
|
137
|
+
- Build content management system integration
|
|
138
|
+
- Create lead capture and analytics integration
|
|
139
|
+
- Configure deployment for edge runtime optimization
|
|
140
|
+
|
|
141
|
+
**Marketing Platform Features:**
|
|
142
|
+
```tsx
|
|
143
|
+
// apps/network/app/page.tsx
|
|
144
|
+
import { Hero } from '@/components/Hero';
|
|
145
|
+
import { Features } from '@/components/Features';
|
|
146
|
+
import { CTA } from '@/components/CTA';
|
|
147
|
+
import { Testimonials } from '@/components/Testimonials';
|
|
148
|
+
|
|
149
|
+
export default function HomePage() {
|
|
150
|
+
return (
|
|
151
|
+
<main className="flex flex-col min-h-screen">
|
|
152
|
+
<Hero />
|
|
153
|
+
<Features />
|
|
154
|
+
<Testimonials />
|
|
155
|
+
<CTA />
|
|
156
|
+
</main>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// apps/network/app/blog/[slug]/page.tsx
|
|
161
|
+
interface BlogPostProps {
|
|
162
|
+
params: { slug: string };
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export default async function BlogPost({ params }: BlogPostProps) {
|
|
166
|
+
const post = await getPostBySlug(params.slug);
|
|
167
|
+
|
|
168
|
+
return (
|
|
169
|
+
<article className="max-w-4xl mx-auto px-4 py-8">
|
|
170
|
+
<header>
|
|
171
|
+
<h1 className="text-4xl font-bold mb-4">{post.title}</h1>
|
|
172
|
+
<time className="text-gray-600">{post.publishedAt}</time>
|
|
173
|
+
</header>
|
|
174
|
+
<div dangerouslySetInnerHTML={{ __html: post.content }} />
|
|
175
|
+
</article>
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// apps/network/lib/analytics.ts
|
|
180
|
+
export class MarketingAnalytics {
|
|
181
|
+
async trackPageView(path: string, userId?: string): Promise<void> {
|
|
182
|
+
await fetch('/api/analytics/page-view', {
|
|
183
|
+
method: 'POST',
|
|
184
|
+
headers: { 'Content-Type': 'application/json' },
|
|
185
|
+
body: JSON.stringify({ path, userId, timestamp: Date.now() })
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
async trackConversion(event: ConversionEvent): Promise<void> {
|
|
190
|
+
// Track lead captures, sign-ups, demo requests
|
|
191
|
+
await this.sendConversionEvent(event);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Quality Criteria:**
|
|
197
|
+
- SEO optimization achieves 95+ Lighthouse score
|
|
198
|
+
- Content management system enables non-technical content updates
|
|
199
|
+
- Lead capture integration works with marketing automation
|
|
200
|
+
- Performance optimized with edge runtime deployment
|
|
201
|
+
|
|
202
|
+
### Task 3.3.3: Dedicated API Services Layer
|
|
203
|
+
**Agent:** Backend Architect
|
|
204
|
+
**Estimated Effort:** 2 response cycles
|
|
205
|
+
**Priority:** High Backend
|
|
206
|
+
|
|
207
|
+
**Technical Specifications:**
|
|
208
|
+
- Build REST API using Hono (ultra-fast, lightweight web framework)
|
|
209
|
+
- Implement Convex Auth for authentication and authorization
|
|
210
|
+
- Create service layer for business logic separation
|
|
211
|
+
- Configure Convex database integration with real-time capabilities
|
|
212
|
+
- Set up proper error handling and logging with structured output
|
|
213
|
+
|
|
214
|
+
**API Architecture:**
|
|
215
|
+
```typescript
|
|
216
|
+
// apps/api/src/server.ts
|
|
217
|
+
import { Hono } from 'hono';
|
|
218
|
+
import { cors } from 'hono/cors';
|
|
219
|
+
import { logger } from 'hono/logger';
|
|
220
|
+
import { prettyJSON } from 'hono/pretty-json';
|
|
221
|
+
import { authRoutes } from './routes/auth';
|
|
222
|
+
import { repositoryRoutes } from './routes/repositories';
|
|
223
|
+
import { userRoutes } from './routes/users';
|
|
224
|
+
|
|
225
|
+
const app = new Hono();
|
|
226
|
+
|
|
227
|
+
// Middleware
|
|
228
|
+
app.use('*', cors());
|
|
229
|
+
app.use('*', logger());
|
|
230
|
+
app.use('*', prettyJSON());
|
|
231
|
+
|
|
232
|
+
// Routes
|
|
233
|
+
app.route('/api/auth', authRoutes);
|
|
234
|
+
app.route('/api/repositories', repositoryRoutes);
|
|
235
|
+
app.route('/api/users', userRoutes);
|
|
236
|
+
|
|
237
|
+
// Health check
|
|
238
|
+
app.get('/health', (c) => c.json({ status: 'healthy', timestamp: new Date().toISOString() }));
|
|
239
|
+
|
|
240
|
+
export default app;
|
|
241
|
+
|
|
242
|
+
// apps/api/src/routes/repositories.ts
|
|
243
|
+
import { Hono } from 'hono';
|
|
244
|
+
import { ConvexHttpClient } from 'convex/browser';
|
|
245
|
+
import { api } from '@repo/convex';
|
|
246
|
+
|
|
247
|
+
const repositories = new Hono();
|
|
248
|
+
const convex = new ConvexHttpClient(process.env.CONVEX_URL!);
|
|
249
|
+
|
|
250
|
+
repositories.post('/clone', async (c) => {
|
|
251
|
+
try {
|
|
252
|
+
const { repoUrl, userId } = await c.req.json();
|
|
253
|
+
|
|
254
|
+
const project = await convex.mutation(api.projects.create, {
|
|
255
|
+
userId,
|
|
256
|
+
name: extractRepoName(repoUrl),
|
|
257
|
+
githubUrl: repoUrl,
|
|
258
|
+
status: 'cloning'
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// Trigger background clone process
|
|
262
|
+
await convex.action(api.github.cloneRepository, {
|
|
263
|
+
projectId: project,
|
|
264
|
+
repoUrl
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
return c.json({ project, status: 'clone_initiated' });
|
|
268
|
+
} catch (error) {
|
|
269
|
+
return c.json({ error: error.message }, 500);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
repositories.get('/user/:userId', async (c) => {
|
|
274
|
+
const userId = c.req.param('userId');
|
|
275
|
+
|
|
276
|
+
const projects = await convex.query(api.projects.getByUser, { userId });
|
|
277
|
+
|
|
278
|
+
return c.json({ projects });
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
export { repositories as repositoryRoutes };
|
|
282
|
+
|
|
283
|
+
// apps/api/src/services/github-service.ts
|
|
284
|
+
export class GitHubService {
|
|
285
|
+
private convex: ConvexHttpClient;
|
|
286
|
+
|
|
287
|
+
constructor() {
|
|
288
|
+
this.convex = new ConvexHttpClient(process.env.CONVEX_URL!);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async cloneRepository(repoUrl: string, projectId: string): Promise<void> {
|
|
292
|
+
try {
|
|
293
|
+
// Update project status
|
|
294
|
+
await this.convex.mutation(api.projects.updateStatus, {
|
|
295
|
+
id: projectId,
|
|
296
|
+
status: 'cloning'
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// Perform actual git clone operation
|
|
300
|
+
const cloneResult = await this.executeGitClone(repoUrl, projectId);
|
|
301
|
+
|
|
302
|
+
// Update project with clone results
|
|
303
|
+
await this.convex.mutation(api.projects.updateCloneResult, {
|
|
304
|
+
id: projectId,
|
|
305
|
+
status: 'active',
|
|
306
|
+
cloneData: cloneResult
|
|
307
|
+
});
|
|
308
|
+
} catch (error) {
|
|
309
|
+
await this.convex.mutation(api.projects.updateStatus, {
|
|
310
|
+
id: projectId,
|
|
311
|
+
status: 'error',
|
|
312
|
+
error: error.message
|
|
313
|
+
});
|
|
314
|
+
throw error;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
private async executeGitClone(repoUrl: string, projectId: string): Promise<CloneResult> {
|
|
319
|
+
// Implementation for git clone with proper error handling
|
|
320
|
+
const { spawn } = require('child_process');
|
|
321
|
+
|
|
322
|
+
return new Promise((resolve, reject) => {
|
|
323
|
+
const gitClone = spawn('git', ['clone', repoUrl, `./projects/${projectId}`]);
|
|
324
|
+
|
|
325
|
+
gitClone.on('close', (code) => {
|
|
326
|
+
if (code === 0) {
|
|
327
|
+
resolve({ success: true, path: `./projects/${projectId}` });
|
|
328
|
+
} else {
|
|
329
|
+
reject(new Error(`Git clone failed with code ${code}`));
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Quality Criteria:**
|
|
338
|
+
- API endpoints properly documented with OpenAPI specification
|
|
339
|
+
- Convex Auth provides secure authentication with real-time capabilities
|
|
340
|
+
- Error handling provides clear, actionable error messages with structured logging
|
|
341
|
+
- Performance optimized with Hono's ultra-fast runtime and Convex real-time sync
|
|
342
|
+
|
|
343
|
+
### Task 3.3.4: Tauri Desktop Application
|
|
344
|
+
**Agent:** Desktop Application Developer
|
|
345
|
+
**Estimated Effort:** 3 response cycles
|
|
346
|
+
**Priority:** Medium Cross-Platform
|
|
347
|
+
|
|
348
|
+
**Technical Specifications:**
|
|
349
|
+
- Set up Tauri with React frontend and Rust backend
|
|
350
|
+
- Implement native OS integration (file system, notifications)
|
|
351
|
+
- Create desktop-optimized UI with native look and feel
|
|
352
|
+
- Build offline functionality with local data storage
|
|
353
|
+
- Configure proper packaging for multiple OS platforms
|
|
354
|
+
|
|
355
|
+
**Desktop Application Architecture:**
|
|
356
|
+
```rust
|
|
357
|
+
// apps/desktop/src-tauri/src/main.rs
|
|
358
|
+
use tauri::Manager;
|
|
359
|
+
|
|
360
|
+
#[tauri::command]
|
|
361
|
+
async fn clone_repository(repo_url: String, target_path: String) -> Result<String, String> {
|
|
362
|
+
use std::process::Command;
|
|
363
|
+
|
|
364
|
+
let output = Command::new("git")
|
|
365
|
+
.args(&["clone", &repo_url, &target_path])
|
|
366
|
+
.output()
|
|
367
|
+
.map_err(|e| format!("Failed to execute git clone: {}", e))?;
|
|
368
|
+
|
|
369
|
+
if output.status.success() {
|
|
370
|
+
Ok(String::from_utf8_lossy(&output.stdout).to_string())
|
|
371
|
+
} else {
|
|
372
|
+
Err(String::from_utf8_lossy(&output.stderr).to_string())
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
#[tauri::command]
|
|
377
|
+
async fn read_project_files(project_path: String) -> Result<Vec<String>, String> {
|
|
378
|
+
use std::fs;
|
|
379
|
+
|
|
380
|
+
let entries = fs::read_dir(&project_path)
|
|
381
|
+
.map_err(|e| format!("Failed to read directory: {}", e))?;
|
|
382
|
+
|
|
383
|
+
let mut files = Vec::new();
|
|
384
|
+
for entry in entries {
|
|
385
|
+
if let Ok(entry) = entry {
|
|
386
|
+
if let Some(name) = entry.file_name().to_str() {
|
|
387
|
+
files.push(name.to_string());
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
Ok(files)
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
fn main() {
|
|
396
|
+
tauri::Builder::default()
|
|
397
|
+
.invoke_handler(tauri::generate_handler![clone_repository, read_project_files])
|
|
398
|
+
.run(tauri::generate_context!())
|
|
399
|
+
.expect("error while running tauri application");
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
```tsx
|
|
404
|
+
// apps/desktop/src/components/ProjectManager.tsx
|
|
405
|
+
import { invoke } from '@tauri-apps/api/tauri';
|
|
406
|
+
import { open } from '@tauri-apps/api/dialog';
|
|
407
|
+
|
|
408
|
+
export function ProjectManager() {
|
|
409
|
+
const [projects, setProjects] = useState<Project[]>([]);
|
|
410
|
+
|
|
411
|
+
const handleCloneRepository = async () => {
|
|
412
|
+
try {
|
|
413
|
+
const repoUrl = prompt('Enter repository URL:');
|
|
414
|
+
if (!repoUrl) return;
|
|
415
|
+
|
|
416
|
+
const targetPath = await open({
|
|
417
|
+
directory: true,
|
|
418
|
+
title: 'Select destination folder'
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
if (targetPath) {
|
|
422
|
+
const result = await invoke('clone_repository', {
|
|
423
|
+
repoUrl,
|
|
424
|
+
targetPath: `${targetPath}/${getRepoName(repoUrl)}`
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
console.log('Clone successful:', result);
|
|
428
|
+
// Update UI with new project
|
|
429
|
+
}
|
|
430
|
+
} catch (error) {
|
|
431
|
+
console.error('Clone failed:', error);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
return (
|
|
436
|
+
<div className="p-6">
|
|
437
|
+
<header className="flex justify-between items-center mb-6">
|
|
438
|
+
<h1 className="text-2xl font-bold">Project Manager</h1>
|
|
439
|
+
<button
|
|
440
|
+
onClick={handleCloneRepository}
|
|
441
|
+
className="px-4 py-2 bg-blue-600 text-white rounded"
|
|
442
|
+
>
|
|
443
|
+
Clone Repository
|
|
444
|
+
</button>
|
|
445
|
+
</header>
|
|
446
|
+
|
|
447
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
448
|
+
{projects.map(project => (
|
|
449
|
+
<ProjectCard key={project.id} project={project} />
|
|
450
|
+
))}
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
**Quality Criteria:**
|
|
458
|
+
- Native OS integration works properly across Windows, macOS, Linux
|
|
459
|
+
- Desktop UI feels native with proper platform conventions
|
|
460
|
+
- File system operations secure and properly sandboxed
|
|
461
|
+
- Application packaging works for all target platforms
|
|
462
|
+
|
|
463
|
+
### Task 3.3.5: React Native Mobile Application
|
|
464
|
+
**Agent:** Mobile Application Developer
|
|
465
|
+
**Estimated Effort:** 2 response cycles
|
|
466
|
+
**Priority:** Medium Mobile
|
|
467
|
+
|
|
468
|
+
**Technical Specifications:**
|
|
469
|
+
- Set up React Native with TypeScript and modern tooling
|
|
470
|
+
- Implement mobile-optimized UI with responsive design
|
|
471
|
+
- Create offline functionality with local data persistence
|
|
472
|
+
- Build push notification system for project updates
|
|
473
|
+
- Configure deployment for iOS and Android platforms
|
|
474
|
+
|
|
475
|
+
**Mobile Application Features:**
|
|
476
|
+
```tsx
|
|
477
|
+
// apps/mobile/src/screens/ProjectListScreen.tsx
|
|
478
|
+
import React, { useEffect, useState } from 'react';
|
|
479
|
+
import { View, Text, FlatList, TouchableOpacity, StyleSheet } from 'react-native';
|
|
480
|
+
import { useNavigation } from '@react-navigation/native';
|
|
481
|
+
|
|
482
|
+
export function ProjectListScreen() {
|
|
483
|
+
const [projects, setProjects] = useState<Project[]>([]);
|
|
484
|
+
const navigation = useNavigation();
|
|
485
|
+
|
|
486
|
+
useEffect(() => {
|
|
487
|
+
loadProjects();
|
|
488
|
+
}, []);
|
|
489
|
+
|
|
490
|
+
const loadProjects = async () => {
|
|
491
|
+
try {
|
|
492
|
+
const userProjects = await projectService.getUserProjects();
|
|
493
|
+
setProjects(userProjects);
|
|
494
|
+
} catch (error) {
|
|
495
|
+
console.error('Failed to load projects:', error);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
const renderProject = ({ item }: { item: Project }) => (
|
|
500
|
+
<TouchableOpacity
|
|
501
|
+
style={styles.projectCard}
|
|
502
|
+
onPress={() => navigation.navigate('ProjectDetail', { projectId: item.id })}
|
|
503
|
+
>
|
|
504
|
+
<Text style={styles.projectName}>{item.name}</Text>
|
|
505
|
+
<Text style={styles.projectDescription}>{item.description}</Text>
|
|
506
|
+
<Text style={styles.projectStatus}>Status: {item.status}</Text>
|
|
507
|
+
</TouchableOpacity>
|
|
508
|
+
);
|
|
509
|
+
|
|
510
|
+
return (
|
|
511
|
+
<View style={styles.container}>
|
|
512
|
+
<FlatList
|
|
513
|
+
data={projects}
|
|
514
|
+
renderItem={renderProject}
|
|
515
|
+
keyExtractor={(item) => item.id}
|
|
516
|
+
contentContainerStyle={styles.listContainer}
|
|
517
|
+
/>
|
|
518
|
+
</View>
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// apps/mobile/src/services/sync-service.ts
|
|
523
|
+
export class SyncService {
|
|
524
|
+
async syncWithServer(): Promise<void> {
|
|
525
|
+
try {
|
|
526
|
+
// Sync local data with server
|
|
527
|
+
const localProjects = await this.getLocalProjects();
|
|
528
|
+
const serverProjects = await this.getServerProjects();
|
|
529
|
+
|
|
530
|
+
await this.resolveConflicts(localProjects, serverProjects);
|
|
531
|
+
await this.updateLocalStorage();
|
|
532
|
+
} catch (error) {
|
|
533
|
+
console.error('Sync failed:', error);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
async enableOfflineMode(): Promise<void> {
|
|
538
|
+
await AsyncStorage.setItem('offline_mode', 'true');
|
|
539
|
+
// Cache essential data for offline use
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
**Quality Criteria:**
|
|
545
|
+
- Mobile UI optimized for touch interaction and small screens
|
|
546
|
+
- Offline functionality maintains core features without network
|
|
547
|
+
- Push notifications properly integrated with backend services
|
|
548
|
+
- App store deployment ready with proper metadata and assets
|
|
549
|
+
|
|
550
|
+
## ✅ Success Criteria
|
|
551
|
+
|
|
552
|
+
### Primary Application Objectives (Must Achieve)
|
|
553
|
+
1. **Astro 5 Web App Excellence**: Fully functional web application with GitHub cloning capabilities
|
|
554
|
+
2. **Next.js Marketing Platform**: Complete marketing site with content management and analytics
|
|
555
|
+
3. **API Services Operational**: Backend services supporting all frontend applications
|
|
556
|
+
4. **Cross-Platform Desktop**: Tauri desktop application with native OS integration
|
|
557
|
+
5. **Mobile Application**: React Native app with offline capabilities and push notifications
|
|
558
|
+
|
|
559
|
+
### Technical Performance Targets
|
|
560
|
+
- **Web App Load Time**: Under 2 seconds for initial page load
|
|
561
|
+
- **API Response Time**: Sub-200ms for standard operations
|
|
562
|
+
- **Desktop App Startup**: Under 3 seconds cold start time
|
|
563
|
+
- **Mobile App Performance**: 60 FPS smooth animations and interactions
|
|
564
|
+
|
|
565
|
+
### Integration Quality Gates
|
|
566
|
+
- **Shared Components**: UI components work consistently across all platforms
|
|
567
|
+
- **Data Synchronization**: Real-time sync between web, desktop, and mobile
|
|
568
|
+
- **Authentication Flow**: Single sign-on works across all applications
|
|
569
|
+
- **Feature Parity**: Core features available on all appropriate platforms
|
|
570
|
+
|
|
571
|
+
### User Experience Validation
|
|
572
|
+
- **Responsive Design**: Consistent experience across device sizes
|
|
573
|
+
- **Accessibility**: WCAG 2.1 compliance across all applications
|
|
574
|
+
- **Performance**: Lighthouse scores above 90 for web applications
|
|
575
|
+
- **Cross-Platform UX**: Native feel on each platform while maintaining brand consistency
|
|
576
|
+
|
|
577
|
+
## 🔗 Platform Integration Architecture
|
|
578
|
+
|
|
579
|
+
### Shared Component System
|
|
580
|
+
```typescript
|
|
581
|
+
// packages/ui/src/components/Button.tsx
|
|
582
|
+
export interface ButtonProps {
|
|
583
|
+
variant: 'primary' | 'secondary' | 'danger';
|
|
584
|
+
size: 'sm' | 'md' | 'lg';
|
|
585
|
+
platform?: 'web' | 'desktop' | 'mobile';
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export function Button({ platform = 'web', ...props }: ButtonProps) {
|
|
589
|
+
const platformStyles = getPlatformStyles(platform);
|
|
590
|
+
return <button className={cn(baseStyles, platformStyles, ...)} {...props} />;
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
### Data Synchronization Strategy
|
|
595
|
+
```typescript
|
|
596
|
+
// libraries/sync/src/sync-manager.ts
|
|
597
|
+
export class CrossPlatformSyncManager {
|
|
598
|
+
async synchronizeUserData(userId: string): Promise<void> {
|
|
599
|
+
const webData = await this.webClient.getUserData(userId);
|
|
600
|
+
const desktopData = await this.desktopClient.getUserData(userId);
|
|
601
|
+
const mobileData = await this.mobileClient.getUserData(userId);
|
|
602
|
+
|
|
603
|
+
const mergedData = await this.mergeUserData([webData, desktopData, mobileData]);
|
|
604
|
+
await this.distributeUpdates(mergedData);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
## 🎯 Story Acceptance Criteria
|
|
610
|
+
|
|
611
|
+
**This story is COMPLETE when:**
|
|
612
|
+
|
|
613
|
+
✅ **Astro 5 Web Application Operational**
|
|
614
|
+
- GitHub repository cloning functionality fully implemented
|
|
615
|
+
- Responsive UI with shadcn/ui components working properly
|
|
616
|
+
- File-based routing with dynamic pages functional
|
|
617
|
+
- Performance optimized with sub-2 second load times
|
|
618
|
+
|
|
619
|
+
✅ **Next.js Marketing Platform Live**
|
|
620
|
+
- Marketing pages with SEO optimization achieving 95+ Lighthouse score
|
|
621
|
+
- Content management system enabling non-technical updates
|
|
622
|
+
- Lead capture and analytics integration working properly
|
|
623
|
+
- Edge runtime deployment optimized for performance
|
|
624
|
+
|
|
625
|
+
✅ **API Services Layer Complete**
|
|
626
|
+
- REST API with proper authentication and authorization
|
|
627
|
+
- Business logic properly separated in service layer
|
|
628
|
+
- Database integration with ORM working reliably
|
|
629
|
+
- Error handling and logging comprehensive and actionable
|
|
630
|
+
|
|
631
|
+
✅ **Tauri Desktop Application Functional**
|
|
632
|
+
- Cross-platform desktop app with native OS integration
|
|
633
|
+
- Offline functionality with local data storage working
|
|
634
|
+
- File system operations secure and properly sandboxed
|
|
635
|
+
- Application packaging successful for Windows, macOS, Linux
|
|
636
|
+
|
|
637
|
+
✅ **React Native Mobile Application Ready**
|
|
638
|
+
- Mobile-optimized UI with responsive design
|
|
639
|
+
- Offline functionality maintaining core features
|
|
640
|
+
- Push notification system integrated with backend
|
|
641
|
+
- iOS and Android deployment configurations complete
|
|
642
|
+
|
|
643
|
+
## 📊 Quality Validation Checklist
|
|
644
|
+
|
|
645
|
+
### Application Functionality (35%)
|
|
646
|
+
- [ ] Astro 5 web app with GitHub cloning fully operational
|
|
647
|
+
- [ ] Next.js marketing platform with CMS and analytics integration
|
|
648
|
+
- [ ] API services layer with proper authentication and business logic
|
|
649
|
+
- [ ] Tauri desktop application with native OS integration
|
|
650
|
+
- [ ] React Native mobile app with offline capabilities
|
|
651
|
+
|
|
652
|
+
### Performance Excellence (25%)
|
|
653
|
+
- [ ] Web application loads under 2 seconds
|
|
654
|
+
- [ ] API responses under 200ms for standard operations
|
|
655
|
+
- [ ] Desktop application starts under 3 seconds
|
|
656
|
+
- [ ] Mobile application maintains 60 FPS performance
|
|
657
|
+
- [ ] Cross-platform data synchronization efficient
|
|
658
|
+
|
|
659
|
+
### Cross-Platform Integration (20%)
|
|
660
|
+
- [ ] Shared UI components work consistently across platforms
|
|
661
|
+
- [ ] Authentication flow seamless across all applications
|
|
662
|
+
- [ ] Data synchronization real-time between platforms
|
|
663
|
+
- [ ] Feature parity maintained where appropriate
|
|
664
|
+
- [ ] Platform-specific optimizations properly implemented
|
|
665
|
+
|
|
666
|
+
### User Experience Quality (20%)
|
|
667
|
+
- [ ] Responsive design consistent across device sizes
|
|
668
|
+
- [ ] Accessibility compliance (WCAG 2.1) achieved
|
|
669
|
+
- [ ] Lighthouse scores above 90 for web applications
|
|
670
|
+
- [ ] Native feel maintained on each platform
|
|
671
|
+
- [ ] Brand consistency across all applications
|
|
672
|
+
|
|
673
|
+
**Minimum Quality Gate: 4.0/5.0 stars (16/20 checklist items) required for story completion**
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
**Story Platform Impact:** This story delivers the comprehensive multi-platform application suite that demonstrates the full power of the ONE framework across web, desktop, and mobile platforms, providing users with seamless experiences regardless of their preferred platform or device.
|