create-chaaskit 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 (62) hide show
  1. package/LICENSE +21 -0
  2. package/dist/commands/init.js +5 -0
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/templates/app/root.tsx +26 -14
  6. package/dist/templates/app/routes/chat.admin.promo-codes.tsx +10 -0
  7. package/dist/templates/app/routes/chat.admin.waitlist.tsx +10 -0
  8. package/dist/templates/app/routes.ts +2 -0
  9. package/dist/templates/app/styles/app.css +9 -0
  10. package/dist/templates/config/app.config.ts +29 -80
  11. package/dist/templates/package.json +8 -5
  12. package/dist/templates/postcss.config.js +6 -0
  13. package/dist/templates/server.js +40 -10
  14. package/dist/templates/tailwind.config.ts +76 -0
  15. package/package.json +19 -10
  16. package/dist/cli.d.ts +0 -3
  17. package/dist/cli.d.ts.map +0 -1
  18. package/dist/cli.js +0 -25
  19. package/dist/cli.js.map +0 -1
  20. package/dist/templates/app/components/AcceptInviteClient.tsx +0 -10
  21. package/dist/templates/app/components/AdminDashboardClient.tsx +0 -10
  22. package/dist/templates/app/components/AdminTeamClient.tsx +0 -10
  23. package/dist/templates/app/components/AdminTeamsClient.tsx +0 -10
  24. package/dist/templates/app/components/AdminUsersClient.tsx +0 -10
  25. package/dist/templates/app/components/ApiKeysClient.tsx +0 -10
  26. package/dist/templates/app/components/AutomationsClient.tsx +0 -10
  27. package/dist/templates/app/components/ChatClient.tsx +0 -13
  28. package/dist/templates/app/components/DocumentsClient.tsx +0 -10
  29. package/dist/templates/app/components/OAuthConsentClient.tsx +0 -10
  30. package/dist/templates/app/components/PricingClient.tsx +0 -10
  31. package/dist/templates/app/components/TeamSettingsClient.tsx +0 -10
  32. package/dist/templates/app/components/VerifyEmailClient.tsx +0 -10
  33. package/dist/templates/app/routes/admin._index.tsx +0 -57
  34. package/dist/templates/app/routes/admin.teams.$teamId.tsx +0 -57
  35. package/dist/templates/app/routes/admin.teams._index.tsx +0 -57
  36. package/dist/templates/app/routes/admin.users.tsx +0 -57
  37. package/dist/templates/app/routes/api-keys.tsx +0 -57
  38. package/dist/templates/app/routes/automations.tsx +0 -57
  39. package/dist/templates/app/routes/documents.tsx +0 -57
  40. package/dist/templates/app/routes/team.$teamId.settings.tsx +0 -57
  41. package/dist/templates/app/routes/thread.$threadId.tsx +0 -102
  42. package/dist/templates/docs/admin.md +0 -257
  43. package/dist/templates/docs/api-keys.md +0 -403
  44. package/dist/templates/docs/authentication.md +0 -247
  45. package/dist/templates/docs/configuration.md +0 -1212
  46. package/dist/templates/docs/custom-pages.md +0 -466
  47. package/dist/templates/docs/deployment.md +0 -362
  48. package/dist/templates/docs/development.md +0 -411
  49. package/dist/templates/docs/documents.md +0 -293
  50. package/dist/templates/docs/extensions.md +0 -639
  51. package/dist/templates/docs/index.md +0 -139
  52. package/dist/templates/docs/installation.md +0 -286
  53. package/dist/templates/docs/mcp.md +0 -952
  54. package/dist/templates/docs/native-tools.md +0 -688
  55. package/dist/templates/docs/queue.md +0 -514
  56. package/dist/templates/docs/scheduled-prompts.md +0 -279
  57. package/dist/templates/docs/settings.md +0 -415
  58. package/dist/templates/docs/slack.md +0 -318
  59. package/dist/templates/docs/styling.md +0 -288
  60. package/dist/templates/index.html +0 -16
  61. package/dist/templates/prisma/schema.prisma +0 -271
  62. package/dist/templates/src/main.tsx +0 -8
