captify 0.1.17 → 0.1.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.
- package/README.md +283 -613
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,759 +1,429 @@
|
|
|
1
|
-
#
|
|
1
|
+
# captify-core
|
|
2
2
|
|
|
3
|
-
A comprehensive shared library providing reusable UI/UX components, utilities, hooks, and services for Captify applications. Built with Next.js
|
|
3
|
+
A comprehensive shared library providing reusable UI/UX components, utilities, hooks, and services for Captify applications. Built with Next.js 16, React 19, TypeScript, and Tailwind CSS using shadcn/ui components.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- 🎭 **Dark Mode** - Theme support with next-themes
|
|
7
|
+
- **Modern UI Components** - Built on shadcn/ui with Radix UI primitives
|
|
8
|
+
- **Authentication** - NextAuth.js 5 integration with AWS Cognito
|
|
9
|
+
- **AI/Chat Integration** - AI SDK with multi-provider support (Bedrock, Anthropic, OpenAI)
|
|
10
|
+
- **Feature-Based Architecture** - Modular, domain-driven organization
|
|
11
|
+
- **Type-Safe** - Full TypeScript support with Zod validation
|
|
12
|
+
- **Real-time Collaboration** - Yjs integration for collaborative editing
|
|
13
|
+
- **Dark Mode** - Theme support with next-themes
|
|
15
14
|
|
|
16
15
|
## Table of Contents
|
|
17
16
|
|
|
18
17
|
- [Installation](#installation)
|
|
19
18
|
- [Quick Start](#quick-start)
|
|
20
|
-
- [
|
|
21
|
-
- [
|
|
19
|
+
- [Architecture](#architecture)
|
|
20
|
+
- [Module Reference](#module-reference)
|
|
21
|
+
- [Import Patterns](#import-patterns)
|
|
22
22
|
- [Development](#development)
|
|
23
|
-
- [Testing the Library](#testing-the-library)
|
|
24
|
-
- [Available Components](#available-components)
|
|
25
|
-
- [Module Exports](#module-exports)
|
|
26
|
-
- [Usage Examples](#usage-examples)
|
|
27
23
|
- [Scripts](#scripts)
|
|
28
|
-
- [Changelog](#changelog)
|
|
29
24
|
- [Contributing](#contributing)
|
|
30
25
|
|
|
31
26
|
## Installation
|
|
32
27
|
|
|
33
|
-
Install
|
|
28
|
+
This is a private package. Install via npm link or file reference:
|
|
34
29
|
|
|
35
30
|
```bash
|
|
36
|
-
npm install @captify
|
|
31
|
+
npm install captify@file:../captify-core
|
|
37
32
|
```
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
pnpm add @captify/captify-core
|
|
43
|
-
```
|
|
34
|
+
### Peer Dependencies
|
|
44
35
|
|
|
45
|
-
|
|
36
|
+
Ensure your project has these peer dependencies:
|
|
46
37
|
|
|
47
38
|
```bash
|
|
48
|
-
|
|
39
|
+
npm install next@^16.0.0 react@^19.0.0 react-dom@^19.0.0
|
|
49
40
|
```
|
|
50
41
|
|
|
51
|
-
###
|
|
42
|
+
### Requirements
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
- Node.js >= 20.0.0
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
npm install @captify/captify-core@file:../captify-core
|
|
57
|
-
```
|
|
46
|
+
## Quick Start
|
|
58
47
|
|
|
59
|
-
###
|
|
48
|
+
### Importing from Feature Modules
|
|
60
49
|
|
|
61
|
-
|
|
50
|
+
The library uses a feature-based module structure. Import from specific module paths:
|
|
62
51
|
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
```typescript
|
|
53
|
+
// Shell components (layouts, toolbars, sidebar)
|
|
54
|
+
import { ConsoleLayout } from 'captify/shell/components';
|
|
55
|
+
import { ThemeProvider } from 'captify/shell/theme-provider';
|
|
66
56
|
|
|
67
|
-
|
|
57
|
+
// Authentication
|
|
58
|
+
import { auth, signIn, signOut } from 'captify/auth';
|
|
59
|
+
import { AuthSessionProvider } from 'captify/auth/components';
|
|
68
60
|
|
|
69
|
-
|
|
61
|
+
// Chat components and services
|
|
62
|
+
import { ChatInterface, ChatMessages } from 'captify/chat/components';
|
|
63
|
+
import { useChatSession } from 'captify/chat/hooks';
|
|
64
|
+
import { ChatService } from 'captify/chat/services';
|
|
70
65
|
|
|
71
|
-
|
|
66
|
+
// Shared utilities and components
|
|
67
|
+
import { cn } from 'captify/shared/utilities/cn';
|
|
68
|
+
import { Button, Card, Dialog } from 'captify/shared/components';
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
import {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
import {
|
|
79
|
-
import { CognitoAdminService } from "@captify/captify-core/services";
|
|
80
|
-
import { acceptTermsAndConditions } from "@captify/captify-core/actions";
|
|
81
|
-
|
|
82
|
-
// ✅ Import from granular paths for tree-shaking (NEW in v0.3.0)
|
|
83
|
-
import { AppLauncher } from "@captify/captify-core/components/app-launcher";
|
|
84
|
-
import { useMobile } from "@captify/captify-core/hooks/use-mobile";
|
|
85
|
-
import { cn } from "@captify/captify-core/utils/cn";
|
|
86
|
-
import { CognitoAdminService } from "@captify/captify-core/services/cognito/services";
|
|
87
|
-
|
|
88
|
-
// ❌ Main entry point no longer exports everything (v0.2.0+)
|
|
89
|
-
// import { ConsoleLayout, Button } from "@captify/captify-core"; // This won't work
|
|
70
|
+
// File management
|
|
71
|
+
import { FileUploader } from 'captify/files/components';
|
|
72
|
+
import { useFileUpload } from 'captify/files/hooks';
|
|
73
|
+
|
|
74
|
+
// User management
|
|
75
|
+
import { UserProfile } from 'captify/users/components';
|
|
90
76
|
```
|
|
91
77
|
|
|
92
|
-
### Basic Setup
|
|
78
|
+
### Basic Layout Setup
|
|
93
79
|
|
|
94
80
|
```tsx
|
|
95
|
-
import { ConsoleLayout } from
|
|
96
|
-
import {
|
|
81
|
+
import { ConsoleLayout } from 'captify/shell/components';
|
|
82
|
+
import { ThemeProvider } from 'captify/shell/theme-provider';
|
|
83
|
+
import { AuthSessionProvider } from 'captify/auth/components';
|
|
97
84
|
|
|
98
|
-
export default function
|
|
85
|
+
export default function RootLayout({ children }) {
|
|
99
86
|
return (
|
|
100
|
-
<
|
|
101
|
-
<
|
|
102
|
-
|
|
87
|
+
<AuthSessionProvider>
|
|
88
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
89
|
+
<ConsoleLayout appName="My Application">
|
|
90
|
+
{children}
|
|
91
|
+
</ConsoleLayout>
|
|
92
|
+
</ThemeProvider>
|
|
93
|
+
</AuthSessionProvider>
|
|
103
94
|
);
|
|
104
95
|
}
|
|
105
96
|
```
|
|
106
97
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
### Migrating from v0.1.x to v0.2.0
|
|
98
|
+
## Architecture
|
|
110
99
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
#### Step 1: Update Your Imports
|
|
114
|
-
|
|
115
|
-
Search your codebase for imports from `@captify/captify-core` and update them:
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
// ❌ OLD (v0.1.x) - Will not work in v0.2.0+
|
|
119
|
-
import {
|
|
120
|
-
Button,
|
|
121
|
-
ConsoleLayout,
|
|
122
|
-
useBookmarkContext,
|
|
123
|
-
cn
|
|
124
|
-
} from "@captify/captify-core";
|
|
125
|
-
|
|
126
|
-
// ✅ NEW (v0.2.0+) - Use specific module paths
|
|
127
|
-
import { Button, ConsoleLayout } from "@captify/captify-core/components";
|
|
128
|
-
import { useBookmarkContext } from "@captify/captify-core/hooks";
|
|
129
|
-
import { cn } from "@captify/captify-core/utils";
|
|
130
|
-
```
|
|
100
|
+
### Feature-Based Module Structure
|
|
131
101
|
|
|
132
|
-
|
|
102
|
+
The `lib/` directory uses a domain-driven, feature-based organization. Each feature module contains:
|
|
133
103
|
|
|
134
|
-
**Components:**
|
|
135
|
-
```typescript
|
|
136
|
-
// Before
|
|
137
|
-
import { Button, TopToolbar } from "@captify/captify-core";
|
|
138
|
-
// After
|
|
139
|
-
import { Button, TopToolbar } from "@captify/captify-core/components";
|
|
140
104
|
```
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
105
|
+
lib/<feature>/
|
|
106
|
+
├── <feature>.interfaces.ts # TypeScript interfaces
|
|
107
|
+
├── <feature>.schemas.ts # Zod validation schemas
|
|
108
|
+
├── <feature>.constants.ts # Constants and configuration
|
|
109
|
+
├── <feature>.utilities.ts # Helper functions
|
|
110
|
+
├── <feature>.errors.ts # Error classes
|
|
111
|
+
├── api/ # API client and route handlers
|
|
112
|
+
├── components/ # React components
|
|
113
|
+
├── context/ # React context providers
|
|
114
|
+
├── hooks/ # Custom React hooks
|
|
115
|
+
└── services/ # Business logic and integrations
|
|
148
116
|
```
|
|
149
117
|
|
|
150
|
-
|
|
151
|
-
```typescript
|
|
152
|
-
// Before
|
|
153
|
-
import { CognitoAdminService } from "@captify/captify-core";
|
|
154
|
-
// After
|
|
155
|
-
import { CognitoAdminService } from "@captify/captify-core/services";
|
|
156
|
-
```
|
|
118
|
+
### Core Feature Modules
|
|
157
119
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
120
|
+
| Module | Description |
|
|
121
|
+
|--------|-------------|
|
|
122
|
+
| `agents/` | AI agent components, interfaces, and chat functionality |
|
|
123
|
+
| `auth/` | NextAuth.js 5 + AWS Cognito authentication |
|
|
124
|
+
| `bookmarks/` | Bookmark management for services and resources |
|
|
125
|
+
| `breadcrumb/` | Navigation breadcrumb components |
|
|
126
|
+
| `chat/` | Chat interface, messaging, and AI conversation |
|
|
127
|
+
| `feedback/` | User feedback collection and management |
|
|
128
|
+
| `files/` | File management, upload, and S3 integration |
|
|
129
|
+
| `groups/` | User group management |
|
|
130
|
+
| `llm-providers/` | LLM provider configuration (Bedrock, Anthropic, OpenAI) |
|
|
131
|
+
| `ontology/` | Ontology/knowledge graph support |
|
|
132
|
+
| `shared/` | Shared utilities, UI components, providers |
|
|
133
|
+
| `shell/` | Application shell (layouts, toolbar, sidebar, theme) |
|
|
134
|
+
| `tables/` | Data table components and utilities |
|
|
135
|
+
| `users/` | User management and profiles |
|
|
165
136
|
|
|
166
|
-
|
|
137
|
+
## Module Reference
|
|
167
138
|
|
|
168
|
-
|
|
139
|
+
### Shell Module
|
|
169
140
|
|
|
170
|
-
|
|
171
|
-
npm run build
|
|
172
|
-
# or
|
|
173
|
-
pnpm build
|
|
174
|
-
# or
|
|
175
|
-
yarn build
|
|
176
|
-
```
|
|
141
|
+
Application shell components for layout and navigation:
|
|
177
142
|
|
|
178
|
-
|
|
143
|
+
```typescript
|
|
144
|
+
// Components
|
|
145
|
+
import {
|
|
146
|
+
ConsoleLayout,
|
|
147
|
+
AppLauncher,
|
|
148
|
+
AppSidebar,
|
|
149
|
+
TopToolbar
|
|
150
|
+
} from 'captify/shell/components';
|
|
179
151
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
- ✅ Enable better tree-shaking and smaller bundle sizes
|
|
183
|
-
- ✅ Make dependencies more explicit and easier to understand
|
|
184
|
-
- ✅ Improve IDE autocomplete and IntelliSense
|
|
152
|
+
// Theme
|
|
153
|
+
import { ThemeProvider } from 'captify/shell/theme-provider';
|
|
185
154
|
|
|
186
|
-
|
|
155
|
+
// Hooks
|
|
156
|
+
import { useSidebar } from 'captify/shell/hooks';
|
|
187
157
|
|
|
158
|
+
// Types
|
|
159
|
+
import type { MenuItem, ServiceItem } from 'captify/shell/shell.interfaces';
|
|
188
160
|
```
|
|
189
|
-
captify-core/
|
|
190
|
-
├── app/ # Next.js app directory (for testing only)
|
|
191
|
-
│ ├── (authenticated)/ # Protected routes (dashboard, profile)
|
|
192
|
-
│ └── (unauthenticated)/ # Public routes (terms, login)
|
|
193
|
-
├── lib/ # Library source code
|
|
194
|
-
│ ├── components/ # UI components
|
|
195
|
-
│ │ ├── ui/ # shadcn/ui components
|
|
196
|
-
│ │ ├── layouts/ # Layout components
|
|
197
|
-
│ │ ├── toolbars/ # Toolbar components
|
|
198
|
-
│ │ └── ...
|
|
199
|
-
│ ├── context/ # React Context providers
|
|
200
|
-
│ ├── hooks/ # Custom React hooks
|
|
201
|
-
│ ├── utils/ # Utility functions
|
|
202
|
-
│ ├── types/ # TypeScript types
|
|
203
|
-
│ ├── interfaces/ # TypeScript interfaces
|
|
204
|
-
│ ├── constants/ # Constants
|
|
205
|
-
│ ├── config/ # Configuration
|
|
206
|
-
│ ├── services/ # Service modules
|
|
207
|
-
│ ├── actions/ # Server actions
|
|
208
|
-
│ └── auth/ # Authentication config
|
|
209
|
-
├── stories/ # Storybook stories
|
|
210
|
-
├── tests/ # Playwright tests
|
|
211
|
-
└── dist/ # Build output (generated)
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## Development
|
|
215
161
|
|
|
216
|
-
###
|
|
217
|
-
|
|
218
|
-
- Node.js 18+
|
|
219
|
-
- npm/pnpm/yarn
|
|
220
|
-
|
|
221
|
-
### Setup
|
|
162
|
+
### Auth Module
|
|
222
163
|
|
|
223
|
-
|
|
224
|
-
2. Install dependencies:
|
|
164
|
+
Authentication with NextAuth.js 5 and AWS Cognito:
|
|
225
165
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
3. Copy the environment template:
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
cp .env.example .env
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
4. Configure your environment variables (see `.env.example`)
|
|
237
|
-
|
|
238
|
-
### Available Scripts
|
|
166
|
+
```typescript
|
|
167
|
+
// Core auth
|
|
168
|
+
import { auth, signIn, signOut } from 'captify/auth';
|
|
239
169
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
npm run dev # Start Next.js dev server with Turbopack
|
|
243
|
-
npm run storybook # Start Storybook on port 6006
|
|
170
|
+
// Components
|
|
171
|
+
import { AuthSessionProvider, LoginButton } from 'captify/auth/components';
|
|
244
172
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
npm run build:next # Build Next.js app
|
|
248
|
-
npm run type-check # TypeScript check without emit
|
|
249
|
-
npm run validate # Run lint + type-check
|
|
173
|
+
// Hooks
|
|
174
|
+
import { useSession } from 'captify/auth/hooks';
|
|
250
175
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
npm run lint:fix # ESLint with auto-fix
|
|
254
|
-
npm run prettify # Check Prettier formatting
|
|
255
|
-
npm run prettify:fix # Auto-format with Prettier
|
|
176
|
+
// Services
|
|
177
|
+
import { CognitoService } from 'captify/auth/services';
|
|
256
178
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
npm run test:ui # Playwright UI mode
|
|
260
|
-
npm run test:headed # Playwright headed mode
|
|
261
|
-
npm run test:debug # Playwright debug mode
|
|
179
|
+
// Actions
|
|
180
|
+
import { signOutAction } from 'captify/auth/actions';
|
|
262
181
|
```
|
|
263
182
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
The `app/` directory contains a test application to demonstrate and test library components:
|
|
267
|
-
|
|
268
|
-
### Running the Test App
|
|
269
|
-
|
|
270
|
-
1. Set up your environment variables in `.env` (see `.env.example`)
|
|
271
|
-
2. Start the development server:
|
|
272
|
-
```bash
|
|
273
|
-
npm run dev
|
|
274
|
-
```
|
|
275
|
-
3. Open [http://localhost:3000](http://localhost:3000)
|
|
276
|
-
|
|
277
|
-
### Test Pages
|
|
183
|
+
### Chat Module
|
|
278
184
|
|
|
279
|
-
-
|
|
280
|
-
- **Profile** (`/profile`) - User profile page (requires auth)
|
|
185
|
+
AI-powered chat interface with multi-provider support:
|
|
281
186
|
|
|
282
|
-
|
|
187
|
+
```typescript
|
|
188
|
+
// Components
|
|
189
|
+
import {
|
|
190
|
+
ChatInterface,
|
|
191
|
+
ChatMessages,
|
|
192
|
+
ChatInput,
|
|
193
|
+
ChatHistory,
|
|
194
|
+
ChatModelSelector
|
|
195
|
+
} from 'captify/chat/components';
|
|
283
196
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
- Protected routes with middleware
|
|
287
|
-
- Layout components (ConsoleLayout, AppSidebar, TopToolbar)
|
|
288
|
-
- Theme switching
|
|
197
|
+
// Hooks
|
|
198
|
+
import { useChatSession, useChat } from 'captify/chat/hooks';
|
|
289
199
|
|
|
290
|
-
|
|
200
|
+
// Context
|
|
201
|
+
import { ChatProvider, useChatContext } from 'captify/chat/context';
|
|
291
202
|
|
|
292
|
-
|
|
203
|
+
// Services
|
|
204
|
+
import { ChatService } from 'captify/chat/services';
|
|
293
205
|
|
|
294
|
-
|
|
295
|
-
|
|
206
|
+
// Types
|
|
207
|
+
import type { ChatMessage, ChatSession } from 'captify/chat/chat.interfaces';
|
|
208
|
+
import { chatMessageSchema } from 'captify/chat/chat.schemas';
|
|
296
209
|
```
|
|
297
210
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
## Available Components
|
|
301
|
-
|
|
302
|
-
### Layout Components
|
|
303
|
-
|
|
304
|
-
- **ConsoleLayout** - Main application layout wrapper
|
|
305
|
-
- **AppHeader** - Application header
|
|
306
|
-
- **AppSidebar** - Collapsible sidebar with navigation
|
|
307
|
-
- **AppServicesBar** - Quick access services bar
|
|
308
|
-
- **TopToolbar** - Top toolbar with search, notifications, profile
|
|
309
|
-
|
|
310
|
-
### UI Components (shadcn/ui)
|
|
311
|
-
|
|
312
|
-
- **Avatar** - User avatar display
|
|
313
|
-
- **Badge** - Status and notification badges
|
|
314
|
-
- **Button** - Various button variants
|
|
315
|
-
- **Card** - Content cards
|
|
316
|
-
- **Checkbox** - Form checkbox input
|
|
317
|
-
- **Dialog** - Modal dialogs
|
|
318
|
-
- **Dropdown Menu** - Context menus
|
|
319
|
-
- **Input** - Text input fields
|
|
320
|
-
- **Separator** - Visual dividers
|
|
321
|
-
- **Sheet** - Slide-out panels
|
|
322
|
-
- **Skeleton** - Loading placeholders
|
|
323
|
-
- **Table** - Data tables
|
|
324
|
-
- **Tooltip** - Hover tooltips
|
|
211
|
+
### Files Module
|
|
325
212
|
|
|
326
|
-
|
|
213
|
+
File management with S3 integration:
|
|
327
214
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
- **TermsAndConditionsModal** - Terms acceptance modal
|
|
332
|
-
- **GenericNotFoundUI** - 404 error page
|
|
333
|
-
|
|
334
|
-
### Context Providers
|
|
335
|
-
|
|
336
|
-
- **BookmarkProvider** - Bookmark management
|
|
337
|
-
- **ThemeProvider** - Dark/light theme switching
|
|
338
|
-
|
|
339
|
-
### Hooks
|
|
340
|
-
|
|
341
|
-
- **useBookmarkContext** - Access bookmark state
|
|
342
|
-
- **useIsMobile** - Responsive breakpoint detection
|
|
343
|
-
|
|
344
|
-
### Services
|
|
215
|
+
```typescript
|
|
216
|
+
// Components
|
|
217
|
+
import { FileUploader, FileList, FileViewer } from 'captify/files/components';
|
|
345
218
|
|
|
346
|
-
|
|
219
|
+
// Hooks
|
|
220
|
+
import { useFileUpload, useFiles } from 'captify/files/hooks';
|
|
347
221
|
|
|
348
|
-
|
|
222
|
+
// Services
|
|
223
|
+
import { FileService, S3Service } from 'captify/files/services';
|
|
349
224
|
|
|
350
|
-
|
|
225
|
+
// Types
|
|
226
|
+
import type { FileMetadata } from 'captify/files/files.interfaces';
|
|
227
|
+
```
|
|
351
228
|
|
|
352
|
-
|
|
353
|
-
import { ConsoleLayout } from "@captify/captify-core/components";
|
|
354
|
-
import { MenuItem } from "@captify/captify-core/types";
|
|
229
|
+
### Shared Module
|
|
355
230
|
|
|
356
|
-
|
|
357
|
-
{ title: "Dashboard", url: "/dashboard", icon: "Home" },
|
|
358
|
-
{ title: "Settings", url: "/settings", icon: "Settings" },
|
|
359
|
-
];
|
|
231
|
+
Common utilities, UI components, and providers:
|
|
360
232
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
233
|
+
```typescript
|
|
234
|
+
// UI Components (shadcn/ui)
|
|
235
|
+
import {
|
|
236
|
+
Button,
|
|
237
|
+
Card,
|
|
238
|
+
Dialog,
|
|
239
|
+
Input,
|
|
240
|
+
Select,
|
|
241
|
+
Tabs,
|
|
242
|
+
Toast,
|
|
243
|
+
Tooltip
|
|
244
|
+
} from 'captify/shared/components';
|
|
245
|
+
|
|
246
|
+
// Utilities
|
|
247
|
+
import { cn } from 'captify/shared/utilities/cn';
|
|
248
|
+
import { formatDate } from 'captify/shared/utilities/date-utilities';
|
|
249
|
+
import { invariant } from 'captify/shared/utilities/invariant';
|
|
250
|
+
|
|
251
|
+
// Providers
|
|
252
|
+
import { QueryProvider } from 'captify/shared/providers';
|
|
253
|
+
|
|
254
|
+
// Hooks
|
|
255
|
+
import { useMobile, useDebounce } from 'captify/shared/hooks';
|
|
368
256
|
```
|
|
369
257
|
|
|
370
|
-
###
|
|
258
|
+
### LLM Providers Module
|
|
371
259
|
|
|
372
|
-
|
|
373
|
-
import { useBookmarkContext } from '@captify/captify-core/hooks';
|
|
374
|
-
|
|
375
|
-
function MyComponent() {
|
|
376
|
-
const {
|
|
377
|
-
bookmarkedServices,
|
|
378
|
-
addBookmark,
|
|
379
|
-
removeBookmark
|
|
380
|
-
} = useBookmarkContext();
|
|
381
|
-
|
|
382
|
-
const handleBookmark = (service: ServiceItem) => {
|
|
383
|
-
if (bookmarkedServices.find(s => s.id === service.id)) {
|
|
384
|
-
removeBookmark(service.id);
|
|
385
|
-
} else {
|
|
386
|
-
addBookmark(service);
|
|
387
|
-
}
|
|
388
|
-
};
|
|
260
|
+
Multi-provider LLM configuration:
|
|
389
261
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
```
|
|
262
|
+
```typescript
|
|
263
|
+
// Components
|
|
264
|
+
import { ModelSelector, ProviderConfig } from 'captify/llm-providers/components';
|
|
395
265
|
|
|
396
|
-
|
|
266
|
+
// Hooks
|
|
267
|
+
import { useModelSelection } from 'captify/llm-providers/hooks';
|
|
397
268
|
|
|
398
|
-
|
|
399
|
-
import {
|
|
269
|
+
// Services
|
|
270
|
+
import { LLMProviderService } from 'captify/llm-providers/services';
|
|
400
271
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
<div className={cn("base-styles", condition && "conditional-styles", className)}>Content</div>
|
|
404
|
-
);
|
|
405
|
-
}
|
|
272
|
+
// Types
|
|
273
|
+
import type { LLMProvider, ModelConfig } from 'captify/llm-providers/llm-providers.interfaces';
|
|
406
274
|
```
|
|
407
275
|
|
|
408
|
-
##
|
|
276
|
+
## Import Patterns
|
|
409
277
|
|
|
410
|
-
|
|
278
|
+
### Module-Level Imports (Recommended)
|
|
411
279
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
### Available Module Paths
|
|
415
|
-
|
|
416
|
-
#### Category-Level Exports (v0.2.0+)
|
|
280
|
+
Import from the module's category exports:
|
|
417
281
|
|
|
418
282
|
```typescript
|
|
419
|
-
|
|
420
|
-
import {
|
|
283
|
+
import { ChatInterface } from 'captify/chat/components';
|
|
284
|
+
import { useChat } from 'captify/chat/hooks';
|
|
285
|
+
import { ChatService } from 'captify/chat/services';
|
|
286
|
+
```
|
|
421
287
|
|
|
422
|
-
|
|
423
|
-
import { useBookmarkContext, useMobile } from '@captify/captify-core/hooks';
|
|
288
|
+
### Granular Imports
|
|
424
289
|
|
|
425
|
-
|
|
426
|
-
import { cn, formatDate } from '@captify/captify-core/utils';
|
|
290
|
+
For maximum tree-shaking, import from specific files:
|
|
427
291
|
|
|
428
|
-
|
|
429
|
-
import {
|
|
292
|
+
```typescript
|
|
293
|
+
import { cn } from 'captify/shared/utilities/cn';
|
|
294
|
+
import { formatDate } from 'captify/shared/utilities/date-utilities';
|
|
295
|
+
import { invariant } from 'captify/shared/utilities/invariant';
|
|
296
|
+
```
|
|
430
297
|
|
|
431
|
-
|
|
432
|
-
import { NotificationProps, LayoutProps } from '@captify/captify-core/interfaces';
|
|
298
|
+
### Type Imports
|
|
433
299
|
|
|
434
|
-
|
|
435
|
-
import { CognitoAdminService, DynamoDBService, S3Service } from '@captify/captify-core/services';
|
|
300
|
+
Import interfaces and schemas directly:
|
|
436
301
|
|
|
437
|
-
|
|
438
|
-
import {
|
|
302
|
+
```typescript
|
|
303
|
+
import type { ChatMessage } from 'captify/chat/chat.interfaces';
|
|
304
|
+
import { chatMessageSchema } from 'captify/chat/chat.schemas';
|
|
305
|
+
import { CHAT_CONSTANTS } from 'captify/chat/chat.constants';
|
|
306
|
+
```
|
|
439
307
|
|
|
440
|
-
|
|
441
|
-
import { auth, signIn, signOut } from '@captify/captify-core/auth';
|
|
308
|
+
## Development
|
|
442
309
|
|
|
443
|
-
|
|
444
|
-
import { BookmarkProvider, ThemeProvider } from '@captify/captify-core/context';
|
|
310
|
+
### Prerequisites
|
|
445
311
|
|
|
446
|
-
|
|
447
|
-
|
|
312
|
+
- Node.js >= 20.0.0
|
|
313
|
+
- npm/pnpm/yarn
|
|
448
314
|
|
|
449
|
-
|
|
450
|
-
import { routeConfig } from '@captify/captify-core/config';
|
|
315
|
+
### Setup
|
|
451
316
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
```
|
|
317
|
+
1. Clone the repository
|
|
318
|
+
2. Install dependencies:
|
|
319
|
+
```bash
|
|
320
|
+
npm install
|
|
321
|
+
```
|
|
322
|
+
3. Copy the environment template:
|
|
323
|
+
```bash
|
|
324
|
+
cp .env.example .env
|
|
325
|
+
```
|
|
326
|
+
4. Configure your environment variables
|
|
455
327
|
|
|
456
|
-
|
|
328
|
+
### Running the Test Application
|
|
457
329
|
|
|
458
|
-
|
|
330
|
+
The `app/` directory contains a test application for developing and testing library components:
|
|
459
331
|
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
// Specific component groups
|
|
463
|
-
import { AppLauncher } from '@captify/captify-core/components/app-launcher';
|
|
464
|
-
import { BreadcrumbComponent } from '@captify/captify-core/components/breadcrumb';
|
|
465
|
-
import { ConsoleLayout } from '@captify/captify-core/components/console-layout';
|
|
466
|
-
import { ErrorBoundary } from '@captify/captify-core/components/error-boundary';
|
|
467
|
-
import { AppLayout, AppHeader, AppSidebar } from '@captify/captify-core/components/layouts';
|
|
468
|
-
import { LoadingSkeleton } from '@captify/captify-core/components/loading-skeleton';
|
|
469
|
-
import { GenericNotFoundUI } from '@captify/captify-core/components/not-found';
|
|
470
|
-
import { Notifications } from '@captify/captify-core/components/notifications';
|
|
471
|
-
import { FeaturedServiceNavItem } from '@captify/captify-core/components/services';
|
|
472
|
-
import { TermsAndConditionsModal } from '@captify/captify-core/components/terms-and-agreements';
|
|
473
|
-
import { TopToolbar, TopRightToolbar } from '@captify/captify-core/components/toolbars';
|
|
474
|
-
import { Button, Card, Dialog, Input } from '@captify/captify-core/components/ui';
|
|
475
|
-
|
|
476
|
-
// ===== HOOKS =====
|
|
477
|
-
import { useMobile } from '@captify/captify-core/hooks/use-mobile';
|
|
478
|
-
import { useNotifications } from '@captify/captify-core/hooks/use-notifications';
|
|
479
|
-
|
|
480
|
-
// ===== UTILS =====
|
|
481
|
-
import { cn } from '@captify/captify-core/utils/cn';
|
|
482
|
-
import { formatDate } from '@captify/captify-core/utils/date';
|
|
483
|
-
import { invariant } from '@captify/captify-core/utils/invariant';
|
|
484
|
-
import { capitalize } from '@captify/captify-core/utils/string';
|
|
485
|
-
|
|
486
|
-
// ===== CONTEXT =====
|
|
487
|
-
import { BookmarkProvider } from '@captify/captify-core/context/bookmark';
|
|
488
|
-
import { ThemeProvider } from '@captify/captify-core/context/theme';
|
|
489
|
-
|
|
490
|
-
// ===== ACTIONS =====
|
|
491
|
-
import { cognitoSignOut } from '@captify/captify-core/actions/auth';
|
|
492
|
-
import { acceptTermsAndConditions } from '@captify/captify-core/actions/terms-and-conditions';
|
|
493
|
-
|
|
494
|
-
// ===== AUTH =====
|
|
495
|
-
import { refreshCognitoTokens } from '@captify/captify-core/auth/refresh-token';
|
|
496
|
-
|
|
497
|
-
// ===== CONFIG =====
|
|
498
|
-
import { routeConfig } from '@captify/captify-core/config/route-config';
|
|
499
|
-
|
|
500
|
-
// ===== CONSTANTS =====
|
|
501
|
-
import { APP_LAUNCHER_CONSTANTS } from '@captify/captify-core/constants/app-launcher';
|
|
502
|
-
import { PROFILE_DROPDOWN_ITEMS } from '@captify/captify-core/constants/profile-dropdown';
|
|
503
|
-
import { TABLES } from '@captify/captify-core/constants/tables';
|
|
504
|
-
|
|
505
|
-
// ===== INTERFACES =====
|
|
506
|
-
import { AppLauncherProps } from '@captify/captify-core/interfaces/app-launcher';
|
|
507
|
-
import { BreadcrumbProps } from '@captify/captify-core/interfaces/breadcrumb';
|
|
508
|
-
import { LayoutProps } from '@captify/captify-core/interfaces/layout-props';
|
|
509
|
-
import { NavConfigProps } from '@captify/captify-core/interfaces/nav-config-props';
|
|
510
|
-
import { NotificationProps } from '@captify/captify-core/interfaces/notification-props';
|
|
511
|
-
import { RouteItem } from '@captify/captify-core/interfaces/route-item';
|
|
512
|
-
import { SearchProps } from '@captify/captify-core/interfaces/search';
|
|
513
|
-
import { ServiceItem } from '@captify/captify-core/interfaces/service';
|
|
514
|
-
import { SidebarProps } from '@captify/captify-core/interfaces/sidebar-props';
|
|
515
|
-
import { ToolbarProps } from '@captify/captify-core/interfaces/toolbar-props';
|
|
516
|
-
|
|
517
|
-
// ===== PROVIDERS =====
|
|
518
|
-
import { AuthSessionProvider } from '@captify/captify-core/providers/auth-session';
|
|
519
|
-
|
|
520
|
-
// ===== SERVICES =====
|
|
521
|
-
// Chat Service
|
|
522
|
-
import { ChatService } from '@captify/captify-core/services/chat';
|
|
523
|
-
import { CHAT_CONSTANTS } from '@captify/captify-core/services/chat/constants';
|
|
524
|
-
import { ChatError } from '@captify/captify-core/services/chat/errors';
|
|
525
|
-
import { ChatMessage } from '@captify/captify-core/services/chat/interfaces';
|
|
526
|
-
import { ChatService as ChatServiceClass } from '@captify/captify-core/services/chat/services';
|
|
527
|
-
import { validateChatMessage } from '@captify/captify-core/services/chat/utilities';
|
|
528
|
-
|
|
529
|
-
// Cognito Service
|
|
530
|
-
import { CognitoAdminService } from '@captify/captify-core/services/cognito';
|
|
531
|
-
import { COGNITO_CONSTANTS } from '@captify/captify-core/services/cognito/constants';
|
|
532
|
-
import { CognitoError } from '@captify/captify-core/services/cognito/errors';
|
|
533
|
-
import { CognitoUser } from '@captify/captify-core/services/cognito/interfaces';
|
|
534
|
-
import { CognitoAdminService as CognitoAdmin } from '@captify/captify-core/services/cognito/services';
|
|
535
|
-
|
|
536
|
-
// DynamoDB Service
|
|
537
|
-
import { DynamoDBService } from '@captify/captify-core/services/dynamodb';
|
|
538
|
-
import { DYNAMODB_CONSTANTS } from '@captify/captify-core/services/dynamodb/constants';
|
|
539
|
-
import { DynamoDBError } from '@captify/captify-core/services/dynamodb/errors';
|
|
540
|
-
import { DynamoDBConfig } from '@captify/captify-core/services/dynamodb/interfaces';
|
|
541
|
-
import { DynamoDBService as DynamoDBClient } from '@captify/captify-core/services/dynamodb/services';
|
|
542
|
-
|
|
543
|
-
// S3 Service
|
|
544
|
-
import { S3Service } from '@captify/captify-core/services/s3';
|
|
545
|
-
import { S3_CONSTANTS } from '@captify/captify-core/services/s3/constants';
|
|
546
|
-
import { S3Error } from '@captify/captify-core/services/s3/errors';
|
|
547
|
-
import { S3Config } from '@captify/captify-core/services/s3/interfaces';
|
|
548
|
-
import { S3Service as S3Client } from '@captify/captify-core/services/s3/services';
|
|
549
|
-
|
|
550
|
-
// Shared Service Utilities
|
|
551
|
-
import { BaseAwsService } from '@captify/captify-core/services/shared';
|
|
552
|
-
import { AWS_ERROR_KIND } from '@captify/captify-core/services/shared/constants';
|
|
553
|
-
import { BaseAwsError } from '@captify/captify-core/services/shared/errors';
|
|
554
|
-
import { Logger, ConsoleLogger } from '@captify/captify-core/services/logger';
|
|
555
|
-
import { BaseAwsService as AwsService } from '@captify/captify-core/services/shared/services';
|
|
332
|
+
```bash
|
|
333
|
+
npm run dev
|
|
556
334
|
```
|
|
557
335
|
|
|
558
|
-
|
|
336
|
+
Open [http://localhost:3000](http://localhost:3000)
|
|
559
337
|
|
|
560
|
-
|
|
561
|
-
✅ **Better tree-shaking** - Only bundle what you actually use
|
|
562
|
-
✅ **Clearer dependencies** - Explicit about what you're importing
|
|
563
|
-
✅ **Improved IDE autocomplete** - More precise suggestions
|
|
564
|
-
✅ **Optimal bundle size** - Import exactly what you need (v0.3.0)
|
|
565
|
-
✅ **Flexible imports** - Choose between category or granular imports (v0.3.0)
|
|
338
|
+
### Storybook
|
|
566
339
|
|
|
567
|
-
|
|
340
|
+
Interactive component documentation:
|
|
568
341
|
|
|
569
|
-
|
|
342
|
+
```bash
|
|
343
|
+
npm run storybook
|
|
344
|
+
```
|
|
570
345
|
|
|
571
|
-
|
|
346
|
+
Open [http://localhost:6006](http://localhost:6006)
|
|
572
347
|
|
|
573
|
-
|
|
574
|
-
2. The auth config is in `lib/auth/index.ts`
|
|
575
|
-
3. Middleware protects routes automatically
|
|
348
|
+
## Scripts
|
|
576
349
|
|
|
577
|
-
|
|
350
|
+
```bash
|
|
351
|
+
# Development
|
|
352
|
+
npm run dev # Start Next.js dev server with Turbopack (port 3000)
|
|
353
|
+
npm run storybook # Start Storybook on port 6006
|
|
578
354
|
|
|
579
|
-
|
|
580
|
-
|
|
355
|
+
# Building
|
|
356
|
+
npm run build # Build library (TypeScript to dist/)
|
|
357
|
+
npm run build:next # Build Next.js app
|
|
581
358
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
359
|
+
# Validation
|
|
360
|
+
npm run validate # Run lint + type-check
|
|
361
|
+
npm run lint # Run ESLint
|
|
362
|
+
npm run lint:fix # ESLint with auto-fix
|
|
363
|
+
npm run type-check # TypeScript check without emit
|
|
585
364
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
365
|
+
# Formatting
|
|
366
|
+
npm run prettify # Check Prettier formatting
|
|
367
|
+
npm run prettify:fix # Auto-format with Prettier
|
|
589
368
|
|
|
590
|
-
|
|
591
|
-
|
|
369
|
+
# Testing
|
|
370
|
+
npm test # Run Playwright e2e tests
|
|
371
|
+
npm run test:ui # Playwright UI mode
|
|
372
|
+
npm run test:headed # Playwright headed mode
|
|
373
|
+
npm run test:debug # Playwright debug mode
|
|
374
|
+
npm run test:unit # Run Vitest unit tests
|
|
592
375
|
```
|
|
593
376
|
|
|
594
|
-
##
|
|
377
|
+
## TypeScript Configuration
|
|
595
378
|
|
|
596
|
-
|
|
379
|
+
- `tsconfig.json` - Development config for Next.js
|
|
380
|
+
- `tsconfig.build.json` - Library build config (compiles `lib/` to `dist/`)
|
|
597
381
|
|
|
598
|
-
|
|
599
|
-
lib/components/my-component/
|
|
600
|
-
├── my-component.tsx
|
|
601
|
-
└── index.ts
|
|
602
|
-
```
|
|
382
|
+
### Path Aliases
|
|
603
383
|
|
|
604
|
-
|
|
384
|
+
- `@/*` maps to project root
|
|
385
|
+
- `captify/*` maps to `lib/*`
|
|
605
386
|
|
|
606
|
-
|
|
607
|
-
export * from "./my-component";
|
|
608
|
-
```
|
|
387
|
+
## Code Quality
|
|
609
388
|
|
|
610
|
-
|
|
389
|
+
### ESLint Rules
|
|
611
390
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
391
|
+
- `no-console: error` - Use `// eslint-disable-next-line no-console` for intentional logs
|
|
392
|
+
- `no-undef: error` - All variables must be defined
|
|
393
|
+
- Unused variables with `_` prefix are allowed
|
|
394
|
+
- `lib/shared/components/ui/**` is ignored (shadcn/ui components)
|
|
616
395
|
|
|
617
|
-
|
|
618
|
-
```bash
|
|
619
|
-
stories/components/MyComponent.stories.tsx
|
|
620
|
-
```
|
|
396
|
+
### Pre-commit Hooks
|
|
621
397
|
|
|
622
|
-
|
|
398
|
+
Husky runs lint-staged on commit for:
|
|
399
|
+
- ESLint fixes
|
|
400
|
+
- Prettier formatting
|
|
623
401
|
|
|
624
|
-
|
|
402
|
+
## AWS Services Integration
|
|
625
403
|
|
|
626
|
-
|
|
627
|
-
- `no-console: error` (use `// eslint-disable-next-line no-console` for intentional logs)
|
|
628
|
-
- `no-undef: error`
|
|
629
|
-
- Unused vars allowed with `_` prefix
|
|
630
|
-
- `lib/components/ui/**` ignored (external shadcn components)
|
|
404
|
+
The library integrates with multiple AWS services:
|
|
631
405
|
|
|
632
|
-
|
|
406
|
+
- **Cognito** - User authentication and management
|
|
407
|
+
- **S3** - File storage and presigned URLs
|
|
408
|
+
- **DynamoDB** - Database operations
|
|
409
|
+
- **Bedrock** - AI/LLM inference
|
|
633
410
|
|
|
634
|
-
|
|
411
|
+
## AI SDK Integration
|
|
635
412
|
|
|
636
|
-
-
|
|
637
|
-
- Prettier formatting
|
|
413
|
+
Multi-provider AI support via Vercel AI SDK:
|
|
638
414
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
- `tsconfig.json` - Next.js development
|
|
644
|
-
- `tsconfig.build.json` - Library build (targets `lib/`, outputs `dist/`)
|
|
645
|
-
|
|
646
|
-
Path aliases:
|
|
647
|
-
|
|
648
|
-
- `@/*` → project root
|
|
649
|
-
- `@captify/captify-core` → `lib/`
|
|
650
|
-
|
|
651
|
-
## Styling
|
|
652
|
-
|
|
653
|
-
- **Tailwind CSS** with custom configuration
|
|
654
|
-
- **CSS Variables** for theming
|
|
655
|
-
- **Dark Mode** support via next-themes
|
|
656
|
-
- **shadcn/ui** style: "new-york", base color: "neutral"
|
|
657
|
-
|
|
658
|
-
## Browser Support
|
|
659
|
-
|
|
660
|
-
- Modern browsers (Chrome, Firefox, Safari, Edge)
|
|
661
|
-
- ES2020+ features
|
|
662
|
-
|
|
663
|
-
## Changelog
|
|
664
|
-
|
|
665
|
-
### v0.3.0 (2025-01-26)
|
|
666
|
-
|
|
667
|
-
**New Features:**
|
|
668
|
-
- ✨ **100+ Granular Export Paths** - Ultra-precise imports for optimal tree-shaking
|
|
669
|
-
- ✨ **Component-Level Exports** - Import specific components directly
|
|
670
|
-
- `@captify/captify-core/components/app-launcher`
|
|
671
|
-
- `@captify/captify-core/components/console-layout`
|
|
672
|
-
- `@captify/captify-core/components/breadcrumb`
|
|
673
|
-
- And many more!
|
|
674
|
-
- ✨ **Hook-Level Exports** - Direct hook imports
|
|
675
|
-
- `@captify/captify-core/hooks/use-mobile`
|
|
676
|
-
- `@captify/captify-core/hooks/use-notifications`
|
|
677
|
-
- ✨ **Utility-Level Exports** - Import individual utilities
|
|
678
|
-
- `@captify/captify-core/utils/cn`
|
|
679
|
-
- `@captify/captify-core/utils/date`
|
|
680
|
-
- `@captify/captify-core/utils/string`
|
|
681
|
-
- ✨ **Service Submodule Exports** - Granular service imports
|
|
682
|
-
- `@captify/captify-core/services/cognito/services`
|
|
683
|
-
- `@captify/captify-core/services/cognito/constants`
|
|
684
|
-
- `@captify/captify-core/services/cognito/errors`
|
|
685
|
-
- Similar structure for S3, DynamoDB, and Chat services
|
|
686
|
-
- ✨ **Interface-Level Exports** - Import specific interfaces
|
|
687
|
-
- `@captify/captify-core/interfaces/app-launcher`
|
|
688
|
-
- `@captify/captify-core/interfaces/breadcrumb`
|
|
689
|
-
- And all other interfaces
|
|
690
|
-
- ✨ **Constant-Level Exports** - Direct constant imports
|
|
691
|
-
- `@captify/captify-core/constants/app-launcher`
|
|
692
|
-
- `@captify/captify-core/constants/profile-dropdown`
|
|
693
|
-
- `@captify/captify-core/constants/tables`
|
|
694
|
-
|
|
695
|
-
**Improvements:**
|
|
696
|
-
- 🎯 **Maximum Tree-Shaking** - Import exactly what you need, nothing more
|
|
697
|
-
- 🎯 **Smaller Bundle Sizes** - Granular imports reduce final bundle size
|
|
698
|
-
- 🎯 **Better Developer Experience** - More intuitive import paths
|
|
699
|
-
- 🎯 **Flexible Import Strategy** - Choose between category or granular imports
|
|
700
|
-
- 📝 **Comprehensive Documentation** - Full list of all 100+ export paths
|
|
701
|
-
- 🔧 **UI Components Index** - Added index.ts for all shadcn/ui components
|
|
702
|
-
- 🔧 **Constants Export** - Added missing tables constants export
|
|
703
|
-
|
|
704
|
-
**Technical:**
|
|
705
|
-
- 📦 Published to npm registry as public package
|
|
706
|
-
- ✅ All validation and build checks pass
|
|
707
|
-
- ✅ Path aliases properly converted to relative imports
|
|
708
|
-
|
|
709
|
-
### v0.2.0 (2025-01-26)
|
|
710
|
-
|
|
711
|
-
**Breaking Changes:**
|
|
712
|
-
- 🚨 Main entry point (`@captify/captify-core`) no longer re-exports all modules
|
|
713
|
-
- All imports must now use specific module paths (e.g., `@captify/captify-core/components`)
|
|
714
|
-
- See [Migration Guide](#migration-guide) for upgrade instructions
|
|
715
|
-
|
|
716
|
-
**New Features:**
|
|
717
|
-
- ✨ Granular exports to prevent naming conflicts
|
|
718
|
-
- ✨ Added complete exports for all services (Cognito, DynamoDB, S3, Chat)
|
|
719
|
-
- ✨ Added terms-and-conditions actions export
|
|
720
|
-
- ✨ Added utilities exports for all service modules
|
|
721
|
-
|
|
722
|
-
**Improvements:**
|
|
723
|
-
- 🎯 Better tree-shaking support - only bundle what you use
|
|
724
|
-
- 🎯 Clearer dependency management
|
|
725
|
-
- 🎯 Improved IDE autocomplete and IntelliSense
|
|
726
|
-
- 📝 Updated documentation with comprehensive import examples
|
|
727
|
-
|
|
728
|
-
**Bug Fixes:**
|
|
729
|
-
- 🐛 Fixed missing exports in lib/actions/index.ts
|
|
730
|
-
- 🐛 Fixed missing exports in lib/services/cognito/index.ts
|
|
731
|
-
- 🐛 Fixed missing exports in lib/services/dynamodb/index.ts
|
|
732
|
-
|
|
733
|
-
### v0.1.20 (Previous)
|
|
734
|
-
|
|
735
|
-
- Initial stable release with all core components and services
|
|
415
|
+
- **Amazon Bedrock** - Claude, Titan models
|
|
416
|
+
- **Anthropic** - Direct Claude API
|
|
417
|
+
- **OpenAI** - GPT models
|
|
736
418
|
|
|
737
419
|
## Contributing
|
|
738
420
|
|
|
739
|
-
1. Create a feature branch
|
|
740
|
-
2. Make your changes
|
|
421
|
+
1. Create a feature branch from `dev`
|
|
422
|
+
2. Make your changes following the feature-based module structure
|
|
741
423
|
3. Run `npm run validate` to ensure quality
|
|
742
424
|
4. Commit your changes (pre-commit hooks will run)
|
|
743
|
-
5. Submit a pull request
|
|
425
|
+
5. Submit a pull request to `dev`
|
|
744
426
|
|
|
745
427
|
## License
|
|
746
428
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
## Support
|
|
750
|
-
|
|
751
|
-
For issues and questions, please use the GitHub issue tracker.
|
|
752
|
-
|
|
753
|
-
## Related Projects
|
|
754
|
-
|
|
755
|
-
- [Next.js](https://nextjs.org/)
|
|
756
|
-
- [React](https://react.dev/)
|
|
757
|
-
- [shadcn/ui](https://ui.shadcn.com/)
|
|
758
|
-
- [Tailwind CSS](https://tailwindcss.com/)
|
|
759
|
-
- [NextAuth.js](https://next-auth.js.org/)
|
|
429
|
+
Anautics Inc. All rights reserved.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "captify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Core shared library for Captify applications",
|
|
5
5
|
"license": "Anautics Inc. All rights reserved.",
|
|
6
6
|
"engines": {
|
|
@@ -460,7 +460,6 @@
|
|
|
460
460
|
},
|
|
461
461
|
"peerDependencies": {
|
|
462
462
|
"next": "^16.0.0",
|
|
463
|
-
"next-auth": "5.0.0-beta.30",
|
|
464
463
|
"react": "^19.0.0",
|
|
465
464
|
"react-dom": "^19.0.0"
|
|
466
465
|
},
|
|
@@ -617,6 +616,7 @@
|
|
|
617
616
|
"motion": "^12.23.24",
|
|
618
617
|
"nanoid": "^5.1.6",
|
|
619
618
|
"next": "^16.0.0",
|
|
619
|
+
"next-auth": "5.0.0-beta.30",
|
|
620
620
|
"next-themes": "^0.4.6",
|
|
621
621
|
"pdf2json": "^4.0.0",
|
|
622
622
|
"prosemirror-commands": "^1.7.1",
|