@mrpatronz/nexusflow 0.1.0 → 0.1.2

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 (69) hide show
  1. package/.github/dependabot.yml +25 -0
  2. package/.github/workflows/release.yml +90 -0
  3. package/.vscode/launch.json +17 -0
  4. package/.vscode/tasks.json +17 -0
  5. package/README.md +1 -1
  6. package/dist/commands/commit.d.ts +18 -0
  7. package/dist/commands/commit.d.ts.map +1 -0
  8. package/dist/commands/commit.js +105 -0
  9. package/dist/commands/commit.js.map +1 -0
  10. package/dist/commands/diff.d.ts +11 -0
  11. package/dist/commands/diff.d.ts.map +1 -0
  12. package/dist/commands/diff.js +101 -0
  13. package/dist/commands/diff.js.map +1 -0
  14. package/dist/commands/sync.d.ts +11 -0
  15. package/dist/commands/sync.d.ts.map +1 -0
  16. package/dist/commands/sync.js +96 -0
  17. package/dist/commands/sync.js.map +1 -0
  18. package/dist/generators/base.d.ts.map +1 -1
  19. package/dist/generators/base.js +3 -0
  20. package/dist/generators/base.js.map +1 -1
  21. package/dist/generators/index.d.ts +5 -2
  22. package/dist/generators/index.d.ts.map +1 -1
  23. package/dist/generators/index.js +88 -38
  24. package/dist/generators/index.js.map +1 -1
  25. package/dist/generators/plan-generator.d.ts +40 -0
  26. package/dist/generators/plan-generator.d.ts.map +1 -0
  27. package/dist/generators/plan-generator.js +312 -0
  28. package/dist/generators/plan-generator.js.map +1 -0
  29. package/dist/gui/assets/index-B9Ph2bHH.css +2 -0
  30. package/dist/gui/assets/index-s4nRkpqY.js +21 -0
  31. package/dist/gui/index.html +2 -2
  32. package/dist/index.js +57 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/server.d.ts.map +1 -1
  35. package/dist/server.js +141 -1
  36. package/dist/server.js.map +1 -1
  37. package/dist/types.d.ts +13 -0
  38. package/dist/types.d.ts.map +1 -1
  39. package/dist/utils/multi-git.d.ts +108 -0
  40. package/dist/utils/multi-git.d.ts.map +1 -0
  41. package/dist/utils/multi-git.js +206 -0
  42. package/dist/utils/multi-git.js.map +1 -0
  43. package/extension/package-lock.json +2811 -0
  44. package/extension/package.json +61 -0
  45. package/extension/src/extension.ts +168 -0
  46. package/extension/tsconfig.json +19 -0
  47. package/gui/src/App.tsx +377 -24
  48. package/gui/src/features/changes/ChangesViewer.tsx +212 -0
  49. package/gui/src/features/knowledge/KnowledgeBase.tsx +84 -0
  50. package/gui/src/features/onboarding/OnboardingWizard.tsx +230 -0
  51. package/gui/src/features/plan/ImplementationPlan.tsx +32 -0
  52. package/gui/src/features/services/ServiceConsole.tsx +159 -0
  53. package/gui/src/features/sessions/SessionHistory.tsx +195 -0
  54. package/gui/src/features/workspace/WorkspaceBuilder.tsx +414 -0
  55. package/gui/src/features/workspace/WorkspaceList.tsx +382 -0
  56. package/gui/src/types.ts +61 -0
  57. package/package.json +6 -4
  58. package/src/commands/commit.ts +131 -0
  59. package/src/commands/diff.ts +125 -0
  60. package/src/commands/sync.ts +110 -0
  61. package/src/generators/base.ts +3 -0
  62. package/src/generators/index.ts +95 -40
  63. package/src/generators/plan-generator.ts +390 -0
  64. package/src/index.ts +59 -0
  65. package/src/server.ts +152 -1
  66. package/src/types.ts +17 -0
  67. package/src/utils/multi-git.ts +306 -0
  68. package/dist/gui/assets/index-Cq9V485S.js +0 -21
  69. package/dist/gui/assets/index-Dh1b5gSZ.css +0 -2
