foliko 1.0.80 → 1.0.81

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 (235) hide show
  1. package/.agent/agents/code-assistant.json +14 -0
  2. package/.agent/agents/email-assistant.json +14 -0
  3. package/.agent/agents/file-assistant.json +15 -0
  4. package/.agent/agents/system-assistant.json +15 -0
  5. package/.agent/agents/web-assistant.json +12 -0
  6. package/.agent/data/ambient/goals.json +50 -0
  7. package/.agent/data/ambient/memories.json +7 -0
  8. package/.agent/data/default.json +15 -31894
  9. package/.agent/data/plugins-state.json +146 -181
  10. package/.agent/data/scheduler/tasks.json +1 -0
  11. package/.agent/mcp_config.json +1 -0
  12. package/.agent/package.json +8 -0
  13. package/.agent/plugins/__pycache__/test_plugin.cpython-312.pyc +0 -0
  14. package/.agent/plugins/system-info/index.js +387 -0
  15. package/.agent/plugins/system-info/package.json +4 -0
  16. package/.agent/plugins/system-info/test.js +40 -0
  17. package/.agent/plugins/test_plugin.py +304 -0
  18. package/.agent/plugins.json +14 -5
  19. package/.agent/python-scripts/test_sample.py +24 -0
  20. package/.agent/skills/sysinfo/SKILL.md +38 -0
  21. package/.agent/skills/sysinfo/system-info.sh +130 -0
  22. package/.agent/skills/workflow/SKILL.md +324 -0
  23. package/.agent/workflows/email-digest.json +50 -0
  24. package/.agent/workflows/file-backup.json +21 -0
  25. package/.agent/workflows/get-ip-notify.json +32 -0
  26. package/.agent/workflows/news-aggregator.json +93 -0
  27. package/.agent/workflows/news-dashboard-v2.json +94 -0
  28. package/.agent/workflows/notification-batch.json +32 -0
  29. package/.claude/settings.local.json +171 -171
  30. package/.env.example +56 -56
  31. package/cli/bin/foliko.js +12 -12
  32. package/cli/src/commands/chat.js +143 -143
  33. package/cli/src/commands/list.js +93 -93
  34. package/cli/src/index.js +75 -75
  35. package/cli/src/ui/chat-ui.js +201 -201
  36. package/cli/src/utils/ansi.js +40 -40
  37. package/cli/src/utils/markdown.js +292 -292
  38. package/examples/ambient-example.js +194 -194
  39. package/examples/basic.js +115 -115
  40. package/examples/bootstrap.js +121 -121
  41. package/examples/mcp-example.js +56 -56
  42. package/examples/skill-example.js +49 -49
  43. package/examples/test-chat.js +137 -137
  44. package/examples/test-mcp.js +85 -85
  45. package/examples/test-reload.js +59 -59
  46. package/examples/test-telegram.js +50 -50
  47. package/examples/test-tg-bot.js +45 -45
  48. package/examples/test-tg-simple.js +47 -47
  49. package/examples/test-tg.js +62 -62
  50. package/examples/test-think.js +43 -43
  51. package/examples/test-web-plugin.js +103 -103
  52. package/examples/test-weixin-feishu.js +103 -103
  53. package/examples/workflow.js +158 -158
  54. package/package.json +83 -83
  55. package/plugins/ai-plugin.js +102 -102
  56. package/plugins/ambient-agent/EventWatcher.js +113 -113
  57. package/plugins/ambient-agent/ExplorerLoop.js +640 -640
  58. package/plugins/ambient-agent/GoalManager.js +197 -197
  59. package/plugins/ambient-agent/Reflector.js +95 -95
  60. package/plugins/ambient-agent/StateStore.js +90 -90
  61. package/plugins/ambient-agent/constants.js +101 -101
  62. package/plugins/ambient-agent/index.js +579 -579
  63. package/plugins/audit-plugin.js +187 -187
  64. package/plugins/default-plugins.js +548 -548
  65. package/plugins/email/constants.js +64 -64
  66. package/plugins/email/handlers.js +461 -461
  67. package/plugins/email/index.js +278 -278
  68. package/plugins/email/monitor.js +269 -269
  69. package/plugins/email/parser.js +138 -138
  70. package/plugins/email/reply.js +151 -151
  71. package/plugins/email/utils.js +124 -124
  72. package/plugins/extension-executor-plugin.js +326 -326
  73. package/plugins/feishu-plugin.js +481 -481
  74. package/plugins/file-system-plugin.js +920 -877
  75. package/plugins/gate-trading.js +747 -747
  76. package/plugins/install-plugin.js +199 -199
  77. package/plugins/python-executor-plugin.js +367 -367
  78. package/plugins/python-plugin-loader.js +651 -651
  79. package/plugins/rules-plugin.js +294 -294
  80. package/plugins/scheduler-plugin.js +691 -691
  81. package/plugins/session-plugin.js +494 -494
  82. package/plugins/shell-executor-plugin.js +197 -197
  83. package/plugins/storage-plugin.js +263 -263
  84. package/plugins/subagent-plugin.js +845 -845
  85. package/plugins/telegram-plugin.js +482 -482
  86. package/plugins/think-plugin.js +345 -345
  87. package/plugins/tools-plugin.js +196 -196
  88. package/plugins/web-plugin.js +637 -637
  89. package/plugins/weixin-plugin.js +545 -545
  90. package/skills/find-skills/AGENTS.md +162 -162
  91. package/skills/find-skills/SKILL.md +133 -133
  92. package/skills/foliko-dev/SKILL.md +563 -583
  93. package/skills/python-plugin-dev/SKILL.md +238 -238
  94. package/src/capabilities/index.js +11 -11
  95. package/src/capabilities/skill-manager.js +609 -609
  96. package/src/capabilities/workflow-engine.js +1109 -1109
  97. package/src/core/agent-chat.js +141 -134
  98. package/src/core/agent.js +958 -958
  99. package/src/core/framework.js +465 -465
  100. package/src/core/index.js +19 -19
  101. package/src/core/plugin-base.js +262 -262
  102. package/src/core/plugin-manager.js +863 -863
  103. package/src/core/provider.js +114 -114
  104. package/src/core/sub-agent-config.js +264 -264
  105. package/src/core/system-prompt-builder.js +120 -120
  106. package/src/core/tool-registry.js +517 -517
  107. package/src/core/tool-router.js +297 -297
  108. package/src/executors/executor-base.js +58 -58
  109. package/src/executors/mcp-executor.js +845 -845
  110. package/src/index.js +25 -25
  111. package/src/utils/circuit-breaker.js +301 -301
  112. package/src/utils/error-boundary.js +363 -363
  113. package/src/utils/error.js +374 -374
  114. package/src/utils/event-emitter.js +97 -97
  115. package/src/utils/id.js +133 -133
  116. package/src/utils/index.js +217 -217
  117. package/src/utils/logger.js +181 -181
  118. package/src/utils/plugin-helpers.js +90 -90
  119. package/src/utils/retry.js +122 -122
  120. package/src/utils/sandbox.js +292 -292
  121. package/test/tool-registry-validation.test.js +218 -218
  122. package/website/script.js +136 -136
  123. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  124. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  125. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  126. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  127. package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  128. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  129. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  130. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  131. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  132. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  133. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  134. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  135. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  136. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  137. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  138. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  139. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  140. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  141. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  142. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  143. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  144. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  145. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  146. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  147. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  148. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  149. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  150. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  151. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  152. package/.agent/ARCHITECTURE.md +0 -288
  153. package/.agent/agents/ambient-agent.md +0 -57
  154. package/.agent/agents/debugger.md +0 -55
  155. package/.agent/agents/email-assistant.md +0 -49
  156. package/.agent/agents/file-manager.md +0 -42
  157. package/.agent/agents/python-developer.md +0 -60
  158. package/.agent/agents/scheduler.md +0 -59
  159. package/.agent/agents/web-developer.md +0 -45
  160. package/.agent/mcp_config_updated.json +0 -12
  161. package/.agent/rules/GEMINI.md +0 -273
  162. package/.agent/rules/allow-rule.md +0 -77
  163. package/.agent/rules/log-rule.md +0 -83
  164. package/.agent/rules/security-rule.md +0 -93
  165. package/.agent/scripts/auto_preview.py +0 -148
  166. package/.agent/scripts/checklist.py +0 -217
  167. package/.agent/scripts/session_manager.py +0 -120
  168. package/.agent/scripts/verify_all.py +0 -327
  169. package/.agent/skills/api-patterns/SKILL.md +0 -81
  170. package/.agent/skills/api-patterns/api-style.md +0 -42
  171. package/.agent/skills/api-patterns/auth.md +0 -24
  172. package/.agent/skills/api-patterns/documentation.md +0 -26
  173. package/.agent/skills/api-patterns/graphql.md +0 -41
  174. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  175. package/.agent/skills/api-patterns/response.md +0 -37
  176. package/.agent/skills/api-patterns/rest.md +0 -40
  177. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  178. package/.agent/skills/api-patterns/security-testing.md +0 -122
  179. package/.agent/skills/api-patterns/trpc.md +0 -41
  180. package/.agent/skills/api-patterns/versioning.md +0 -22
  181. package/.agent/skills/app-builder/SKILL.md +0 -75
  182. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  183. package/.agent/skills/app-builder/feature-building.md +0 -53
  184. package/.agent/skills/app-builder/project-detection.md +0 -34
  185. package/.agent/skills/app-builder/scaffolding.md +0 -118
  186. package/.agent/skills/app-builder/tech-stack.md +0 -40
  187. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  188. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  189. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  190. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  191. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  192. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  193. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  194. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  195. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  196. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  197. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  198. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  199. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  200. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  201. package/.agent/skills/architecture/SKILL.md +0 -55
  202. package/.agent/skills/architecture/context-discovery.md +0 -43
  203. package/.agent/skills/architecture/examples.md +0 -94
  204. package/.agent/skills/architecture/pattern-selection.md +0 -68
  205. package/.agent/skills/architecture/patterns-reference.md +0 -50
  206. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  207. package/.agent/skills/clean-code/SKILL.md +0 -201
  208. package/.agent/skills/doc.md +0 -177
  209. package/.agent/skills/frontend-design/SKILL.md +0 -418
  210. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  211. package/.agent/skills/frontend-design/color-system.md +0 -311
  212. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  213. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  214. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  215. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  216. package/.agent/skills/frontend-design/typography-system.md +0 -345
  217. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  218. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  219. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  220. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  221. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  222. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  223. package/.agent/workflows/brainstorm.md +0 -113
  224. package/.agent/workflows/create.md +0 -59
  225. package/.agent/workflows/debug.md +0 -103
  226. package/.agent/workflows/deploy.md +0 -176
  227. package/.agent/workflows/enhance.md +0 -63
  228. package/.agent/workflows/orchestrate.md +0 -237
  229. package/.agent/workflows/plan.md +0 -89
  230. package/.agent/workflows/preview.md +0 -81
  231. package/.agent/workflows/simple-test.md +0 -42
  232. package/.agent/workflows/status.md +0 -86
  233. package/.agent/workflows/structured-orchestrate.md +0 -180
  234. package/.agent/workflows/test.md +0 -144
  235. package/.agent/workflows/ui-ux-pro-max.md +0 -296
