@seeka-labs/cli-apps 3.8.10 → 3.9.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.
- package/README.md +286 -0
- package/dist/index.cjs +821 -612
- package/dist/init-template.zip +0 -0
- package/package.json +5 -3
- package/dist/ai-context/common/README.md +0 -110
- package/dist/ai-context/common/architecture/overview.md +0 -140
- package/dist/ai-context/common/guides/common-patterns.md +0 -471
- package/dist/ai-context/common/guides/data-flow.md +0 -455
- package/dist/ai-context/common/guides/getting-started.md +0 -349
- package/dist/ai-context/common/guides/testing.md +0 -592
- package/dist/ai-context/common/reference/cli-commands.md +0 -231
- package/dist/ai-context/common/reference/config-schema.md +0 -345
- package/dist/ai-context/common/reference/sdk-api.md +0 -445
- package/dist/ai-context/public/architecture/app-structure.md +0 -385
- package/dist/index.cjs.map +0 -7
- package/dist/init-template/.github/workflows/deploy-azurefunc.yml +0 -198
- package/dist/init-template/.gitlab-ci.yml +0 -67
- package/dist/init-template/.nvmrc +0 -1
- package/dist/init-template/AGENTS.md +0 -99
- package/dist/init-template/README.azurefunc.md +0 -238
- package/dist/init-template/app/.eslintrc.cjs +0 -13
- package/dist/init-template/app/browser/README.md +0 -1
- package/dist/init-template/app/browser/package.json +0 -36
- package/dist/init-template/app/browser/scripts/esbuild/build-browser-plugin.mjs +0 -130
- package/dist/init-template/app/browser/scripts/esbuild/plugins/importAsGlobals.mjs +0 -39
- package/dist/init-template/app/browser/src/browser.ts +0 -12
- package/dist/init-template/app/browser/src/plugin/index.ts +0 -61
- package/dist/init-template/app/browser/tsconfig.json +0 -34
- package/dist/init-template/app/lib/package.json +0 -46
- package/dist/init-template/app/lib/src/index.ts +0 -4
- package/dist/init-template/app/lib/src/models/index.ts +0 -29
- package/dist/init-template/app/lib/src/validation/index.ts +0 -14
- package/dist/init-template/app/lib/tsconfig.json +0 -22
- package/dist/init-template/app/server-azurefunc/.eslintrc.cjs +0 -4
- package/dist/init-template/app/server-azurefunc/.funcignore +0 -20
- package/dist/init-template/app/server-azurefunc/README.md +0 -105
- package/dist/init-template/app/server-azurefunc/host.json +0 -31
- package/dist/init-template/app/server-azurefunc/local.settings.template.json +0 -30
- package/dist/init-template/app/server-azurefunc/package.json +0 -68
- package/dist/init-template/app/server-azurefunc/scripts/build.mjs +0 -67
- package/dist/init-template/app/server-azurefunc/scripts/dev-queue-setup.js +0 -55
- package/dist/init-template/app/server-azurefunc/src/app/api/router.ts +0 -15
- package/dist/init-template/app/server-azurefunc/src/app/api/routes/getInstallationSettings.ts +0 -13
- package/dist/init-template/app/server-azurefunc/src/app/api/routes/setInstallationSettings.ts +0 -35
- package/dist/init-template/app/server-azurefunc/src/app/jobs/index.ts +0 -61
- package/dist/init-template/app/server-azurefunc/src/app/logging/index.ts +0 -4
- package/dist/init-template/app/server-azurefunc/src/app/models/index.ts +0 -12
- package/dist/init-template/app/server-azurefunc/src/app/services/activites.ts +0 -8
- package/dist/init-template/app/server-azurefunc/src/functions/healthCheck.ts +0 -19
- package/dist/init-template/app/server-azurefunc/src/functions/seekaAppWebhook.ts +0 -204
- package/dist/init-template/app/server-azurefunc/src/functions/trackActivityQueueHandler.ts +0 -48
- package/dist/init-template/app/server-azurefunc/src/functions/ui.ts +0 -49
- package/dist/init-template/app/server-azurefunc/tsconfig.json +0 -24
- package/dist/init-template/app/ui/README.md +0 -40
- package/dist/init-template/app/ui/index.html +0 -21
- package/dist/init-template/app/ui/package.json +0 -72
- package/dist/init-template/app/ui/public/favicon.ico +0 -0
- package/dist/init-template/app/ui/scripts/copy-output.mjs +0 -30
- package/dist/init-template/app/ui/src/App.tsx +0 -72
- package/dist/init-template/app/ui/src/assets/app-icon.svg +0 -1
- package/dist/init-template/app/ui/src/components/setup/steps/complete/index.tsx +0 -32
- package/dist/init-template/app/ui/src/components/setup/steps/first/index.tsx +0 -27
- package/dist/init-template/app/ui/src/components/setup/steps/index.tsx +0 -22
- package/dist/init-template/app/ui/src/components/setup/steps/second/index.tsx +0 -38
- package/dist/init-template/app/ui/src/index.tsx +0 -45
- package/dist/init-template/app/ui/src/routes/home/index.tsx +0 -21
- package/dist/init-template/app/ui/src/vite-env.d.ts +0 -13
- package/dist/init-template/app/ui/tsconfig.json +0 -35
- package/dist/init-template/app/ui/tsconfig.node.json +0 -10
- package/dist/init-template/app/ui/vite.config.mts +0 -48
- package/dist/init-template/package.json +0 -46
- package/dist/init-template/tsconfig.json +0 -24
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
# CLI Commands Reference
|
|
2
|
-
|
|
3
|
-
This document provides a reference for all Seeka CLI commands.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Install globally
|
|
9
|
-
npm install -g @seeka-labs/cli-apps
|
|
10
|
-
|
|
11
|
-
# Or use npx (recommended)
|
|
12
|
-
npx @seeka-labs/cli-apps@latest <command>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Commands
|
|
16
|
-
|
|
17
|
-
### `init` - Initialize a New App
|
|
18
|
-
|
|
19
|
-
Creates a new Seeka app from a template.
|
|
20
|
-
|
|
21
|
-
#### Usage
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# Using a config file
|
|
25
|
-
npx @seeka-labs/cli-apps init <configFile>
|
|
26
|
-
|
|
27
|
-
# Using command line arguments
|
|
28
|
-
npx @seeka-labs/cli-apps init <org> <name> [options]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
#### Arguments
|
|
32
|
-
|
|
33
|
-
| Argument | Description |
|
|
34
|
-
|----------|-------------|
|
|
35
|
-
| `configFileOrOrg` | Path to JSON config file, or name of your org |
|
|
36
|
-
| `name` | Name of your app (alphanumeric and hyphens only) |
|
|
37
|
-
|
|
38
|
-
#### Options
|
|
39
|
-
|
|
40
|
-
| Option | Description | Default |
|
|
41
|
-
|--------|-------------|---------|
|
|
42
|
-
| `--template <template>` | App template: `azure-function`, `aws-lambda`, `netlify-function` | Required |
|
|
43
|
-
| `--developer <developer>` | App developer name or company | Required |
|
|
44
|
-
| `--email <email>` | App developer email | Required |
|
|
45
|
-
| `--outName [outName]` | Directory name for the app | App name |
|
|
46
|
-
| `--outDir [outDir]` | Output directory to create the app in | Current directory |
|
|
47
|
-
| `--npmUsername [username]` | Private NPM registry username | - |
|
|
48
|
-
| `--npmPassword [password]` | Private NPM registry password | - |
|
|
49
|
-
| `--noDependencies` | Skip installing dependencies | false |
|
|
50
|
-
| `--skipSubDir` | Use current directory instead of creating subdirectory | false |
|
|
51
|
-
| `--force` | Force creation in non-empty directory | false |
|
|
52
|
-
| `--env [env...]` | Set environment variables (KEY=VALUE format) | - |
|
|
53
|
-
|
|
54
|
-
#### Examples
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Create app with command line arguments
|
|
58
|
-
npx @seeka-labs/cli-apps init my-org my-app \
|
|
59
|
-
--template azure-function \
|
|
60
|
-
--developer "My Company" \
|
|
61
|
-
--email dev@mycompany.com \
|
|
62
|
-
--env SEEKA_APP_ID=app-123 SEEKA_APP_SECRET=secret-456
|
|
63
|
-
|
|
64
|
-
# Create app from config file
|
|
65
|
-
npx @seeka-labs/cli-apps init ./my-app.seeka.cli.config.json
|
|
66
|
-
|
|
67
|
-
# Create app in specific directory
|
|
68
|
-
npx @seeka-labs/cli-apps init my-org my-app \
|
|
69
|
-
--template azure-function \
|
|
70
|
-
--developer "My Company" \
|
|
71
|
-
--email dev@mycompany.com \
|
|
72
|
-
--outDir ./projects \
|
|
73
|
-
--outName my-custom-app-name
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
#### Config File Format
|
|
77
|
-
|
|
78
|
-
```json
|
|
79
|
-
{
|
|
80
|
-
"appName": "my-app",
|
|
81
|
-
"orgName": "my-org",
|
|
82
|
-
"template": "azure-function",
|
|
83
|
-
"developerName": "My Company",
|
|
84
|
-
"developerEmail": "dev@mycompany.com",
|
|
85
|
-
"outputDirectory": "./projects",
|
|
86
|
-
"directoryName": "my-custom-app-name",
|
|
87
|
-
"installDependencies": true,
|
|
88
|
-
"force": false,
|
|
89
|
-
"skipSubDir": false,
|
|
90
|
-
"environmentVariables": {
|
|
91
|
-
"SEEKA_APP_ID": "app-123",
|
|
92
|
-
"SEEKA_APP_SECRET": "secret-456"
|
|
93
|
-
},
|
|
94
|
-
"npmUsername": "npm-user",
|
|
95
|
-
"npmPassword": "npm-pass"
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### `ai context` - Manage AI Context
|
|
100
|
-
|
|
101
|
-
Manages AI context files in your app repository.
|
|
102
|
-
|
|
103
|
-
#### Usage
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
npx @seeka-labs/cli-apps ai context
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
#### Description
|
|
110
|
-
|
|
111
|
-
This command copies the AI context files to `.seeka/ai/context/` in your app repository. The context includes:
|
|
112
|
-
|
|
113
|
-
- Architecture documentation
|
|
114
|
-
- Implementation guides
|
|
115
|
-
- Example apps
|
|
116
|
-
- Reference documentation
|
|
117
|
-
|
|
118
|
-
The command will:
|
|
119
|
-
1. Create `.seeka/ai/context/` directory if it doesn't exist
|
|
120
|
-
2. Copy all AI context files
|
|
121
|
-
3. Generate `meta.json` with SDK version information
|
|
122
|
-
|
|
123
|
-
#### Output Structure
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
.seeka/
|
|
127
|
-
└── ai/
|
|
128
|
-
└── context/
|
|
129
|
-
├── meta.json
|
|
130
|
-
├── README.md
|
|
131
|
-
├── architecture/
|
|
132
|
-
├── guides/
|
|
133
|
-
├── reference/
|
|
134
|
-
└── examples/
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Interactive Mode
|
|
138
|
-
|
|
139
|
-
Running the CLI without arguments starts interactive mode:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
npx @seeka-labs/cli-apps
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
This will guide you through the app creation process with prompts.
|
|
146
|
-
|
|
147
|
-
## Environment Variables
|
|
148
|
-
|
|
149
|
-
The CLI respects these environment variables:
|
|
150
|
-
|
|
151
|
-
| Variable | Description |
|
|
152
|
-
|----------|-------------|
|
|
153
|
-
| `SEEKA_CLI_CONFIG` | Default config file path |
|
|
154
|
-
| `NPM_USERNAME` | Default NPM registry username |
|
|
155
|
-
| `NPM_PASSWORD` | Default NPM registry password |
|
|
156
|
-
|
|
157
|
-
## Exit Codes
|
|
158
|
-
|
|
159
|
-
| Code | Description |
|
|
160
|
-
|------|-------------|
|
|
161
|
-
| 0 | Success |
|
|
162
|
-
| 1 | General error |
|
|
163
|
-
| 2 | Invalid arguments |
|
|
164
|
-
| 3 | Config file not found |
|
|
165
|
-
| 4 | Template error |
|
|
166
|
-
|
|
167
|
-
## Generated Files
|
|
168
|
-
|
|
169
|
-
After running `init`, the following key files are created:
|
|
170
|
-
|
|
171
|
-
### `.seeka/` Directory
|
|
172
|
-
|
|
173
|
-
| File | Description |
|
|
174
|
-
|------|-------------|
|
|
175
|
-
| `init.app.seeka.cli.config.json` | Init configuration (committed) |
|
|
176
|
-
| `init.app.secrets.seeka.cli.config.json` | Secrets (gitignored) |
|
|
177
|
-
|
|
178
|
-
### Root Files
|
|
179
|
-
|
|
180
|
-
| File | Description |
|
|
181
|
-
|------|-------------|
|
|
182
|
-
| `package.json` | Root package with workspaces |
|
|
183
|
-
| `tsconfig.json` | TypeScript configuration |
|
|
184
|
-
| `.yarnrc.yml` | Yarn configuration with NPM registry |
|
|
185
|
-
| `README.md` | Project readme |
|
|
186
|
-
|
|
187
|
-
### App Components
|
|
188
|
-
|
|
189
|
-
| Directory | Description |
|
|
190
|
-
|-----------|-------------|
|
|
191
|
-
| `app/server/` | Server component (Azure Functions) |
|
|
192
|
-
| `app/lib/` | Shared library |
|
|
193
|
-
| `app/browser/` | Browser plugin (optional) |
|
|
194
|
-
| `app/ui/` | Configuration UI (optional) |
|
|
195
|
-
|
|
196
|
-
## Troubleshooting
|
|
197
|
-
|
|
198
|
-
### Common Issues
|
|
199
|
-
|
|
200
|
-
**"Directory is not empty"**
|
|
201
|
-
```bash
|
|
202
|
-
# Use --force to override
|
|
203
|
-
npx @seeka-labs/cli-apps init my-org my-app --template azure-function --force ...
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
**"App name cannot start with seeka-app-"**
|
|
207
|
-
```bash
|
|
208
|
-
# Use a different name without the prefix
|
|
209
|
-
npx @seeka-labs/cli-apps init my-org my-custom-app ...
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
**"Only azure-function template is supported"**
|
|
213
|
-
```bash
|
|
214
|
-
# Currently only azure-function is fully supported
|
|
215
|
-
npx @seeka-labs/cli-apps init my-org my-app --template azure-function ...
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
**NPM authentication errors**
|
|
219
|
-
```bash
|
|
220
|
-
# Provide NPM credentials for browser plugin dependencies
|
|
221
|
-
npx @seeka-labs/cli-apps init my-org my-app \
|
|
222
|
-
--npmUsername your-username \
|
|
223
|
-
--npmPassword your-password \
|
|
224
|
-
...
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## See Also
|
|
228
|
-
|
|
229
|
-
- `../guides/getting-started.md` - Getting started guide
|
|
230
|
-
- `../architecture/v3-structure.md` - Template structure
|
|
231
|
-
- `config-schema.md` - Configuration file schemas
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
# Configuration Schemas Reference
|
|
2
|
-
|
|
3
|
-
This document describes the configuration file schemas used in Seeka apps.
|
|
4
|
-
|
|
5
|
-
## CLI Configuration Files
|
|
6
|
-
|
|
7
|
-
### init.app.seeka.cli.config.json
|
|
8
|
-
|
|
9
|
-
Created by the CLI during app initialization. Stored in `.seeka/` directory.
|
|
10
|
-
|
|
11
|
-
```json
|
|
12
|
-
{
|
|
13
|
-
"appName": "my-app",
|
|
14
|
-
"orgName": "my-org",
|
|
15
|
-
"template": "azure-function",
|
|
16
|
-
"developerName": "My Company",
|
|
17
|
-
"developerEmail": "dev@mycompany.com",
|
|
18
|
-
"outputDirectory": "/path/to/output",
|
|
19
|
-
"directoryName": "my-app",
|
|
20
|
-
"installDependencies": true,
|
|
21
|
-
"force": false,
|
|
22
|
-
"skipSubDir": false,
|
|
23
|
-
"sdk": {
|
|
24
|
-
"version": "3.7.0"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
| Field | Type | Description |
|
|
30
|
-
|-------|------|-------------|
|
|
31
|
-
| `appName` | string | Name of the app |
|
|
32
|
-
| `orgName` | string | Organization name |
|
|
33
|
-
| `template` | string | Template used: `azure-function`, `aws-lambda`, `netlify-function` |
|
|
34
|
-
| `developerName` | string | Developer/company name |
|
|
35
|
-
| `developerEmail` | string | Developer email |
|
|
36
|
-
| `outputDirectory` | string | Directory where app was created |
|
|
37
|
-
| `directoryName` | string | Name of the app directory |
|
|
38
|
-
| `installDependencies` | boolean | Whether dependencies were installed |
|
|
39
|
-
| `force` | boolean | Whether force flag was used |
|
|
40
|
-
| `skipSubDir` | boolean | Whether skipSubDir flag was used |
|
|
41
|
-
| `sdk.version` | string | SDK version used to create the app |
|
|
42
|
-
|
|
43
|
-
### init.app.secrets.seeka.cli.config.json
|
|
44
|
-
|
|
45
|
-
Stores sensitive configuration. **This file should be gitignored.**
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"environmentVariables": {
|
|
50
|
-
"SEEKA_APP_ID": "app-123",
|
|
51
|
-
"SEEKA_APP_SECRET": "secret-456",
|
|
52
|
-
"DATA_ENCRYPTION_KEY": "32-character-encryption-key"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Azure Functions Configuration
|
|
58
|
-
|
|
59
|
-
### host.json
|
|
60
|
-
|
|
61
|
-
Azure Functions host configuration.
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"version": "2.0",
|
|
66
|
-
"logging": {
|
|
67
|
-
"applicationInsights": {
|
|
68
|
-
"samplingSettings": {
|
|
69
|
-
"isEnabled": true,
|
|
70
|
-
"excludedTypes": "Request"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"extensionBundle": {
|
|
75
|
-
"id": "Microsoft.Azure.Functions.ExtensionBundle",
|
|
76
|
-
"version": "[4.*, 5.0.0)"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### local.settings.json
|
|
82
|
-
|
|
83
|
-
Local development settings. **This file should be gitignored.**
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"IsEncrypted": false,
|
|
88
|
-
"Values": {
|
|
89
|
-
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
|
|
90
|
-
"FUNCTIONS_WORKER_RUNTIME": "node",
|
|
91
|
-
"SEEKA_APP_ID": "your-app-id",
|
|
92
|
-
"SEEKA_APP_SECRET": "your-app-secret",
|
|
93
|
-
"DATA_ENCRYPTION_KEY": "your-32-character-encryption-key",
|
|
94
|
-
"SELF_HOST_BASEURL": "http://localhost:7071"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
| Variable | Description |
|
|
100
|
-
|----------|-------------|
|
|
101
|
-
| `AzureWebJobsStorage` | Azure Storage connection string |
|
|
102
|
-
| `FUNCTIONS_WORKER_RUNTIME` | Runtime: `node` |
|
|
103
|
-
| `SEEKA_APP_ID` | Your Seeka app ID |
|
|
104
|
-
| `SEEKA_APP_SECRET` | Your Seeka app secret |
|
|
105
|
-
| `DATA_ENCRYPTION_KEY` | 32-character encryption key |
|
|
106
|
-
| `SELF_HOST_BASEURL` | Public URL of your app |
|
|
107
|
-
|
|
108
|
-
### local.settings.template.json
|
|
109
|
-
|
|
110
|
-
Template for local settings (committed to repo).
|
|
111
|
-
|
|
112
|
-
```json
|
|
113
|
-
{
|
|
114
|
-
"IsEncrypted": false,
|
|
115
|
-
"Values": {
|
|
116
|
-
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
|
|
117
|
-
"FUNCTIONS_WORKER_RUNTIME": "node",
|
|
118
|
-
"SEEKA_APP_ID": "",
|
|
119
|
-
"SEEKA_APP_SECRET": "",
|
|
120
|
-
"DATA_ENCRYPTION_KEY": "",
|
|
121
|
-
"SELF_HOST_BASEURL": "http://localhost:7071"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Package Configuration
|
|
127
|
-
|
|
128
|
-
### Root package.json
|
|
129
|
-
|
|
130
|
-
```json
|
|
131
|
-
{
|
|
132
|
-
"name": "@my-org/my-app",
|
|
133
|
-
"version": "1.0.0",
|
|
134
|
-
"private": true,
|
|
135
|
-
"workspaces": [
|
|
136
|
-
"app/*"
|
|
137
|
-
],
|
|
138
|
-
"scripts": {
|
|
139
|
-
"build": "yarn workspaces foreach -A run build",
|
|
140
|
-
"build:server": "yarn workspace @my-org/my-app-server run build",
|
|
141
|
-
"dev": "yarn workspace @my-org/my-app-server run dev",
|
|
142
|
-
"test": "yarn workspaces foreach -A run test"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Server package.json
|
|
148
|
-
|
|
149
|
-
```json
|
|
150
|
-
{
|
|
151
|
-
"name": "@my-org/my-app-server",
|
|
152
|
-
"version": "1.0.0",
|
|
153
|
-
"main": "dist/src/functions/*.js",
|
|
154
|
-
"scripts": {
|
|
155
|
-
"build": "tsc && yarn build:copy",
|
|
156
|
-
"build:copy": "node scripts/copy-assets.mjs",
|
|
157
|
-
"dev": "func start",
|
|
158
|
-
"test": "jest"
|
|
159
|
-
},
|
|
160
|
-
"dependencies": {
|
|
161
|
-
"@azure/functions": "^4.0.0",
|
|
162
|
-
"@seeka-labs/sdk-apps-server": "^3.0.0",
|
|
163
|
-
"@seeka-labs/sdk-apps-server-host": "^3.0.0",
|
|
164
|
-
"winston": "^3.0.0"
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## TypeScript Configuration
|
|
170
|
-
|
|
171
|
-
### Root tsconfig.json
|
|
172
|
-
|
|
173
|
-
```json
|
|
174
|
-
{
|
|
175
|
-
"compilerOptions": {
|
|
176
|
-
"target": "ES2022",
|
|
177
|
-
"module": "Node16",
|
|
178
|
-
"moduleResolution": "Node16",
|
|
179
|
-
"strict": true,
|
|
180
|
-
"esModuleInterop": true,
|
|
181
|
-
"skipLibCheck": true,
|
|
182
|
-
"forceConsistentCasingInFileNames": true,
|
|
183
|
-
"resolveJsonModule": true,
|
|
184
|
-
"declaration": true,
|
|
185
|
-
"declarationMap": true,
|
|
186
|
-
"sourceMap": true
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Server tsconfig.json
|
|
192
|
-
|
|
193
|
-
```json
|
|
194
|
-
{
|
|
195
|
-
"extends": "../../tsconfig.json",
|
|
196
|
-
"compilerOptions": {
|
|
197
|
-
"outDir": "./dist",
|
|
198
|
-
"rootDir": "."
|
|
199
|
-
},
|
|
200
|
-
"include": [
|
|
201
|
-
"src/**/*"
|
|
202
|
-
],
|
|
203
|
-
"references": [
|
|
204
|
-
{ "path": "../lib" }
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## AI Context Configuration
|
|
210
|
-
|
|
211
|
-
### meta.json
|
|
212
|
-
|
|
213
|
-
Generated in `.seeka/ai/context/` directory.
|
|
214
|
-
|
|
215
|
-
```json
|
|
216
|
-
{
|
|
217
|
-
"sdk": {
|
|
218
|
-
"version": "3.7.0"
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### exampleapps.context.json
|
|
224
|
-
|
|
225
|
-
Configuration for importing example apps into AI context.
|
|
226
|
-
|
|
227
|
-
```json
|
|
228
|
-
[
|
|
229
|
-
{
|
|
230
|
-
"appDir": "/path/to/example-app",
|
|
231
|
-
"templateVersion": 3,
|
|
232
|
-
"name": "google-ads-push",
|
|
233
|
-
"template": "azurefunc",
|
|
234
|
-
"components": ["server"],
|
|
235
|
-
"description": "Pushes conversion data to Google Ads",
|
|
236
|
-
"tags": ["conversion-api", "ads-platform"]
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"appDir": "../relative/path/app",
|
|
240
|
-
"templateVersion": 2,
|
|
241
|
-
"name": "meta-capi",
|
|
242
|
-
"template": "azurefunc",
|
|
243
|
-
"components": ["server", "browser"],
|
|
244
|
-
"description": "Meta Conversions API integration",
|
|
245
|
-
"tags": ["conversion-api", "ads-platform"]
|
|
246
|
-
}
|
|
247
|
-
]
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
| Field | Type | Description |
|
|
251
|
-
|-------|------|-------------|
|
|
252
|
-
| `appDir` | string | Absolute or relative path to the app |
|
|
253
|
-
| `templateVersion` | number | Template version: 1, 2, or 3 |
|
|
254
|
-
| `name` | string | Name for the example in AI context |
|
|
255
|
-
| `template` | string | Server template: `azurefunc`, `netlifyfunc`, `awslambda` |
|
|
256
|
-
| `components` | string[] | Components: `server`, `browser`, `ui` |
|
|
257
|
-
| `description` | string | Description of the app's functionality |
|
|
258
|
-
| `tags` | string[] | Tags for categorization |
|
|
259
|
-
|
|
260
|
-
## GitHub Actions Configuration
|
|
261
|
-
|
|
262
|
-
### deploy-azurefunc.yml
|
|
263
|
-
|
|
264
|
-
```yaml
|
|
265
|
-
name: Deploy Azure Function
|
|
266
|
-
|
|
267
|
-
on:
|
|
268
|
-
push:
|
|
269
|
-
branches: [main]
|
|
270
|
-
workflow_dispatch:
|
|
271
|
-
|
|
272
|
-
env:
|
|
273
|
-
AZURE_FUNCTIONAPP_NAME: 'my-app-func'
|
|
274
|
-
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'app/server'
|
|
275
|
-
NODE_VERSION: '20.x'
|
|
276
|
-
|
|
277
|
-
jobs:
|
|
278
|
-
build-and-deploy:
|
|
279
|
-
runs-on: ubuntu-latest
|
|
280
|
-
steps:
|
|
281
|
-
- uses: actions/checkout@v4
|
|
282
|
-
|
|
283
|
-
- name: Setup Node.js
|
|
284
|
-
uses: actions/setup-node@v4
|
|
285
|
-
with:
|
|
286
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
287
|
-
|
|
288
|
-
- name: Install dependencies
|
|
289
|
-
run: yarn install
|
|
290
|
-
|
|
291
|
-
- name: Build
|
|
292
|
-
run: yarn build
|
|
293
|
-
|
|
294
|
-
- name: Deploy to Azure
|
|
295
|
-
uses: Azure/functions-action@v1
|
|
296
|
-
with:
|
|
297
|
-
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
|
|
298
|
-
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
|
|
299
|
-
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
## Yarn Configuration
|
|
303
|
-
|
|
304
|
-
### .yarnrc.yml
|
|
305
|
-
|
|
306
|
-
```yaml
|
|
307
|
-
nodeLinker: node-modules
|
|
308
|
-
|
|
309
|
-
npmScopes:
|
|
310
|
-
seeka-labs:
|
|
311
|
-
npmAuthIdent: "username:password"
|
|
312
|
-
npmAlwaysAuth: true
|
|
313
|
-
npmRegistryServer: "https://npm.packages.seeka.services"
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
## Environment Variables Reference
|
|
317
|
-
|
|
318
|
-
### Required Variables
|
|
319
|
-
|
|
320
|
-
| Variable | Description | Example |
|
|
321
|
-
|----------|-------------|---------|
|
|
322
|
-
| `SEEKA_APP_ID` | Unique app identifier | `app-abc123` |
|
|
323
|
-
| `SEEKA_APP_SECRET` | Secret for webhook validation | `secret-xyz789` |
|
|
324
|
-
| `DATA_ENCRYPTION_KEY` | 32-char key for encrypting data | `abcdef1234567890abcdef1234567890` |
|
|
325
|
-
|
|
326
|
-
### Azure-Specific Variables
|
|
327
|
-
|
|
328
|
-
| Variable | Description |
|
|
329
|
-
|----------|-------------|
|
|
330
|
-
| `AzureWebJobsStorage` | Azure Storage connection string |
|
|
331
|
-
| `FUNCTIONS_WORKER_RUNTIME` | Set to `node` |
|
|
332
|
-
| `WEBSITE_NODE_DEFAULT_VERSION` | Node.js version |
|
|
333
|
-
|
|
334
|
-
### Optional Variables
|
|
335
|
-
|
|
336
|
-
| Variable | Description | Default |
|
|
337
|
-
|----------|-------------|---------|
|
|
338
|
-
| `SELF_HOST_BASEURL` | Public URL of the app | - |
|
|
339
|
-
| `LOG_LEVEL` | Logging level | `info` |
|
|
340
|
-
|
|
341
|
-
## See Also
|
|
342
|
-
|
|
343
|
-
- `cli-commands.md` - CLI command reference
|
|
344
|
-
- `sdk-api.md` - SDK API reference
|
|
345
|
-
- `../architecture/v3-structure.md` - Template structure
|