create-claudeportal 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/bin/cli.js +37 -0
  2. package/dist/assets/index-BBU5K5iA.js +132 -0
  3. package/dist/assets/index-fNmv07eE.css +1 -0
  4. package/dist/index.html +13 -0
  5. package/index.html +12 -0
  6. package/mockups/01-chat-conversation-v2.html +803 -0
  7. package/mockups/01-chat-conversation.html +592 -0
  8. package/mockups/02-activity-feed.html +648 -0
  9. package/mockups/03-focused-workspace.html +680 -0
  10. package/mockups/04-documents-mode.html +1556 -0
  11. package/package.json +54 -0
  12. package/server/index.js +140 -0
  13. package/server/lib/detect-tools.js +93 -0
  14. package/server/lib/file-scanner.js +46 -0
  15. package/server/lib/file-watcher.js +45 -0
  16. package/server/lib/fix-npm-prefix.js +61 -0
  17. package/server/lib/folder-scanner.js +43 -0
  18. package/server/lib/install-tools.js +122 -0
  19. package/server/lib/platform.js +18 -0
  20. package/server/lib/sse-manager.js +36 -0
  21. package/server/lib/terminal.js +95 -0
  22. package/server/lib/validate-folder-path.js +17 -0
  23. package/server/lib/validate-path.js +13 -0
  24. package/server/routes/detect.js +64 -0
  25. package/server/routes/doc-events.js +94 -0
  26. package/server/routes/events.js +37 -0
  27. package/server/routes/folder.js +195 -0
  28. package/server/routes/github.js +21 -0
  29. package/server/routes/health.js +16 -0
  30. package/server/routes/install.js +102 -0
  31. package/server/routes/project.js +18 -0
  32. package/server/routes/scaffold.js +45 -0
  33. package/skills-lock.json +15 -0
  34. package/tsconfig.app.json +17 -0
  35. package/tsconfig.node.json +11 -0
  36. package/tsconfig.tsbuildinfo +1 -0
  37. package/ui/app.js +747 -0
  38. package/ui/index.html +272 -0
  39. package/ui/styles.css +788 -0
@@ -0,0 +1,45 @@
1
+ const express = require('express')
2
+ const path = require('path')
3
+ const fs = require('fs')
4
+ const os = require('os')
5
+
6
+ const router = express.Router()
7
+
8
+ function copyRecursive(src, dest) {
9
+ let count = 0
10
+ const stat = fs.statSync(src)
11
+
12
+ if (stat.isDirectory()) {
13
+ fs.mkdirSync(dest, { recursive: true })
14
+ for (const entry of fs.readdirSync(src)) {
15
+ count += copyRecursive(path.join(src, entry), path.join(dest, entry))
16
+ }
17
+ } else {
18
+ // Don't overwrite existing files (in case of re-run)
19
+ if (!fs.existsSync(dest)) {
20
+ fs.copyFileSync(src, dest)
21
+ count = 1
22
+ }
23
+ }
24
+ return count
25
+ }
26
+
27
+ router.post('/scaffold', (req, res) => {
28
+ const { projectName } = req.body
29
+ if (!projectName || !/^[a-zA-Z0-9._-]+$/.test(projectName)) {
30
+ return res.status(400).json({ error: 'Invalid project name' })
31
+ }
32
+
33
+ const claudeDir = path.join(os.homedir(), 'Claude')
34
+ const projectDir = path.join(claudeDir, projectName)
35
+ const templateDir = path.join(__dirname, '..', '..', 'templates', 'starter')
36
+
37
+ const filesCopied = copyRecursive(templateDir, projectDir)
38
+
39
+ res.json({
40
+ projectDir,
41
+ files: filesCopied,
42
+ })
43
+ })
44
+
45
+ module.exports = router
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": 1,
3
+ "skills": {
4
+ "stripe-best-practices": {
5
+ "source": "docs.stripe.com",
6
+ "sourceType": "well-known",
7
+ "computedHash": "7b886129e39257cd1c3b885cb7e5bdcb04973598acc421fb7418c32fb1690dc2"
8
+ },
9
+ "upgrade-stripe": {
10
+ "source": "docs.stripe.com",
11
+ "sourceType": "well-known",
12
+ "computedHash": "32fe96a1d9933d2d0a1bb99c8328b01284b018dcbae850f069556c82c07b8c7e"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "noEmit": true,
11
+ "skipLibCheck": true,
12
+ "paths": {
13
+ "@/*": ["./src/*"]
14
+ }
15
+ },
16
+ "include": ["src"]
17
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "noEmit": true,
7
+ "isolatedModules": true,
8
+ "skipLibCheck": true
9
+ },
10
+ "include": ["vite.config.ts"]
11
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/app.tsx","./src/main.tsx","./src/components/chat/buildsidebar.tsx","./src/components/checklist/featurebuilder.tsx","./src/components/checklist/healthcheckitem.tsx","./src/components/checklist/healthsection.tsx","./src/components/checklist/prepushsection.tsx","./src/components/checklist/testingsection.tsx","./src/components/document/contextsection.tsx","./src/components/document/docsidebar.tsx","./src/components/document/foldersection.tsx","./src/components/document/outcomesection.tsx","./src/components/document/outputpanel.tsx","./src/components/document/stylereferencesection.tsx","./src/components/layout/checklistdrawer.tsx","./src/components/layout/errorbanner.tsx","./src/components/layout/iconrail.tsx","./src/components/layout/topbar.tsx","./src/components/preview/previewpanel.tsx","./src/components/setup/howitworks.tsx","./src/components/setup/projectselector.tsx","./src/components/setup/setupwizard.tsx","./src/components/setup/tooldetection.tsx","./src/components/setup/toolinstaller.tsx","./src/components/terminal/terminalpanel.tsx","./src/context/docmodecontext.tsx","./src/context/projectcontext.tsx","./src/context/terminalcontext.tsx","./src/hooks/usedocevents.ts","./src/hooks/usehealthscan.ts","./src/hooks/useprojectinfo.ts","./src/hooks/usesse.ts","./src/lib/api.ts","./src/lib/doc-prompts.ts","./src/lib/storage.ts","./src/lib/style-templates.ts","./src/types/doc.ts","./src/types/index.ts"],"version":"5.9.3"}