@@ -0,0 +1,212 @@
1
+ import React from 'react';
2
+ import { FolderGit2, RefreshCw, Check } from 'lucide-react';
3
+ import type { Feature } from '../../types.js';
4
+
5
+ interface ChangesViewerProps {
6
+ ws: Feature;
7
+ gitChanges: any[];
8
+ gitChangesLoading: boolean;
9
+ syncLoading: boolean;
10
+ syncResults: any[] | null;
11
+ commitMessage: string;
12
+ showCommitModal: boolean;
13
+ commitLoading: boolean;
14
+ commitResults: any[] | null;
15
+ setSyncResults: (val: any[] | null) => void;
16
+ setCommitResults: (val: any[] | null) => void;
17
+ setCommitMessage: (val: string) => void;
18
+ setShowCommitModal: (val: boolean) => void;
19
+ fetchGitChanges: (wsId: string) => Promise<void>;
20
+ handleSyncAll: (wsId: string) => Promise<void>;
21
+ handleCommitAll: (wsId: string) => Promise<void>;
22
+ }
23
+
24
+ export const ChangesViewer: React.FC<ChangesViewerProps> = ({
25
+ ws,
26
+ gitChanges,
27
+ gitChangesLoading,
28
+ syncLoading,
29
+ syncResults,
30
+ commitMessage,
31
+ showCommitModal,
32
+ commitLoading,
33
+ commitResults,
34
+ setSyncResults,
35
+ setCommitResults,
36
+ setCommitMessage,
37
+ setShowCommitModal,
38
+ fetchGitChanges,
39
+ handleSyncAll,
40
+ handleCommitAll,
41
+ }) => {
42
+ return (
43
+ <div>
44
+ <header className="flex justify-between items-center mb-4 flex-wrap gap-2">
45
+ <h4 className="text-sm font-bold text-white flex items-center gap-2">
46
+ <FolderGit2 size={16} className="text-cyan-400" /> Active Workspace Git Diffs
47
+ </h4>
48
+ <div className="flex gap-2">
49
+ <button
50
+ className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 bg-gray-900 border border-gray-800 hover:bg-gray-800 hover:border-gray-700 rounded-lg text-[10px] font-semibold transition-all cursor-pointer text-gray-300"
51
+ onClick={() => fetchGitChanges(ws.branchName)}
52
+ disabled={gitChangesLoading}
53
+ >
54
+ <RefreshCw size={11} className={gitChangesLoading ? 'animate-spin text-indigo-400' : ''} /> Refresh Changes
55
+ </button>
56
+ <button
57
+ className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg text-[10px] font-semibold transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed"
58
+ onClick={() => handleSyncAll(ws.branchName)}
59
+ disabled={syncLoading}
60
+ >
61
+ {syncLoading ? <RefreshCw size={11} className="animate-spin text-indigo-300" /> : <RefreshCw size={11} />} Sync All
62
+ </button>
63
+ <button
64
+ className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg text-[10px] font-semibold transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed"
65
+ onClick={() => setShowCommitModal(true)}
66
+ disabled={gitChanges.every(repo => repo.files.length === 0) || commitLoading}
67
+ >
68
+ Commit & Push All
69
+ </button>
70
+ </div>
71
+ </header>
72
+
73
+ {syncResults && (
74
+ <div className="bg-[#090d1a]/60 border border-gray-800 rounded-xl p-4 mb-4 text-xs">
75
+ <div className="flex justify-between items-center mb-2 border-b border-gray-800/80 pb-2">
76
+ <h5 className="font-bold text-white font-mono text-[11px]">Rebase/Sync Results</h5>
77
+ <button className="text-gray-500 hover:text-gray-300 text-[10px] cursor-pointer" onClick={() => setSyncResults(null)}>Dismiss</button>
78
+ </div>
79
+ <div className="space-y-1.5">
80
+ {syncResults.map((r: any) => (
81
+ <div key={r.repoName} className="flex justify-between items-center font-mono text-[10px]">
82
+ <span className="text-gray-300">{r.repoName}</span>
83
+ <span className={r.success ? "text-emerald-400" : "text-rose-400"}>
84
+ {r.success ? `✅ Synced (${r.message})` : `⚠️ Conflict: ${r.message}`}
85
+ </span>
86
+ </div>
87
+ ))}
88
+ </div>
89
+ </div>
90
+ )}
91
+
92
+ {commitResults && (
93
+ <div className="bg-[#090d1a]/60 border border-gray-800 rounded-xl p-4 mb-4 text-xs">
94
+ <div className="flex justify-between items-center mb-2 border-b border-gray-800/80 pb-2">
95
+ <h5 className="font-bold text-white font-mono text-[11px]">Commit/Push Results</h5>
96
+ <button className="text-gray-500 hover:text-gray-300 text-[10px] cursor-pointer" onClick={() => setCommitResults(null)}>Dismiss</button>
97
+ </div>
98
+ <div className="space-y-1.5">
99
+ {commitResults.map((r: any) => (
100
+ <div key={r.repoName} className="flex justify-between items-center font-mono text-[10px]">
101
+ <span className="text-gray-300">{r.repoName}</span>
102
+ <span className={r.success ? "text-emerald-400" : "text-rose-400"}>
103
+ {r.success ? `✅ Committed ${r.filesChanged} file(s) (${r.commitHash || 'no hash'})` : `⚠️ Error: ${r.message}`}
104
+ </span>
105
+ </div>
106
+ ))}
107
+ </div>
108
+ </div>
109
+ )}
110
+
111
+ {showCommitModal && (
112
+ <div className="bg-[#0b0f19] border border-gray-800 rounded-xl p-4 mb-4">
113
+ <h5 className="text-xs font-bold text-white mb-2">Enter Commit Message</h5>
114
+ <input
115
+ type="text"
116
+ className="w-full bg-gray-950 border border-gray-800 rounded-lg px-3 py-2 text-xs font-mono text-gray-350 focus:outline-none focus:border-indigo-500 mb-3"
117
+ placeholder="feat: implement logic..."
118
+ value={commitMessage}
119
+ onChange={(e) => setCommitMessage(e.target.value)}
120
+ onKeyDown={(e) => {
121
+ if (e.key === 'Enter') handleCommitAll(ws.branchName);
122
+ }}
123
+ />
124
+ <div className="flex justify-end gap-2">
125
+ <button
126
+ className="px-3 py-1.5 bg-gray-900 border border-gray-800 hover:bg-gray-850 rounded-lg text-[10px] font-semibold transition-all cursor-pointer text-gray-400"
127
+ onClick={() => {
128
+ setShowCommitModal(false);
129
+ setCommitMessage('');
130
+ }}
131
+ disabled={commitLoading}
132
+ >
133
+ Cancel
134
+ </button>
135
+ <button
136
+ className="px-3 py-1.5 bg-emerald-600 hover:bg-emerald-500 rounded-lg text-[10px] font-semibold text-white transition-all cursor-pointer"
137
+ onClick={() => handleCommitAll(ws.branchName)}
138
+ disabled={commitLoading || !commitMessage.trim()}
139
+ >
140
+ {commitLoading ? 'Committing...' : 'Commit & Push'}
141
+ </button>
142
+ </div>
143
+ </div>
144
+ )}
145
+
146
+ {gitChangesLoading ? (
147
+ <div className="flex justify-center py-10">
148
+ <RefreshCw className="animate-spin text-indigo-400" size={20} />
149
+ </div>
150
+ ) : (
151
+ <div className="space-y-4">
152
+ {gitChanges.every(repo => repo.files.length === 0) ? (
153
+ <div className="flex flex-col items-center justify-center py-12 bg-gray-950/20 border border-gray-800/40 rounded-xl text-center">
154
+ <Check size={28} className="text-emerald-500 mb-2" />
155
+ <h5 className="text-xs font-bold text-white">No Uncommitted Changes</h5>
156
+ <p className="text-[10px] text-gray-500 mt-0.5">Workspace is completely synced with Git feature branches.</p>
157
+ </div>
158
+ ) : (
159
+ gitChanges.map((repo) => {
160
+ if (repo.files.length === 0) return null;
161
+ const totalFilesChanged = repo.files.length;
162
+ const repoAdditions = repo.files.reduce((acc: number, f: any) => acc + (f.additions || 0), 0);
163
+ const repoDeletions = repo.files.reduce((acc: number, f: any) => acc + (f.deletions || 0), 0);
164
+
165
+ return (
166
+ <div key={repo.repoName} className="bg-gray-950/20 border border-gray-800/60 rounded-xl p-4">
167
+ <div className="flex justify-between items-center mb-3">
168
+ <div className="flex items-center gap-2">
169
+ <h5 className="text-xs font-bold text-white font-mono">{repo.repoName}</h5>
170
+ <span className="text-[9px] px-1.5 py-0.5 rounded bg-gray-900 border border-gray-800 text-gray-400 font-mono">
171
+ {totalFilesChanged} file{totalFilesChanged === 1 ? '' : 's'} changed
172
+ </span>
173
+ {(repoAdditions > 0 || repoDeletions > 0) && (
174
+ <span className="text-[9px] font-mono">
175
+ <span className="text-emerald-400 font-bold">+{repoAdditions}</span>{' '}
176
+ <span className="text-rose-400 font-bold">-{repoDeletions}</span>
177
+ </span>
178
+ )}
179
+ </div>
180
+ <span className="text-[9px] text-gray-500 font-mono truncate max-w-[280px]">{repo.repoPath}</span>
181
+ </div>
182
+ <div className="space-y-1.5">
183
+ {repo.files.map((fileInfo: any) => (
184
+ <div key={fileInfo.file} className="flex justify-between items-center bg-[#090d1a]/40 px-3 py-2 rounded-lg border border-gray-800/30 text-xs">
185
+ <div className="flex flex-col min-w-0">
186
+ <span className="font-mono text-gray-300 text-[11px] truncate max-w-[320px]">{fileInfo.file}</span>
187
+ {(fileInfo.additions > 0 || fileInfo.deletions > 0) && (
188
+ <span className="text-[9px] font-mono mt-0.5">
189
+ <span className="text-emerald-500">+{fileInfo.additions}</span>{' '}
190
+ <span className="text-rose-500">-{fileInfo.deletions}</span>
191
+ </span>
192
+ )}
193
+ </div>
194
+ <span className={`text-[9px] px-2 py-0.5 rounded font-bold uppercase ${
195
+ fileInfo.type === 'added' ? 'bg-emerald-500/10 text-emerald-400 border border-emerald-500/20' :
196
+ fileInfo.type === 'deleted' ? 'bg-rose-500/10 text-rose-400 border border-rose-500/20' :
197
+ 'bg-amber-500/10 text-amber-400 border border-amber-500/20'
198
+ }`}>
199
+ {fileInfo.type}
200
+ </span>
201
+ </div>
202
+ ))}
203
+ </div>
204
+ </div>
205
+ );
206
+ })
207
+ )}
208
+ </div>
209
+ )}
210
+ </div>
211
+ );
212
+ };
@@ -0,0 +1,84 @@
1
+ import React from 'react';
2
+ import { BookOpen, RefreshCw, Save, Edit } from 'lucide-react';
3
+ import type { Feature } from '../../types.js';
4
+
5
+ interface KnowledgeBaseProps {
6
+ ws: Feature;
7
+ knowledgeContent: string;
8
+ knowledgeLoading: boolean;
9
+ isEditingKnowledge: boolean;
10
+ editedKnowledge: string;
11
+ saveKnowledgeLoading: boolean;
12
+ setEditedKnowledge: (val: string) => void;
13
+ setIsEditingKnowledge: (val: boolean) => void;
14
+ handleSaveKnowledge: (wsId: string) => Promise<void>;
15
+ }
16
+
17
+ export const KnowledgeBase: React.FC<KnowledgeBaseProps> = ({
18
+ ws,
19
+ knowledgeContent,
20
+ knowledgeLoading,
21
+ isEditingKnowledge,
22
+ editedKnowledge,
23
+ saveKnowledgeLoading,
24
+ setEditedKnowledge,
25
+ setIsEditingKnowledge,
26
+ handleSaveKnowledge,
27
+ }) => {
28
+ return (
29
+ <div className="bg-[#090d1a]/20 border border-gray-800/60 rounded-xl p-4">
30
+ <header className="flex justify-between items-center mb-4">
31
+ <h4 className="text-sm font-bold text-white flex items-center gap-2">
32
+ <BookOpen size={16} className="text-cyan-400" /> Persistent Knowledge Memory (nexusflow-knowledge.md)
33
+ </h4>
34
+ <div className="flex gap-2">
35
+ {isEditingKnowledge ? (
36
+ <>
37
+ <button
38
+ className="px-2.5 py-1.5 bg-gray-900 border border-gray-800 hover:bg-gray-850 rounded-lg text-[10px] font-semibold transition-all cursor-pointer text-gray-400"
39
+ onClick={() => {
40
+ setEditedKnowledge(knowledgeContent);
41
+ setIsEditingKnowledge(false);
42
+ }}
43
+ disabled={saveKnowledgeLoading}
44
+ >
45
+ Cancel
46
+ </button>
47
+ <button
48
+ className="inline-flex items-center gap-1.5 px-2.5 py-1.5 bg-indigo-650 hover:bg-indigo-600 text-white rounded-lg text-[10px] font-semibold transition-all cursor-pointer"
49
+ onClick={() => handleSaveKnowledge(ws.branchName)}
50
+ disabled={saveKnowledgeLoading}
51
+ >
52
+ {saveKnowledgeLoading ? <RefreshCw className="animate-spin" size={10} /> : <Save size={10} />} Save
53
+ </button>
54
+ </>
55
+ ) : (
56
+ <button
57
+ className="inline-flex items-center gap-1.5 px-2.5 py-1.5 bg-gray-900 border border-gray-800 hover:bg-gray-800 hover:border-gray-700 rounded-lg text-[10px] font-semibold transition-all cursor-pointer text-gray-350"
58
+ onClick={() => setIsEditingKnowledge(true)}
59
+ disabled={knowledgeLoading}
60
+ >
61
+ <Edit size={10} /> Edit Knowledge
62
+ </button>
63
+ )}
64
+ </div>
65
+ </header>
66
+
67
+ {knowledgeLoading ? (
68
+ <div className="flex justify-center py-10">
69
+ <RefreshCw className="animate-spin text-indigo-400" size={20} />
70
+ </div>
71
+ ) : isEditingKnowledge ? (
72
+ <textarea
73
+ className="w-full h-96 bg-gray-950/60 border border-gray-800/80 rounded-xl p-4 text-xs font-mono text-gray-305 focus:outline-none focus:border-indigo-500/80 resize-y"
74
+ value={editedKnowledge}
75
+ onChange={(e) => setEditedKnowledge(e.target.value)}
76
+ />
77
+ ) : (
78
+ <div className="bg-gray-950/40 border border-gray-800/30 rounded-xl p-4 text-gray-350 text-xs leading-relaxed overflow-auto font-mono whitespace-pre-wrap max-h-96">
79
+ {knowledgeContent || "No knowledge file generated yet."}
80
+ </div>
81
+ )}
82
+ </div>
83
+ );
84
+ };
@@ -0,0 +1,230 @@
1
+ import React from 'react';
2
+ import { Sparkles, Settings as SettingsIcon, ArrowRight } from 'lucide-react';
3
+ import type { NexusFlowConfig } from '../../types.js';
4
+
5
+ interface OnboardingWizardProps {
6
+ config: NexusFlowConfig;
7
+ defaultPaths: { devDir: string; workspacesDir: string } | null;
8
+ setConfig: (cfg: NexusFlowConfig) => void;
9
+ saveAppConfig: (cfg: NexusFlowConfig) => Promise<void>;
10
+ }
11
+
12
+ export const OnboardingWizard: React.FC<OnboardingWizardProps> = ({
13
+ config,
14
+ defaultPaths,
15
+ setConfig,
16
+ saveAppConfig,
17
+ }) => {
18
+ const isFormValid = config.devDir.trim() !== '' && config.workspacesDir.trim() !== '';
19
+
20
+ return (
21
+ <div className="flex min-h-screen bg-[#070913] text-gray-100 font-sans items-center justify-center p-6 bg-gradient-to-br from-[#0c0f24] via-[#070913] to-[#04050b]">
22
+ {/* Onboarding Box */}
23
+ <div className="max-w-6xl w-full bg-[#111827]/40 border border-gray-800/80 rounded-2xl p-8 backdrop-blur-md shadow-2xl grid grid-cols-1 lg:grid-cols-12 gap-10">
24
+
25
+ {/* Left Column: Onboarding Guide & Concepts */}
26
+ <div className="lg:col-span-7 flex flex-col justify-between">
27
+ <div>
28
+ <div className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 text-xs font-semibold uppercase tracking-wider mb-4">
29
+ <Sparkles size={12} className="text-cyan-400 animate-pulse" /> Onboarding Guide
30
+ </div>
31
+ <h1 className="text-3xl font-extrabold tracking-tight text-white mb-2 bg-gradient-to-r from-white via-gray-200 to-indigo-300 bg-clip-text text-transparent">
32
+ Welcome to NexusFlow
33
+ </h1>
34
+ <p className="text-sm text-gray-400 mb-8 max-w-xl">
35
+ NexusFlow orchestrates multi-repository developer environments. It combines isolated Git worktrees, automatic code analyzer sweeps, and background process running into a single dashboard.
36
+ </p>
37
+
38
+ {/* Onboarding Steps */}
39
+ <div className="space-y-6">
40
+ <div className="flex gap-4">
41
+ <div className="w-8 h-8 rounded-full bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 flex items-center justify-center font-bold text-sm shrink-0">
42
+ 1
43
+ </div>
44
+ <div>
45
+ <h3 className="text-sm font-semibold text-white">Configure Development Folders</h3>
46
+ <p className="text-xs text-gray-400 mt-1">
47
+ Specify your local code path and target workspaces path. For the first setup, these paths start empty so you can explicitly configure them.
48
+ </p>
49
+ </div>
50
+ </div>
51
+
52
+ <div className="flex gap-4">
53
+ <div className="w-8 h-8 rounded-full bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 flex items-center justify-center font-bold text-sm shrink-0">
54
+ 2
55
+ </div>
56
+ <div>
57
+ <h3 className="text-sm font-semibold text-white">Build Isolated Branch Workspaces</h3>
58
+ <p className="text-xs text-gray-400 mt-1">
59
+ Choose repositories and input your feature branch. NexusFlow runs <code>git worktree</code> to checkout dependencies under a unified folder structure, leaving your primary repository directories clean.
60
+ </p>
61
+ </div>
62
+ </div>
63
+
64
+ <div className="flex gap-4">
65
+ <div className="w-8 h-8 rounded-full bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 flex items-center justify-center font-bold text-sm shrink-0">
66
+ 3
67
+ </div>
68
+ <div>
69
+ <h3 className="text-sm font-semibold text-white">Align AI Coding Contexts</h3>
70
+ <p className="text-xs text-gray-400 mt-1">
71
+ NexusFlow automatically generates configuration files (<code>CLAUDE.md</code>, <code>.cursorrules</code>, <code>AGENTS.md</code>) that instruct the AI assistant to analyze project inter-dependencies, document its assumptions in <code>nexusflow-overview.md</code>, and highlight clarifying questions.
72
+ </p>
73
+ </div>
74
+ </div>
75
+
76
+ <div className="flex gap-4">
77
+ <div className="w-8 h-8 rounded-full bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 flex items-center justify-center font-bold text-sm shrink-0">
78
+ 4
79
+ </div>
80
+ <div>
81
+ <h3 className="text-sm font-semibold text-white">Orchestrate Background Services</h3>
82
+ <p className="text-xs text-gray-400 mt-1">
83
+ Run APIs, database scripts, and frontend watch tasks concurrently from the web portal. Monitor real-time logs inside a unified terminal pane.
84
+ </p>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ {/* Comparison Dashboard */}
91
+ <div className="mt-8 pt-6 border-t border-gray-800/80">
92
+ <h4 className="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-3">Industry Comparison</h4>
93
+ <div className="overflow-x-auto font-sans">
94
+ <table className="w-full text-[10px] text-gray-400 text-left border-collapse">
95
+ <thead>
96
+ <tr className="border-b border-gray-800 text-gray-500">
97
+ <th className="py-2 pr-4 font-semibold">Orchestrator</th>
98
+ <th className="py-2 px-4 font-semibold">Multi-Repo</th>
99
+ <th className="py-2 px-4 font-semibold">AI Rules Integration</th>
100
+ <th className="py-2 pl-4 font-semibold">Weight</th>
101
+ </tr>
102
+ </thead>
103
+ <tbody>
104
+ <tr className="border-b border-gray-800/40">
105
+ <td className="py-2 pr-4 font-semibold text-white">Docker Compose</td>
106
+ <td className="py-2 px-4">Yes (Containers only)</td>
107
+ <td className="py-2 px-4">No</td>
108
+ <td className="py-2 pl-4">Medium (VM overhead)</td>
109
+ </tr>
110
+ <tr className="border-b border-gray-800/40">
111
+ <td className="py-2 pr-4 font-semibold text-white">Lerna / Turborepo</td>
112
+ <td className="py-2 px-4">Monorepo only</td>
113
+ <td className="py-2 px-4">No</td>
114
+ <td className="py-2 pl-4">Light</td>
115
+ </tr>
116
+ <tr className="border-b border-gray-800/40">
117
+ <td className="py-2 pr-4 font-semibold text-white">DevPod / Gitpod</td>
118
+ <td className="py-2 px-4">Yes (Complex config)</td>
119
+ <td className="py-2 px-4">No</td>
120
+ <td className="py-2 pl-4">Heavy (Full virtual VM)</td>
121
+ </tr>
122
+ <tr>
123
+ <td className="py-2 pr-4 font-semibold text-indigo-400">NexusFlow</td>
124
+ <td className="py-2 px-4 text-indigo-300">Yes (Native Worktrees)</td>
125
+ <td className="py-2 px-4 text-indigo-300">Yes (CLAUDE.md/MDC rules)</td>
126
+ <td className="py-2 pl-4 text-indigo-300">Extremely Light (Native processes)</td>
127
+ </tr>
128
+ </tbody>
129
+ </table>
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+ {/* Right Column: Configuration Form */}
135
+ <div className="lg:col-span-5 flex flex-col justify-center">
136
+ <div className="bg-gray-950/40 border border-gray-800/80 rounded-2xl p-6 shadow-lg">
137
+ <h2 className="text-xl font-bold text-white mb-1 flex items-center gap-2">
138
+ <SettingsIcon className="text-indigo-400 animate-spin-slow" size={20} /> Initialize Config
139
+ </h2>
140
+ <p className="text-xs text-gray-500 mb-6">
141
+ Define the directories on your machine. The fields are empty so you can provide your paths.
142
+ </p>
143
+
144
+ {/* Form Input fields */}
145
+ <div className="space-y-5">
146
+ <div>
147
+ <label className="block text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-2">Development Directory</label>
148
+ <input
149
+ type="text"
150
+ className="w-full bg-[#111827] border border-gray-800 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 rounded-lg px-4 py-3 text-white placeholder-gray-600 transition-all outline-none text-xs shadow-inner"
151
+ placeholder="e.g. C:\Users\username\dev"
152
+ value={config.devDir}
153
+ onChange={(e) => setConfig({ ...config, devDir: e.target.value })}
154
+ />
155
+ {defaultPaths && (
156
+ <div className="text-[10px] text-gray-500 mt-1.5 flex justify-between items-center">
157
+ <span>Suggested: <code>{defaultPaths.devDir}</code></span>
158
+ </div>
159
+ )}
160
+ </div>
161
+
162
+ <div>
163
+ <label className="block text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-2">Workspaces Directory</label>
164
+ <input
165
+ type="text"
166
+ className="w-full bg-[#111827] border border-gray-800 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 rounded-lg px-4 py-3 text-white placeholder-gray-600 transition-all outline-none text-xs shadow-inner"
167
+ placeholder="e.g. C:\Users\username\dev\workspaces"
168
+ value={config.workspacesDir}
169
+ onChange={(e) => setConfig({ ...config, workspacesDir: e.target.value })}
170
+ />
171
+ {defaultPaths && (
172
+ <div className="text-[10px] text-gray-500 mt-1.5 flex justify-between items-center">
173
+ <span>Suggested: <code>{defaultPaths.workspacesDir}</code></span>
174
+ </div>
175
+ )}
176
+ </div>
177
+
178
+ {/* Form Buttons */}
179
+ <div className="flex gap-2 pt-2">
180
+ <button
181
+ type="button"
182
+ className="flex-1 inline-flex items-center justify-center gap-1.5 px-3 py-2 bg-gray-900 border border-gray-800 hover:bg-gray-800 hover:border-gray-700 rounded-lg text-xs font-semibold transition-all cursor-pointer"
183
+ onClick={() => {
184
+ if (defaultPaths) {
185
+ setConfig({
186
+ ...config,
187
+ devDir: defaultPaths.devDir,
188
+ workspacesDir: defaultPaths.workspacesDir,
189
+ });
190
+ }
191
+ }}
192
+ >
193
+ Suggest Defaults
194
+ </button>
195
+ <button
196
+ type="button"
197
+ className="px-3 py-2 bg-gray-900 border border-gray-800 hover:bg-gray-800 hover:border-rose-900/60 hover:text-rose-400 rounded-lg text-xs font-semibold transition-all cursor-pointer"
198
+ onClick={() => {
199
+ setConfig({
200
+ ...config,
201
+ devDir: '',
202
+ workspacesDir: '',
203
+ version: config.version,
204
+ defaultAssistant: config.defaultAssistant,
205
+ scanDepth: config.scanDepth,
206
+ });
207
+ }}
208
+ >
209
+ Clear
210
+ </button>
211
+ </div>
212
+
213
+ {/* Save Button */}
214
+ <div className="pt-4">
215
+ <button
216
+ type="button"
217
+ className="w-full inline-flex items-center justify-center gap-2 px-5 py-3 rounded-lg text-sm font-semibold bg-gradient-to-r from-indigo-500 to-indigo-600 hover:from-indigo-600 hover:to-indigo-700 text-white shadow-lg shadow-indigo-500/20 hover:-translate-y-0.5 active:translate-y-0 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:translate-y-0 transition-all cursor-pointer"
218
+ disabled={!isFormValid}
219
+ onClick={() => saveAppConfig(config)}
220
+ >
221
+ Save & Get Started <ArrowRight size={16} />
222
+ </button>
223
+ </div>
224
+ </div>
225
+ </div>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ );
230
+ };
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { ListOrdered, RefreshCw } from 'lucide-react';
3
+
4
+ interface ImplementationPlanProps {
5
+ planContent: string;
6
+ planLoading: boolean;
7
+ }
8
+
9
+ export const ImplementationPlan: React.FC<ImplementationPlanProps> = ({
10
+ planContent,
11
+ planLoading,
12
+ }) => {
13
+ return (
14
+ <div className="bg-[#090d1a]/20 border border-gray-800/60 rounded-xl p-4">
15
+ <header className="flex justify-between items-center mb-4">
16
+ <h4 className="text-sm font-bold text-white flex items-center gap-2">
17
+ <ListOrdered size={16} className="text-cyan-400" /> Inter-Repo Implementation Plan (nexusflow-plan.md)
18
+ </h4>
19
+ </header>
20
+
21
+ {planLoading ? (
22
+ <div className="flex justify-center py-10">
23
+ <RefreshCw className="animate-spin text-indigo-400" size={20} />
24
+ </div>
25
+ ) : (
26
+ <div className="bg-gray-950/40 border border-gray-800/30 rounded-xl p-4 text-gray-350 text-xs leading-relaxed overflow-auto font-mono whitespace-pre-wrap max-h-96">
27
+ {planContent || "No implementation plan generated yet."}
28
+ </div>
29
+ )}
30
+ </div>
31
+ );
32
+ };