@@ -1,271 +0,0 @@
1
- generator client {
2
- provider = "prisma-client-js"
3
- }
4
-
5
- datasource db {
6
- provider = "postgresql"
7
- url = env("DATABASE_URL")
8
- }
9
-
10
- model User {
11
- id String @id @default(cuid())
12
- email String @unique
13
- passwordHash String?
14
- name String?
15
- avatarUrl String?
16
-
17
- // Auth
18
- emailVerified Boolean @default(false)
19
- oauthProvider String?
20
- oauthId String?
21
-
22
- // Admin flag
23
- isAdmin Boolean @default(false)
24
-
25
- // Subscription
26
- plan String @default("free")
27
- stripeCustomerId String? @unique
28
- credits Int @default(0)
29
- messagesThisMonth Int @default(0)
30
-
31
- // User settings/context (JSON)
32
- settings Json @default("{}")
33
- themePreference String?
34
-
35
- // Relations
36
- threads Thread[]
37
- projects Project[]
38
- teamMemberships TeamMember[]
39
- feedback MessageFeedback[]
40
- templates PromptTemplate[]
41
- magicLinks MagicLink[]
42
- mcpCredentials MCPCredential[]
43
-
44
- createdAt DateTime @default(now())
45
- updatedAt DateTime @updatedAt
46
-
47
- @@index([email])
48
- @@index([stripeCustomerId])
49
- }
50
-
51
- model Thread {
52
- id String @id @default(cuid())
53
- title String @default("New Chat")
54
- userId String?
55
- user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
56
-
57
- // Agent used for this thread (null = default agent)
58
- agentId String?
59
-
60
- // For team threads
61
- teamId String?
62
- team Team? @relation(fields: [teamId], references: [id], onDelete: SetNull)
63
-
64
- // For project threads
65
- projectId String?
66
- project Project? @relation(fields: [projectId], references: [id], onDelete: SetNull)
67
-
68
- // Branching support
69
- parentThreadId String?
70
- parentMessageId String?
71
- parentThread Thread? @relation("ThreadBranches", fields: [parentThreadId], references: [id], onDelete: SetNull)
72
- branches Thread[] @relation("ThreadBranches")
73
-
74
- // Archived threads (hidden but preserved)
75
- archivedAt DateTime?
76
-
77
- // Relations
78
- messages Message[]
79
- sharedLinks SharedThread[]
80
-
81
- createdAt DateTime @default(now())
82
- updatedAt DateTime @updatedAt
83
-
84
- @@index([userId])
85
- @@index([teamId])
86
- @@index([projectId])
87
- @@index([parentThreadId])
88
- @@index([agentId])
89
- }
90
-
91
- model Message {
92
- id String @id @default(cuid())
93
- threadId String
94
- thread Thread @relation(fields: [threadId], references: [id], onDelete: Cascade)
95
- role String // 'user' | 'assistant' | 'system'
96
- content String
97
-
98
- // File attachments (JSON array)
99
- files Json?
100
-
101
- // Tool calls and results (JSON)
102
- toolCalls Json?
103
- toolResults Json?
104
-
105
- // Token usage
106
- inputTokens Int?
107
- outputTokens Int?
108
-
109
- // Relations
110
- feedback MessageFeedback[]
111
-
112
- createdAt DateTime @default(now())
113
-
114
- @@index([threadId])
115
- @@index([createdAt])
116
- }
117
-
118
- model MessageFeedback {
119
- id String @id @default(cuid())
120
- messageId String
121
- message Message @relation(fields: [messageId], references: [id], onDelete: Cascade)
122
- userId String
123
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
124
- type String // 'up' | 'down'
125
- comment String?
126
- createdAt DateTime @default(now())
127
-
128
- @@unique([messageId, userId])
129
- @@index([messageId])
130
- }
131
-
132
- model SharedThread {
133
- id String @id @default(cuid())
134
- shareId String @unique @default(cuid())
135
- threadId String
136
- thread Thread @relation(fields: [threadId], references: [id], onDelete: Cascade)
137
- expiresAt DateTime?
138
- createdAt DateTime @default(now())
139
-
140
- @@index([shareId])
141
- @@index([threadId])
142
- }
143
-
144
- model PromptTemplate {
145
- id String @id @default(cuid())
146
- userId String
147
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
148
- name String
149
- prompt String
150
- variables Json @default("[]")
151
- createdAt DateTime @default(now())
152
- updatedAt DateTime @updatedAt
153
-
154
- @@index([userId])
155
- }
156
-
157
- model MagicLink {
158
- id String @id @default(cuid())
159
- token String @unique
160
- userId String
161
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
162
- expiresAt DateTime
163
- usedAt DateTime?
164
- createdAt DateTime @default(now())
165
-
166
- @@index([token])
167
- @@index([userId])
168
- }
169
-
170
- model PasswordReset {
171
- id String @id @default(cuid())
172
- token String @unique
173
- email String
174
- expiresAt DateTime
175
- usedAt DateTime?
176
- createdAt DateTime @default(now())
177
-
178
- @@index([token])
179
- @@index([email])
180
- }
181
-
182
- // Projects - organizational folders for threads with AI context
183
- model Project {
184
- id String @id @default(cuid())
185
- name String
186
- context String? // AI context for project threads
187
- color String // hex color from preset list
188
- sharing String @default("private") // 'private' | 'team'
189
- userId String // creator
190
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
191
- teamId String? // optional team association
192
- team Team? @relation(fields: [teamId], references: [id], onDelete: Cascade)
193
- threads Thread[]
194
- archivedAt DateTime? // null = active, set = archived
195
- createdAt DateTime @default(now())
196
- updatedAt DateTime @updatedAt
197
-
198
- @@index([userId])
199
- @@index([teamId])
200
- }
201
-
202
- // Team workspaces
203
- model Team {
204
- id String @id @default(cuid())
205
- name String
206
- context String? // Additional context passed to AI agent for team threads
207
- archivedAt DateTime? // null = active, set = archived
208
-
209
- // Billing fields
210
- plan String @default("free")
211
- stripeCustomerId String? @unique
212
- credits Int @default(0)
213
- messagesThisMonth Int @default(0)
214
-
215
- members TeamMember[]
216
- threads Thread[]
217
- projects Project[]
218
- invites TeamInvite[]
219
- createdAt DateTime @default(now())
220
- updatedAt DateTime @updatedAt
221
-
222
- @@index([stripeCustomerId])
223
- }
224
-
225
- model TeamMember {
226
- id String @id @default(cuid())
227
- teamId String
228
- team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)
229
- userId String
230
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
231
- role String // 'owner' | 'admin' | 'member' | 'viewer'
232
-
233
- createdAt DateTime @default(now())
234
-
235
- @@unique([teamId, userId])
236
- @@index([teamId])
237
- @@index([userId])
238
- }
239
-
240
- model TeamInvite {
241
- id String @id @default(cuid())
242
- teamId String
243
- team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)
244
- email String
245
- role String // 'admin' | 'member' | 'viewer'
246
- token String @unique
247
- invitedBy String
248
- expiresAt DateTime
249
- acceptedAt DateTime?
250
- createdAt DateTime @default(now())
251
-
252
- @@unique([teamId, email])
253
- @@index([token])
254
- }
255
-
256
- // MCP Server Credentials
257
- model MCPCredential {
258
- id String @id @default(cuid())
259
- userId String
260
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
261
- serverId String
262
- credentialType String // 'api_key' | 'oauth'
263
- encryptedData String // Encrypted JSON: {apiKey} or {accessToken, refreshToken, expiresAt}
264
- oauthState String? // Temporary state during OAuth flow
265
- codeVerifier String? // PKCE verifier (encrypted)
266
- createdAt DateTime @default(now())
267
- updatedAt DateTime @updatedAt
268
-
269
- @@unique([userId, serverId])
270
- @@index([userId])
271
- }
@@ -1,8 +0,0 @@
1
- import { renderApp } from '@chaaskit/client';
2
- import '@chaaskit/client/styles';
3
- import { config } from '../config/app.config';
4
-
5
- // Render the ChaasKit application
6
- renderApp(document.getElementById('root'), {
7
- basePath: config.app.basePath,
8
- });