aiwf 0.3.17 → 0.3.18

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 (67) hide show
  1. package/package.json +1 -1
  2. package/src/config/file-lists.js +5 -5
  3. package/templates/README.md +0 -78
  4. package/templates/api-server/config.json +0 -64
  5. package/templates/api-server/template/.aiwf/config.json +0 -56
  6. package/templates/api-server/template/.aiwf/feature-ledger.json +0 -42
  7. package/templates/api-server/template/.aiwf/personas/backend-engineer.json +0 -40
  8. package/templates/api-server/template/.aiwf/scripts/cli.js +0 -111
  9. package/templates/api-server/template/.env.example +0 -29
  10. package/templates/api-server/template/.eslintrc.json +0 -23
  11. package/templates/api-server/template/README.md +0 -171
  12. package/templates/api-server/template/jest.config.js +0 -26
  13. package/templates/api-server/template/nodemon.json +0 -9
  14. package/templates/api-server/template/package.json +0 -61
  15. package/templates/api-server/template/src/app.ts +0 -60
  16. package/templates/api-server/template/src/config/swagger.ts +0 -38
  17. package/templates/api-server/template/src/controllers/aiwfController.ts +0 -54
  18. package/templates/api-server/template/src/controllers/authController.ts +0 -128
  19. package/templates/api-server/template/src/controllers/statusController.ts +0 -28
  20. package/templates/api-server/template/src/index.ts +0 -28
  21. package/templates/api-server/template/src/middleware/aiwfMiddleware.ts +0 -50
  22. package/templates/api-server/template/src/middleware/authMiddleware.ts +0 -41
  23. package/templates/api-server/template/src/middleware/errorHandler.ts +0 -42
  24. package/templates/api-server/template/src/middleware/notFoundHandler.ts +0 -14
  25. package/templates/api-server/template/src/middleware/requestLogger.ts +0 -20
  26. package/templates/api-server/template/src/routes/aiwf.ts +0 -31
  27. package/templates/api-server/template/src/routes/index.ts +0 -13
  28. package/templates/api-server/template/src/routes/v1/index.ts +0 -67
  29. package/templates/api-server/template/src/utils/logger.ts +0 -37
  30. package/templates/api-server/template/tests/app.test.ts +0 -40
  31. package/templates/api-server/template/tsconfig.json +0 -43
  32. package/templates/npm-library/config.json +0 -61
  33. package/templates/npm-library/template/LICENSE +0 -21
  34. package/templates/npm-library/template/README.md +0 -201
  35. package/templates/npm-library/template/package.json +0 -78
  36. package/templates/web-app/config.json +0 -53
  37. package/templates/web-app/template/.aiwf/config.json +0 -54
  38. package/templates/web-app/template/.aiwf/feature-ledger.json +0 -37
  39. package/templates/web-app/template/.aiwf/personas/fullstack-developer.json +0 -40
  40. package/templates/web-app/template/.aiwf/scripts/cli.js +0 -110
  41. package/templates/web-app/template/.eslintrc.cjs +0 -20
  42. package/templates/web-app/template/README.md +0 -151
  43. package/templates/web-app/template/index.html +0 -14
  44. package/templates/web-app/template/package.json +0 -44
  45. package/templates/web-app/template/postcss.config.js +0 -6
  46. package/templates/web-app/template/public/vite.svg +0 -1
  47. package/templates/web-app/template/src/App.tsx +0 -21
  48. package/templates/web-app/template/src/components/Layout.tsx +0 -57
  49. package/templates/web-app/template/src/components/aiwf/ContextStatus.tsx +0 -107
  50. package/templates/web-app/template/src/components/aiwf/TokenUsage.tsx +0 -71
  51. package/templates/web-app/template/src/index.css +0 -60
  52. package/templates/web-app/template/src/main.tsx +0 -10
  53. package/templates/web-app/template/src/pages/AiwfDashboard.tsx +0 -57
  54. package/templates/web-app/template/src/pages/HomePage.tsx +0 -89
  55. package/templates/web-app/template/src/pages/NotFound.tsx +0 -25
  56. package/templates/web-app/template/src/stores/aiwfStore.ts +0 -126
  57. package/templates/web-app/template/src/types/global.d.ts +0 -9
  58. package/templates/web-app/template/src/vite-env.d.ts +0 -1
  59. package/templates/web-app/template/tailwind.config.js +0 -30
  60. package/templates/web-app/template/tsconfig.json +0 -37
  61. package/templates/web-app/template/tsconfig.node.json +0 -10
  62. package/templates/web-app/template/vite.config.ts +0 -23
  63. /package/rules/global/{code-style-guide.md → aiwf-code-style-guide.md} +0 -0
  64. /package/rules/global/{coding-principles.md → aiwf-coding-principles.md} +0 -0
  65. /package/rules/global/{development-process.md → aiwf-development-process.md} +0 -0
  66. /package/rules/global/{global-rules.md → aiwf-global-rules.md} +0 -0
  67. /package/rules/manual/{generate-plan-docs.md → aiwf-generate-plan-docs.md} +0 -0