@@ -1,118 +0,0 @@
1
- # Project Scaffolding
2
-
3
- > Directory structure and core files for new projects.
4
-
5
- ---
6
-
7
- ## Next.js Full-Stack Structure (2025 Optimized)
8
-
9
- ```
10
- project-name/
11
- ├── src/
12
- │ ├── app/ # Routes only (thin layer)
13
- │ │ ├── layout.tsx
14
- │ │ ├── page.tsx
15
- │ │ ├── globals.css
16
- │ │ ├── (auth)/ # Route group - auth pages
17
- │ │ │ ├── login/page.tsx
18
- │ │ │ └── register/page.tsx
19
- │ │ ├── (dashboard)/ # Route group - dashboard layout
20
- │ │ │ ├── layout.tsx
21
- │ │ │ └── page.tsx
22
- │ │ └── api/
23
- │ │ └── [resource]/route.ts
24
- │ │
25
- │ ├── features/ # Feature-based modules
26
- │ │ ├── auth/
27
- │ │ │ ├── components/
28
- │ │ │ ├── hooks/
29
- │ │ │ ├── actions.ts # Server Actions
30
- │ │ │ ├── queries.ts # Data fetching
31
- │ │ │ └── types.ts
32
- │ │ ├── products/
33
- │ │ │ ├── components/
34
- │ │ │ ├── actions.ts
35
- │ │ │ └── queries.ts
36
- │ │ └── cart/
37
- │ │ └── ...
38
- │ │
39
- │ ├── shared/ # Shared utilities
40
- │ │ ├── components/ui/ # Reusable UI components
41
- │ │ ├── lib/ # Utils, helpers
42
- │ │ └── hooks/ # Global hooks
43
- │ │
44
- │ └── server/ # Server-only code
45
- │ ├── db/ # Database client (Prisma)
46
- │ ├── auth/ # Auth config
47
- │ └── services/ # External API integrations
48
-
49
- ├── prisma/
50
- │ ├── schema.prisma
51
- │ ├── migrations/
52
- │ └── seed.ts
53
-
54
- ├── public/
55
- ├── .env.example
56
- ├── .env.local
57
- ├── package.json
58
- ├── tailwind.config.ts
59
- ├── tsconfig.json
60
- └── README.md
61
- ```
62
-
63
- ---
64
-
65
- ## Structure Principles
66
-
67
- | Principle | Implementation |
68
- |-----------|----------------|
69
- | **Feature isolation** | Each feature in `features/` with its own components, hooks, actions |
70
- | **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports |
71
- | **Thin routes** | `app/` only for routing, logic lives in `features/` |
72
- | **Route groups** | `(groupName)/` for layout sharing without URL impact |
73
- | **Shared code** | `shared/` for truly reusable UI and utilities |
74
-
75
- ---
76
-
77
- ## Core Files
78
-
79
- | File | Purpose |
80
- |------|---------|
81
- | `package.json` | Dependencies |
82
- | `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |
83
- | `tailwind.config.ts` | Tailwind config |
84
- | `.env.example` | Environment template |
85
- | `README.md` | Project documentation |
86
- | `.gitignore` | Git ignore rules |
87
- | `prisma/schema.prisma` | Database schema |
88
-
89
- ---
90
-
91
- ## Path Aliases (tsconfig.json)
92
-
93
- ```json
94
- {
95
- "compilerOptions": {
96
- "paths": {
97
- "@/*": ["./src/*"],
98
- "@/features/*": ["./src/features/*"],
99
- "@/shared/*": ["./src/shared/*"],
100
- "@/server/*": ["./src/server/*"]
101
- }
102
- }
103
- }
104
- ```
105
-
106
- ---
107
-
108
- ## When to Use What
109
-
110
- | Need | Location |
111
- |------|----------|
112
- | New page/route | `app/(group)/page.tsx` |
113
- | Feature component | `features/[name]/components/` |
114
- | Server action | `features/[name]/actions.ts` |
115
- | Data fetching | `features/[name]/queries.ts` |
116
- | Reusable button/input | `shared/components/ui/` |
117
- | Database query | `server/db/` |
118
- | External API call | `server/services/` |
@@ -1,40 +0,0 @@
1
- # Tech Stack Selection (2026)
2
-
3
- > Default and alternative technology choices for web applications.
4
-
5
- ## Default Stack (Web App - 2026)
6
-
7
- ```yaml
8
- Frontend:
9
- framework: Next.js 16 (Stable)
10
- language: TypeScript 5.7+
11
- styling: Tailwind CSS v4
12
- state: React 19 Actions / Server Components
13
- bundler: Turbopack (Stable for Dev)
14
-
15
- Backend:
16
- runtime: Node.js 23
17
- framework: Next.js API Routes / Hono (for Edge)
18
- validation: Zod / TypeBox
19
-
20
- Database:
21
- primary: PostgreSQL
22
- orm: Prisma / Drizzle
23
- hosting: Supabase / Neon
24
-
25
- Auth:
26
- provider: Auth.js (v5) / Clerk
27
-
28
- Monorepo:
29
- tool: Turborepo 2.0
30
- ```
31
-
32
- ## Alternative Options
33
-
34
- | Need | Default | Alternative |
35
- |------|---------|-------------|
36
- | Real-time | - | Supabase Realtime, Socket.io |
37
- | File storage | - | Cloudinary, S3 |
38
- | Payment | Stripe | LemonSqueezy, Paddle |
39
- | Email | - | Resend, SendGrid |
40
- | Search | - | Algolia, Typesense |
@@ -1,39 +0,0 @@
1
- ---
2
- name: templates
3
- description: Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.
4
- allowed-tools: Read, Glob, Grep
5
- ---
6
-
7
- # Project Templates
8
-
9
- > Quick-start templates for scaffolding new projects.
10
-
11
- ---
12
-
13
- ## 🎯 Selective Reading Rule
14
-
15
- **Read ONLY the template matching user's project type!**
16
-
17
- | Template | Tech Stack | When to Use |
18
- |----------|------------|-------------|
19
- | [nextjs-fullstack](nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |
20
- | [nextjs-saas](nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |
21
- | [nextjs-static](nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |
22
- | [express-api](express-api/TEMPLATE.md) | Express + JWT | REST API |
23
- | [python-fastapi](python-fastapi/TEMPLATE.md) | FastAPI | Python API |
24
- | [react-native-app](react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |
25
- | [flutter-app](flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform |
26
- | [electron-desktop](electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |
27
- | [chrome-extension](chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |
28
- | [cli-tool](cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |
29
- | [monorepo-turborepo](monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |
30
- | [astro-static](astro-static/TEMPLATE.md) | Astro + MDX | Blog / Docs |
31
-
32
- ---
33
-
34
- ## Usage
35
-
36
- 1. User says "create [type] app"
37
- 2. Match to appropriate template
38
- 3. Read ONLY that template's TEMPLATE.md
39
- 4. Follow its tech stack and structure
@@ -1,76 +0,0 @@
1
- ---
2
- name: astro-static
3
- description: Astro static site template principles. Content-focused websites, blogs, documentation.
4
- ---
5
-
6
- # Astro Static Site Template
7
-
8
- ## Tech Stack
9
-
10
- | Component | Technology |
11
- |-----------|------------|
12
- | Framework | Astro 4.x |
13
- | Content | MDX + Content Collections |
14
- | Styling | Tailwind CSS |
15
- | Integrations | Sitemap, RSS, SEO |
16
- | Output | Static/SSG |
17
-
18
- ---
19
-
20
- ## Directory Structure
21
-
22
- ```
23
- project-name/
24
- ├── src/
25
- │ ├── components/ # .astro components
26
- │ ├── content/ # MDX content
27
- │ │ ├── blog/
28
- │ │ └── config.ts # Collection schemas
29
- │ ├── layouts/ # Page layouts
30
- │ ├── pages/ # File-based routing
31
- │ └── styles/
32
- ├── public/ # Static assets
33
- ├── astro.config.mjs
34
- └── package.json
35
- ```
36
-
37
- ---
38
-
39
- ## Key Concepts
40
-
41
- | Concept | Description |
42
- |---------|-------------|
43
- | Content Collections | Type-safe content with Zod schemas |
44
- | Islands Architecture | Partial hydration for interactivity |
45
- | Zero JS by default | Static HTML unless needed |
46
- | MDX Support | Markdown with components |
47
-
48
- ---
49
-
50
- ## Setup Steps
51
-
52
- 1. `npm create astro@latest {{name}}`
53
- 2. Add integrations: `npx astro add mdx tailwind sitemap`
54
- 3. Configure `astro.config.mjs`
55
- 4. Create content collections
56
- 5. `npm run dev`
57
-
58
- ---
59
-
60
- ## Deployment
61
-
62
- | Platform | Method |
63
- |----------|--------|
64
- | Vercel | Auto-detected |
65
- | Netlify | Auto-detected |
66
- | Cloudflare Pages | Auto-detected |
67
- | GitHub Pages | Build + deploy action |
68
-
69
- ---
70
-
71
- ## Best Practices
72
-
73
- - Use Content Collections for type safety
74
- - Leverage static generation
75
- - Add islands only where needed
76
- - Optimize images with Astro Image
@@ -1,92 +0,0 @@
1
- ---
2
- name: chrome-extension
3
- description: Chrome Extension template principles. Manifest V3, React, TypeScript.
4
- ---
5
-
6
- # Chrome Extension Template
7
-
8
- ## Tech Stack
9
-
10
- | Component | Technology |
11
- |-----------|------------|
12
- | Manifest | V3 |
13
- | UI | React 18 |
14
- | Language | TypeScript |
15
- | Styling | Tailwind CSS |
16
- | Bundler | Vite |
17
- | Storage | Chrome Storage API |
18
-
19
- ---
20
-
21
- ## Directory Structure
22
-
23
- ```
24
- project-name/
25
- ├── src/
26
- │ ├── popup/ # Extension popup
27
- │ ├── options/ # Options page
28
- │ ├── background/ # Service worker
29
- │ ├── content/ # Content scripts
30
- │ ├── components/
31
- │ ├── hooks/
32
- │ └── lib/
33
- │ ├── storage.ts # Chrome storage helpers
34
- │ └── messaging.ts # Message passing
35
- ├── public/
36
- │ ├── icons/
37
- │ └── manifest.json
38
- └── package.json
39
- ```
40
-
41
- ---
42
-
43
- ## Manifest V3 Concepts
44
-
45
- | Component | Purpose |
46
- |-----------|---------|
47
- | Service Worker | Background processing |
48
- | Content Scripts | Page injection |
49
- | Popup | User interface |
50
- | Options Page | Settings |
51
-
52
- ---
53
-
54
- ## Permissions
55
-
56
- | Permission | Use |
57
- |------------|-----|
58
- | storage | Save user data |
59
- | activeTab | Current tab access |
60
- | scripting | Inject scripts |
61
- | host_permissions | Site access |
62
-
63
- ---
64
-
65
- ## Setup Steps
66
-
67
- 1. `npm create vite {{name}} -- --template react-ts`
68
- 2. Add Chrome types: `npm install -D @types/chrome`
69
- 3. Configure Vite for multi-entry
70
- 4. Create manifest.json
71
- 5. `npm run dev` (watch mode)
72
- 6. Load in Chrome: `chrome://extensions` → Load unpacked
73
-
74
- ---
75
-
76
- ## Development Tips
77
-
78
- | Task | Method |
79
- |------|--------|
80
- | Debug Popup | Right-click icon → Inspect |
81
- | Debug Background | Extensions page → Service worker |
82
- | Debug Content | DevTools console on page |
83
- | Hot Reload | `npm run dev` with watch |
84
-
85
- ---
86
-
87
- ## Best Practices
88
-
89
- - Use type-safe messaging
90
- - Wrap Chrome APIs in promises
91
- - Minimize permissions
92
- - Handle offline gracefully
@@ -1,88 +0,0 @@
1
- ---
2
- name: cli-tool
3
- description: Node.js CLI tool template principles. Commander.js, interactive prompts.
4
- ---
5
-
6
- # CLI Tool Template
7
-
8
- ## Tech Stack
9
-
10
- | Component | Technology |
11
- |-----------|------------|
12
- | Runtime | Node.js 20+ |
13
- | Language | TypeScript |
14
- | CLI Framework | Commander.js |
15
- | Prompts | Inquirer.js |
16
- | Output | chalk + ora |
17
- | Config | cosmiconfig |
18
-
19
- ---
20
-
21
- ## Directory Structure
22
-
23
- ```
24
- project-name/
25
- ├── src/
26
- │ ├── index.ts # Entry point
27
- │ ├── cli.ts # CLI setup
28
- │ ├── commands/ # Command handlers
29
- │ ├── lib/
30
- │ │ ├── config.ts # Config loader
31
- │ │ └── logger.ts # Styled output
32
- │ └── types/
33
- ├── bin/
34
- │ └── cli.js # Executable
35
- └── package.json
36
- ```
37
-
38
- ---
39
-
40
- ## CLI Design Principles
41
-
42
- | Principle | Description |
43
- |-----------|-------------|
44
- | Subcommands | Group related actions |
45
- | Options | Flags with defaults |
46
- | Interactive | Prompts when needed |
47
- | Non-interactive | Support --yes flags |
48
-
49
- ---
50
-
51
- ## Key Components
52
-
53
- | Component | Purpose |
54
- |-----------|---------|
55
- | Commander | Command parsing |
56
- | Inquirer | Interactive prompts |
57
- | Chalk | Colored output |
58
- | Ora | Spinners/loading |
59
- | Cosmiconfig | Config file discovery |
60
-
61
- ---
62
-
63
- ## Setup Steps
64
-
65
- 1. Create project directory
66
- 2. `npm init -y`
67
- 3. Install deps: `npm install commander @inquirer/prompts chalk ora cosmiconfig`
68
- 4. Configure bin in package.json
69
- 5. `npm link` for local testing
70
-
71
- ---
72
-
73
- ## Publishing
74
-
75
- ```bash
76
- npm login
77
- npm publish
78
- ```
79
-
80
- ---
81
-
82
- ## Best Practices
83
-
84
- - Provide helpful error messages
85
- - Support both interactive and non-interactive modes
86
- - Use consistent output styling
87
- - Validate inputs with Zod
88
- - Exit with proper codes (0 success, 1 error)
@@ -1,88 +0,0 @@
1
- ---
2
- name: electron-desktop
3
- description: Electron desktop app template principles. Cross-platform, React, TypeScript.
4
- ---
5
-
6
- # Electron Desktop App Template
7
-
8
- ## Tech Stack
9
-
10
- | Component | Technology |
11
- |-----------|------------|
12
- | Framework | Electron 28+ |
13
- | UI | React 18 |
14
- | Language | TypeScript |
15
- | Styling | Tailwind CSS |
16
- | Bundler | Vite + electron-builder |
17
- | IPC | Type-safe communication |
18
-
19
- ---
20
-
21
- ## Directory Structure
22
-
23
- ```
24
- project-name/
25
- ├── electron/
26
- │ ├── main.ts # Main process
27
- │ ├── preload.ts # Preload script
28
- │ └── ipc/ # IPC handlers
29
- ├── src/
30
- │ ├── App.tsx
31
- │ ├── components/
32
- │ │ ├── TitleBar.tsx # Custom title bar
33
- │ │ └── ...
34
- │ └── hooks/
35
- ├── public/
36
- └── package.json
37
- ```
38
-
39
- ---
40
-
41
- ## Process Model
42
-
43
- | Process | Role |
44
- |---------|------|
45
- | Main | Node.js, system access |
46
- | Renderer | Chromium, React UI |
47
- | Preload | Bridge, context isolation |
48
-
49
- ---
50
-
51
- ## Key Concepts
52
-
53
- | Concept | Purpose |
54
- |---------|---------|
55
- | contextBridge | Safe API exposure |
56
- | ipcMain/ipcRenderer | Process communication |
57
- | nodeIntegration: false | Security |
58
- | contextIsolation: true | Security |
59
-
60
- ---
61
-
62
- ## Setup Steps
63
-
64
- 1. `npm create vite {{name}} -- --template react-ts`
65
- 2. Install: `npm install -D electron electron-builder vite-plugin-electron`
66
- 3. Create electron/ directory
67
- 4. Configure main process
68
- 5. `npm run electron:dev`
69
-
70
- ---
71
-
72
- ## Build Targets
73
-
74
- | Platform | Output |
75
- |----------|--------|
76
- | Windows | NSIS, Portable |
77
- | macOS | DMG, ZIP |
78
- | Linux | AppImage, DEB |
79
-
80
- ---
81
-
82
- ## Best Practices
83
-
84
- - Use preload script for main/renderer bridge
85
- - Type-safe IPC with typed handlers
86
- - Custom title bar for native feel
87
- - Handle window state (maximize, minimize)
88
- - Auto-updates with electron-updater
@@ -1,83 +0,0 @@
1
- ---
2
- name: express-api
3
- description: Express.js REST API template principles. TypeScript, Prisma, JWT.
4
- ---
5
-
6
- # Express.js API Template
7
-
8
- ## Tech Stack
9
-
10
- | Component | Technology |
11
- |-----------|------------|
12
- | Runtime | Node.js 20+ |
13
- | Framework | Express.js |
14
- | Language | TypeScript |
15
- | Database | PostgreSQL + Prisma |
16
- | Validation | Zod |
17
- | Auth | JWT + bcrypt |
18
-
19
- ---
20
-
21
- ## Directory Structure
22
-
23
- ```
24
- project-name/
25
- ├── prisma/
26
- │ └── schema.prisma
27
- ├── src/
28
- │ ├── app.ts # Express setup
29
- │ ├── config/ # Environment
30
- │ ├── routes/ # Route handlers
31
- │ ├── controllers/ # Business logic
32
- │ ├── services/ # Data access
33
- │ ├── middleware/
34
- │ │ ├── auth.ts # JWT verify
35
- │ │ ├── error.ts # Error handler
36
- │ │ └── validate.ts # Zod validation
37
- │ ├── schemas/ # Zod schemas
38
- │ └── utils/
39
- └── package.json
40
- ```
41
-
42
- ---
43
-
44
- ## Middleware Stack
45
-
46
- | Order | Middleware |
47
- |-------|------------|
48
- | 1 | helmet (security) |
49
- | 2 | cors |
50
- | 3 | morgan (logging) |
51
- | 4 | body parsing |
52
- | 5 | routes |
53
- | 6 | error handler |
54
-
55
- ---
56
-
57
- ## API Response Format
58
-
59
- | Type | Structure |
60
- |------|-----------|
61
- | Success | `{ success: true, data: {...} }` |
62
- | Error | `{ error: "message", details: [...] }` |
63
-
64
- ---
65
-
66
- ## Setup Steps
67
-
68
- 1. Create project directory
69
- 2. `npm init -y`
70
- 3. Install deps: `npm install express prisma zod bcrypt jsonwebtoken`
71
- 4. Configure Prisma
72
- 5. `npm run db:push`
73
- 6. `npm run dev`
74
-
75
- ---
76
-
77
- ## Best Practices
78
-
79
- - Layer architecture (routes → controllers → services)
80
- - Validate all inputs with Zod
81
- - Centralized error handling
82
- - Environment-based config
83
- - Use Prisma for type-safe DB access
@@ -1,90 +0,0 @@
1
- ---
2
- name: flutter-app
3
- description: Flutter mobile app template principles. Riverpod, Go Router, clean architecture.
4
- ---
5
-
6
- # Flutter App Template
7
-
8
- ## Tech Stack
9
-
10
- | Component | Technology |
11
- |-----------|------------|
12
- | Framework | Flutter 3.x |
13
- | Language | Dart 3.x |
14
- | State | Riverpod 2.0 |
15
- | Navigation | Go Router |
16
- | HTTP | Dio |
17
- | Storage | Hive |
18
-
19
- ---
20
-
21
- ## Directory Structure
22
-
23
- ```
24
- project_name/
25
- ├── lib/
26
- │ ├── main.dart
27
- │ ├── app.dart
28
- │ ├── core/
29
- │ │ ├── constants/
30
- │ │ ├── theme/
31
- │ │ ├── router/
32
- │ │ └── utils/
33
- │ ├── features/
34
- │ │ ├── auth/
35
- │ │ │ ├── data/
36
- │ │ │ ├── domain/
37
- │ │ │ └── presentation/
38
- │ │ └── home/
39
- │ ├── shared/
40
- │ │ ├── widgets/
41
- │ │ └── providers/
42
- │ └── services/
43
- │ ├── api/
44
- │ └── storage/
45
- ├── test/
46
- └── pubspec.yaml
47
- ```
48
-
49
- ---
50
-
51
- ## Architecture Layers
52
-
53
- | Layer | Contents |
54
- |-------|----------|
55
- | Presentation | Screens, Widgets, Providers |
56
- | Domain | Entities, Use Cases |
57
- | Data | Repositories, Models |
58
-
59
- ---
60
-
61
- ## Key Packages
62
-
63
- | Package | Purpose |
64
- |---------|---------|
65
- | flutter_riverpod | State management |
66
- | riverpod_annotation | Code generation |
67
- | go_router | Navigation |
68
- | dio | HTTP client |
69
- | freezed | Immutable models |
70
- | hive | Local storage |
71
-
72
- ---
73
-
74
- ## Setup Steps
75
-
76
- 1. `flutter create {{name}} --org com.{{bundle}}`
77
- 2. Update `pubspec.yaml`
78
- 3. `flutter pub get`
79
- 4. Run code generation: `dart run build_runner build`
80
- 5. `flutter run`
81
-
82
- ---
83
-
84
- ## Best Practices
85
-
86
- - Feature-first folder structure
87
- - Riverpod for state, React Query pattern for server state
88
- - Freezed for immutable data classes
89
- - Go Router for declarative navigation
90
- - Material 3 theming