@@ -1,57 +0,0 @@
1
- import { useState, useEffect } from 'react'
2
- import { useAiwfStore } from '@/stores/aiwfStore'
3
- import TokenUsage from '@/components/aiwf/TokenUsage'
4
- import ContextStatus from '@/components/aiwf/ContextStatus'
5
-
6
- export default function AiwfDashboard() {
7
- const { tokenUsage, contextStatus, loadDashboardData } = useAiwfStore()
8
- const [activeTab, setActiveTab] = useState('tokens')
9
-
10
- useEffect(() => {
11
- loadDashboardData()
12
- }, [loadDashboardData])
13
-
14
- const tabs = [
15
- { id: 'tokens', name: '토큰 사용량', icon: '🪙' },
16
- { id: 'context', name: 'Context 상태', icon: '📊' },
17
- ]
18
-
19
- return (
20
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
21
- <div className="mb-8">
22
- <h2 className="text-2xl font-bold text-gray-900 dark:text-white">
23
- AIWF 대시보드
24
- </h2>
25
- <p className="mt-1 text-sm text-gray-500 dark:text-gray-400">
26
- 프로젝트의 AI 지원 개발 현황을 한눈에 확인하세요.
27
- </p>
28
- </div>
29
-
30
- <div className="border-b border-gray-200 dark:border-gray-700">
31
- <nav className="-mb-px flex space-x-8" aria-label="Tabs">
32
- {tabs.map((tab) => (
33
- <button
34
- key={tab.id}
35
- onClick={() => setActiveTab(tab.id)}
36
- className={`
37
- whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm
38
- ${activeTab === tab.id
39
- ? 'border-primary text-primary'
40
- : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300'
41
- }
42
- `}
43
- >
44
- <span className="mr-2">{tab.icon}</span>
45
- {tab.name}
46
- </button>
47
- ))}
48
- </nav>
49
- </div>
50
-
51
- <div className="mt-8">
52
- {activeTab === 'tokens' && <TokenUsage usage={tokenUsage} />}
53
- {activeTab === 'context' && <ContextStatus status={contextStatus} />}
54
- </div>
55
- </div>
56
- )
57
- }
@@ -1,89 +0,0 @@
1
- export default function HomePage() {
2
- return (
3
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
4
- <div className="text-center">
5
- <h2 className="text-3xl font-extrabold tracking-tight text-gray-900 dark:text-white sm:text-4xl">
6
- {{projectName}}에 오신 것을 환영합니다
7
- </h2>
8
- <p className="mt-4 max-w-2xl mx-auto text-xl text-gray-500 dark:text-gray-400">
9
- AIWF가 통합된 React + TypeScript 웹 애플리케이션입니다.
10
- </p>
11
- </div>
12
-
13
- <div className="mt-10">
14
- <dl className="space-y-10 md:space-y-0 md:grid md:grid-cols-2 md:gap-x-8 md:gap-y-10">
15
- <div className="relative">
16
- <dt>
17
- <div className="absolute flex items-center justify-center h-12 w-12 rounded-md bg-primary text-white">
18
- <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
19
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
20
- </svg>
21
- </div>
22
- <p className="ml-16 text-lg leading-6 font-medium text-gray-900 dark:text-white">
23
- 빠른 개발
24
- </p>
25
- </dt>
26
- <dd className="mt-2 ml-16 text-base text-gray-500 dark:text-gray-400">
27
- Vite를 사용한 빠른 HMR과 빌드 속도
28
- </dd>
29
- </div>
30
-
31
- <div className="relative">
32
- <dt>
33
- <div className="absolute flex items-center justify-center h-12 w-12 rounded-md bg-primary text-white">
34
- <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
35
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3" />
36
- </svg>
37
- </div>
38
- <p className="ml-16 text-lg leading-6 font-medium text-gray-900 dark:text-white">
39
- 타입 안정성
40
- </p>
41
- </dt>
42
- <dd className="mt-2 ml-16 text-base text-gray-500 dark:text-gray-400">
43
- TypeScript로 견고한 타입 시스템 구축
44
- </dd>
45
- </div>
46
-
47
- <div className="relative">
48
- <dt>
49
- <div className="absolute flex items-center justify-center h-12 w-12 rounded-md bg-primary text-white">
50
- <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
51
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z" />
52
- </svg>
53
- </div>
54
- <p className="ml-16 text-lg leading-6 font-medium text-gray-900 dark:text-white">
55
- AIWF 통합
56
- </p>
57
- </dt>
58
- <dd className="mt-2 ml-16 text-base text-gray-500 dark:text-gray-400">
59
- AI 지원 개발 워크플로우 내장
60
- </dd>
61
- </div>
62
-
63
- <div className="relative">
64
- <dt>
65
- <div className="absolute flex items-center justify-center h-12 w-12 rounded-md bg-primary text-white">
66
- <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
67
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
68
- </svg>
69
- </div>
70
- <p className="ml-16 text-lg leading-6 font-medium text-gray-900 dark:text-white">
71
- 모던 스타일링
72
- </p>
73
- </dt>
74
- <dd className="mt-2 ml-16 text-base text-gray-500 dark:text-gray-400">
75
- Tailwind CSS로 빠른 UI 개발
76
- </dd>
77
- </div>
78
- </dl>
79
- </div>
80
-
81
- <div className="mt-10 text-center">
82
- <h3 className="text-lg font-medium text-gray-900 dark:text-white">시작하기</h3>
83
- <div className="mt-3 text-base text-gray-500 dark:text-gray-400">
84
- <code className="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded">npm run dev</code>로 개발 서버를 시작하세요.
85
- </div>
86
- </div>
87
- </div>
88
- )
89
- }
@@ -1,25 +0,0 @@
1
- import { Link } from 'react-router-dom'
2
-
3
- export default function NotFound() {
4
- return (
5
- <div className="min-h-[60vh] flex items-center justify-center px-4 sm:px-6 lg:px-8">
6
- <div className="text-center">
7
- <p className="text-base font-semibold text-primary">404</p>
8
- <h1 className="mt-2 text-4xl font-bold text-gray-900 dark:text-white tracking-tight sm:text-5xl">
9
- 페이지를 찾을 수 없습니다
10
- </h1>
11
- <p className="mt-2 text-base text-gray-500 dark:text-gray-400">
12
- 요청하신 페이지가 존재하지 않습니다.
13
- </p>
14
- <div className="mt-6">
15
- <Link
16
- to="/"
17
- className="text-base font-medium text-primary hover:text-primary/80"
18
- >
19
- 홈으로 돌아가기<span aria-hidden="true"> &rarr;</span>
20
- </Link>
21
- </div>
22
- </div>
23
- </div>
24
- )
25
- }
@@ -1,126 +0,0 @@
1
- import { create } from 'zustand'
2
-
3
- interface Feature {
4
- id: string
5
- name: string
6
- description: string
7
- status: 'completed' | 'in_progress' | 'planned'
8
- type: string
9
- created_at: string
10
- completed_at?: string
11
- tags: string[]
12
- }
13
-
14
- interface TokenUsageData {
15
- total: number
16
- used: number
17
- remaining: number
18
- percentage: number
19
- history: Array<{
20
- date: string
21
- tokens: number
22
- action: string
23
- }>
24
- }
25
-
26
- interface ContextStatusData {
27
- compressionLevel: 'none' | 'balanced' | 'aggressive'
28
- cacheEnabled: boolean
29
- cacheSize: number
30
- maxCacheSize: number
31
- lastCompression: string
32
- savedTokens: number
33
- activePersona: string
34
- }
35
-
36
- interface AiwfStore {
37
- features: Feature[]
38
- tokenUsage: TokenUsageData
39
- contextStatus: ContextStatusData
40
- loadDashboardData: () => Promise<void>
41
- updateFeature: (featureId: string, updates: Partial<Feature>) => void
42
- addFeature: (feature: Feature) => void
43
- }
44
-
45
- export const useAiwfStore = create<AiwfStore>((set) => ({
46
- features: [],
47
- tokenUsage: {
48
- total: 100000,
49
- used: 45000,
50
- remaining: 55000,
51
- percentage: 45,
52
- history: []
53
- },
54
- contextStatus: {
55
- compressionLevel: 'balanced',
56
- cacheEnabled: true,
57
- cacheSize: 5242880, // 5MB
58
- maxCacheSize: 52428800, // 50MB
59
- lastCompression: new Date().toISOString(),
60
- savedTokens: 15000,
61
- activePersona: 'fullstack-developer'
62
- },
63
-
64
- loadDashboardData: async () => {
65
- try {
66
- // 실제 구현에서는 API를 호출하거나 로컬 파일을 읽습니다
67
- const mockFeatures: Feature[] = [
68
- {
69
- id: 'F001',
70
- name: '프로젝트 초기 설정',
71
- description: 'React + TypeScript + Vite 기반 웹 애플리케이션 초기 설정',
72
- type: 'setup',
73
- status: 'completed',
74
- created_at: new Date().toISOString(),
75
- completed_at: new Date().toISOString(),
76
- tags: ['초기설정', '인프라', '설정']
77
- }
78
- ]
79
-
80
- const mockHistory = [
81
- {
82
- date: new Date().toISOString(),
83
- tokens: 1500,
84
- action: '컴포넌트 생성'
85
- },
86
- {
87
- date: new Date(Date.now() - 3600000).toISOString(),
88
- tokens: 2300,
89
- action: 'API 통합'
90
- },
91
- {
92
- date: new Date(Date.now() - 7200000).toISOString(),
93
- tokens: 800,
94
- action: '코드 리뷰'
95
- }
96
- ]
97
-
98
- set({
99
- features: mockFeatures,
100
- tokenUsage: {
101
- total: 100000,
102
- used: 45000,
103
- remaining: 55000,
104
- percentage: 45,
105
- history: mockHistory
106
- }
107
- })
108
- } catch (error) {
109
- console.error('Failed to load AIWF dashboard data:', error)
110
- }
111
- },
112
-
113
- updateFeature: (featureId, updates) => {
114
- set((state) => ({
115
- features: state.features.map((feature) =>
116
- feature.id === featureId ? { ...feature, ...updates } : feature
117
- )
118
- }))
119
- },
120
-
121
- addFeature: (feature) => {
122
- set((state) => ({
123
- features: [...state.features, feature]
124
- }))
125
- }
126
- }))
@@ -1,9 +0,0 @@
1
- interface Window {
2
- aiwf: {
3
- trackPage: (path: string) => void
4
- trackEvent: (event: string, data?: any) => void
5
- getFeatures: () => Promise<any[]>
6
- getTokenUsage: () => Promise<any>
7
- getContextStatus: () => Promise<any>
8
- }
9
- }
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,30 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- export default {
3
- content: [
4
- "./index.html",
5
- "./src/**/*.{js,ts,jsx,tsx}",
6
- ],
7
- theme: {
8
- extend: {
9
- colors: {
10
- primary: {
11
- 50: '#eff6ff',
12
- 100: '#dbeafe',
13
- 200: '#bfdbfe',
14
- 300: '#93bbfd',
15
- 400: '#60a5fa',
16
- 500: '#3b82f6',
17
- 600: '#2563eb',
18
- 700: '#1d4ed8',
19
- 800: '#1e40af',
20
- 900: '#1e3a8a',
21
- 950: '#172554',
22
- }
23
- },
24
- fontFamily: {
25
- sans: ['Pretendard', 'Inter', 'system-ui', 'sans-serif'],
26
- }
27
- },
28
- },
29
- plugins: [],
30
- }
@@ -1,37 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
- "module": "ESNext",
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "noEmit": true,
15
- "jsx": "react-jsx",
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "noFallthroughCasesInSwitch": true,
22
-
23
- /* Path Aliases */
24
- "baseUrl": ".",
25
- "paths": {
26
- "@/*": ["src/*"],
27
- "@components/*": ["src/components/*"],
28
- "@pages/*": ["src/pages/*"],
29
- "@hooks/*": ["src/hooks/*"],
30
- "@utils/*": ["src/utils/*"],
31
- "@stores/*": ["src/stores/*"],
32
- "@types/*": ["src/types/*"]
33
- }
34
- },
35
- "include": ["src"],
36
- "references": [{ "path": "./tsconfig.node.json" }]
37
- }
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
@@ -1,23 +0,0 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
- import path from 'path'
4
-
5
- // https://vitejs.dev/config/
6
- export default defineConfig({
7
- plugins: [react()],
8
- resolve: {
9
- alias: {
10
- '@': path.resolve(__dirname, './src'),
11
- '@components': path.resolve(__dirname, './src/components'),
12
- '@pages': path.resolve(__dirname, './src/pages'),
13
- '@hooks': path.resolve(__dirname, './src/hooks'),
14
- '@utils': path.resolve(__dirname, './src/utils'),
15
- '@stores': path.resolve(__dirname, './src/stores'),
16
- '@types': path.resolve(__dirname, './src/types'),
17
- }
18
- },
19
- server: {
20
- port: 3000,
21
- host: true
22
- }
23
- })