@weirdfingers/baseboards 0.9.6 → 0.9.7
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/dist/index.js +560 -469
- package/dist/index.js.map +1 -1
- package/package.json +2 -5
- package/templates/README.md +0 -122
- package/templates/api/.env.example +0 -65
- package/templates/api/ARTIFACT_RESOLUTION_GUIDE.md +0 -148
- package/templates/api/Dockerfile +0 -32
- package/templates/api/README.md +0 -264
- package/templates/api/alembic/env.py +0 -114
- package/templates/api/alembic/script.py.mako +0 -28
- package/templates/api/alembic/versions/20250101_000000_initial_schema.py +0 -506
- package/templates/api/alembic/versions/20251022_174729_remove_provider_name_from_generations.py +0 -75
- package/templates/api/alembic/versions/20251023_165852_switch_to_declarative_base_and_mapping.py +0 -467
- package/templates/api/alembic/versions/20251202_000000_add_artifact_lineage.py +0 -134
- package/templates/api/alembic/versions/2025925_62735_add_seed_data_for_default_tenant.py +0 -88
- package/templates/api/alembic.ini +0 -36
- package/templates/api/config/generators.yaml +0 -237
- package/templates/api/config/storage_config.yaml +0 -26
- package/templates/api/docs/ADDING_GENERATORS.md +0 -409
- package/templates/api/docs/GENERATORS_API.md +0 -502
- package/templates/api/docs/MIGRATIONS.md +0 -472
- package/templates/api/docs/TESTING_LIVE_APIS.md +0 -417
- package/templates/api/docs/storage_providers.md +0 -337
- package/templates/api/pyproject.toml +0 -205
- package/templates/api/src/boards/__init__.py +0 -10
- package/templates/api/src/boards/api/app.py +0 -172
- package/templates/api/src/boards/api/auth.py +0 -75
- package/templates/api/src/boards/api/endpoints/__init__.py +0 -3
- package/templates/api/src/boards/api/endpoints/jobs.py +0 -76
- package/templates/api/src/boards/api/endpoints/setup.py +0 -505
- package/templates/api/src/boards/api/endpoints/sse.py +0 -129
- package/templates/api/src/boards/api/endpoints/storage.py +0 -155
- package/templates/api/src/boards/api/endpoints/tenant_registration.py +0 -296
- package/templates/api/src/boards/api/endpoints/uploads.py +0 -149
- package/templates/api/src/boards/api/endpoints/webhooks.py +0 -13
- package/templates/api/src/boards/auth/__init__.py +0 -15
- package/templates/api/src/boards/auth/adapters/__init__.py +0 -27
- package/templates/api/src/boards/auth/adapters/auth0.py +0 -220
- package/templates/api/src/boards/auth/adapters/base.py +0 -73
- package/templates/api/src/boards/auth/adapters/clerk.py +0 -172
- package/templates/api/src/boards/auth/adapters/jwt.py +0 -122
- package/templates/api/src/boards/auth/adapters/none.py +0 -102
- package/templates/api/src/boards/auth/adapters/oidc.py +0 -284
- package/templates/api/src/boards/auth/adapters/supabase.py +0 -110
- package/templates/api/src/boards/auth/context.py +0 -35
- package/templates/api/src/boards/auth/factory.py +0 -129
- package/templates/api/src/boards/auth/middleware.py +0 -221
- package/templates/api/src/boards/auth/provisioning.py +0 -129
- package/templates/api/src/boards/auth/tenant_extraction.py +0 -278
- package/templates/api/src/boards/cli.py +0 -354
- package/templates/api/src/boards/config.py +0 -131
- package/templates/api/src/boards/database/__init__.py +0 -7
- package/templates/api/src/boards/database/cli.py +0 -110
- package/templates/api/src/boards/database/connection.py +0 -292
- package/templates/api/src/boards/database/models.py +0 -19
- package/templates/api/src/boards/database/seed_data.py +0 -182
- package/templates/api/src/boards/dbmodels/__init__.py +0 -441
- package/templates/api/src/boards/generators/__init__.py +0 -57
- package/templates/api/src/boards/generators/artifact_resolution.py +0 -405
- package/templates/api/src/boards/generators/artifacts.py +0 -53
- package/templates/api/src/boards/generators/base.py +0 -144
- package/templates/api/src/boards/generators/implementations/__init__.py +0 -14
- package/templates/api/src/boards/generators/implementations/fal/__init__.py +0 -25
- package/templates/api/src/boards/generators/implementations/fal/audio/__init__.py +0 -23
- package/templates/api/src/boards/generators/implementations/fal/audio/beatoven_music_generation.py +0 -171
- package/templates/api/src/boards/generators/implementations/fal/audio/beatoven_sound_effect_generation.py +0 -167
- package/templates/api/src/boards/generators/implementations/fal/audio/chatterbox_text_to_speech.py +0 -176
- package/templates/api/src/boards/generators/implementations/fal/audio/chatterbox_tts_turbo.py +0 -195
- package/templates/api/src/boards/generators/implementations/fal/audio/elevenlabs_sound_effects_v2.py +0 -194
- package/templates/api/src/boards/generators/implementations/fal/audio/elevenlabs_tts_eleven_v3.py +0 -209
- package/templates/api/src/boards/generators/implementations/fal/audio/fal_elevenlabs_tts_turbo_v2_5.py +0 -206
- package/templates/api/src/boards/generators/implementations/fal/audio/fal_minimax_speech_26_hd.py +0 -237
- package/templates/api/src/boards/generators/implementations/fal/audio/minimax_music_v2.py +0 -173
- package/templates/api/src/boards/generators/implementations/fal/audio/minimax_speech_2_6_turbo.py +0 -221
- package/templates/api/src/boards/generators/implementations/fal/image/__init__.py +0 -63
- package/templates/api/src/boards/generators/implementations/fal/image/bytedance_seedream_v45_edit.py +0 -219
- package/templates/api/src/boards/generators/implementations/fal/image/clarity_upscaler.py +0 -220
- package/templates/api/src/boards/generators/implementations/fal/image/crystal_upscaler.py +0 -173
- package/templates/api/src/boards/generators/implementations/fal/image/fal_ideogram_character.py +0 -227
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2.py +0 -203
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2_edit.py +0 -230
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2_pro.py +0 -204
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2_pro_edit.py +0 -221
- package/templates/api/src/boards/generators/implementations/fal/image/flux_pro_kontext.py +0 -216
- package/templates/api/src/boards/generators/implementations/fal/image/flux_pro_ultra.py +0 -197
- package/templates/api/src/boards/generators/implementations/fal/image/gemini_25_flash_image.py +0 -177
- package/templates/api/src/boards/generators/implementations/fal/image/gemini_25_flash_image_edit.py +0 -208
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_15_edit.py +0 -216
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_5.py +0 -177
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_edit_image.py +0 -182
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_mini.py +0 -167
- package/templates/api/src/boards/generators/implementations/fal/image/ideogram_character_edit.py +0 -299
- package/templates/api/src/boards/generators/implementations/fal/image/ideogram_v2.py +0 -190
- package/templates/api/src/boards/generators/implementations/fal/image/imagen4_preview.py +0 -191
- package/templates/api/src/boards/generators/implementations/fal/image/imagen4_preview_fast.py +0 -179
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana.py +0 -183
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_edit.py +0 -212
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_pro.py +0 -179
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_pro_edit.py +0 -226
- package/templates/api/src/boards/generators/implementations/fal/image/qwen_image.py +0 -249
- package/templates/api/src/boards/generators/implementations/fal/image/qwen_image_edit.py +0 -244
- package/templates/api/src/boards/generators/implementations/fal/image/reve_edit.py +0 -178
- package/templates/api/src/boards/generators/implementations/fal/image/reve_text_to_image.py +0 -155
- package/templates/api/src/boards/generators/implementations/fal/image/seedream_v45_text_to_image.py +0 -180
- package/templates/api/src/boards/generators/implementations/fal/utils.py +0 -61
- package/templates/api/src/boards/generators/implementations/fal/video/__init__.py +0 -77
- package/templates/api/src/boards/generators/implementations/fal/video/bytedance_seedance_v1_pro_text_to_video.py +0 -209
- package/templates/api/src/boards/generators/implementations/fal/video/creatify_lipsync.py +0 -161
- package/templates/api/src/boards/generators/implementations/fal/video/fal_bytedance_seedance_v1_pro_image_to_video.py +0 -222
- package/templates/api/src/boards/generators/implementations/fal/video/fal_minimax_hailuo_02_standard_text_to_video.py +0 -152
- package/templates/api/src/boards/generators/implementations/fal/video/fal_pixverse_lipsync.py +0 -197
- package/templates/api/src/boards/generators/implementations/fal/video/fal_sora_2_text_to_video.py +0 -173
- package/templates/api/src/boards/generators/implementations/fal/video/infinitalk.py +0 -221
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_ai_avatar_v2_pro.py +0 -168
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_ai_avatar_v2_standard.py +0 -159
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_v2_5_turbo_pro_image_to_video.py +0 -175
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_v2_5_turbo_pro_text_to_video.py +0 -168
- package/templates/api/src/boards/generators/implementations/fal/video/minimax_hailuo_2_3_pro_image_to_video.py +0 -153
- package/templates/api/src/boards/generators/implementations/fal/video/sora2_image_to_video.py +0 -172
- package/templates/api/src/boards/generators/implementations/fal/video/sora_2_image_to_video_pro.py +0 -175
- package/templates/api/src/boards/generators/implementations/fal/video/sora_2_text_to_video_pro.py +0 -163
- package/templates/api/src/boards/generators/implementations/fal/video/sync_lipsync_v2.py +0 -167
- package/templates/api/src/boards/generators/implementations/fal/video/sync_lipsync_v2_pro.py +0 -155
- package/templates/api/src/boards/generators/implementations/fal/video/veed_fabric_1_0.py +0 -180
- package/templates/api/src/boards/generators/implementations/fal/video/veed_lipsync.py +0 -174
- package/templates/api/src/boards/generators/implementations/fal/video/veo3.py +0 -194
- package/templates/api/src/boards/generators/implementations/fal/video/veo31.py +0 -190
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_fast.py +0 -190
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_fast_image_to_video.py +0 -191
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_first_last_frame_to_video.py +0 -187
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_image_to_video.py +0 -183
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_reference_to_video.py +0 -172
- package/templates/api/src/boards/generators/implementations/fal/video/wan_25_preview_image_to_video.py +0 -212
- package/templates/api/src/boards/generators/implementations/fal/video/wan_25_preview_text_to_video.py +0 -208
- package/templates/api/src/boards/generators/implementations/fal/video/wan_pro_image_to_video.py +0 -158
- package/templates/api/src/boards/generators/implementations/kie/__init__.py +0 -11
- package/templates/api/src/boards/generators/implementations/kie/base.py +0 -316
- package/templates/api/src/boards/generators/implementations/kie/image/__init__.py +0 -3
- package/templates/api/src/boards/generators/implementations/kie/image/nano_banana_edit.py +0 -190
- package/templates/api/src/boards/generators/implementations/kie/utils.py +0 -98
- package/templates/api/src/boards/generators/implementations/kie/video/__init__.py +0 -8
- package/templates/api/src/boards/generators/implementations/kie/video/veo3.py +0 -161
- package/templates/api/src/boards/generators/implementations/openai/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/openai/audio/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/openai/audio/whisper.py +0 -69
- package/templates/api/src/boards/generators/implementations/openai/image/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/openai/image/dalle3.py +0 -96
- package/templates/api/src/boards/generators/implementations/replicate/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/replicate/image/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/replicate/image/flux_pro.py +0 -88
- package/templates/api/src/boards/generators/implementations/replicate/video/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/replicate/video/lipsync.py +0 -73
- package/templates/api/src/boards/generators/loader.py +0 -253
- package/templates/api/src/boards/generators/registry.py +0 -114
- package/templates/api/src/boards/generators/resolution.py +0 -632
- package/templates/api/src/boards/generators/testmods/class_gen.py +0 -34
- package/templates/api/src/boards/generators/testmods/import_side_effect.py +0 -35
- package/templates/api/src/boards/graphql/__init__.py +0 -7
- package/templates/api/src/boards/graphql/access_control.py +0 -136
- package/templates/api/src/boards/graphql/mutations/root.py +0 -148
- package/templates/api/src/boards/graphql/queries/root.py +0 -116
- package/templates/api/src/boards/graphql/resolvers/__init__.py +0 -8
- package/templates/api/src/boards/graphql/resolvers/auth.py +0 -12
- package/templates/api/src/boards/graphql/resolvers/board.py +0 -1053
- package/templates/api/src/boards/graphql/resolvers/generation.py +0 -666
- package/templates/api/src/boards/graphql/resolvers/generator.py +0 -50
- package/templates/api/src/boards/graphql/resolvers/lineage.py +0 -381
- package/templates/api/src/boards/graphql/resolvers/upload.py +0 -463
- package/templates/api/src/boards/graphql/resolvers/user.py +0 -25
- package/templates/api/src/boards/graphql/schema.py +0 -81
- package/templates/api/src/boards/graphql/types/board.py +0 -102
- package/templates/api/src/boards/graphql/types/generation.py +0 -166
- package/templates/api/src/boards/graphql/types/generator.py +0 -17
- package/templates/api/src/boards/graphql/types/user.py +0 -47
- package/templates/api/src/boards/jobs/repository.py +0 -153
- package/templates/api/src/boards/logging.py +0 -195
- package/templates/api/src/boards/middleware.py +0 -339
- package/templates/api/src/boards/progress/__init__.py +0 -4
- package/templates/api/src/boards/progress/models.py +0 -25
- package/templates/api/src/boards/progress/publisher.py +0 -64
- package/templates/api/src/boards/py.typed +0 -0
- package/templates/api/src/boards/redis_pool.py +0 -118
- package/templates/api/src/boards/storage/__init__.py +0 -52
- package/templates/api/src/boards/storage/base.py +0 -363
- package/templates/api/src/boards/storage/config.py +0 -187
- package/templates/api/src/boards/storage/factory.py +0 -288
- package/templates/api/src/boards/storage/implementations/__init__.py +0 -27
- package/templates/api/src/boards/storage/implementations/gcs.py +0 -340
- package/templates/api/src/boards/storage/implementations/local.py +0 -201
- package/templates/api/src/boards/storage/implementations/s3.py +0 -294
- package/templates/api/src/boards/storage/implementations/supabase.py +0 -218
- package/templates/api/src/boards/tenant_isolation.py +0 -446
- package/templates/api/src/boards/validation.py +0 -262
- package/templates/api/src/boards/workers/__init__.py +0 -1
- package/templates/api/src/boards/workers/actors.py +0 -274
- package/templates/api/src/boards/workers/cli.py +0 -125
- package/templates/api/src/boards/workers/context.py +0 -348
- package/templates/api/src/boards/workers/middleware.py +0 -58
- package/templates/api/src/py.typed +0 -0
- package/templates/compose.web.yaml +0 -35
- package/templates/compose.yaml +0 -116
- package/templates/docker/env.example +0 -23
- package/templates/web/.env.example +0 -28
- package/templates/web/Dockerfile +0 -51
- package/templates/web/components.json +0 -22
- package/templates/web/imageLoader.js +0 -18
- package/templates/web/next-env.d.ts +0 -5
- package/templates/web/next.config.js +0 -36
- package/templates/web/package.json +0 -41
- package/templates/web/postcss.config.mjs +0 -7
- package/templates/web/public/favicon.ico +0 -0
- package/templates/web/src/app/boards/[boardId]/page.tsx +0 -353
- package/templates/web/src/app/globals.css +0 -123
- package/templates/web/src/app/layout.tsx +0 -31
- package/templates/web/src/app/lineage/[generationId]/page.tsx +0 -235
- package/templates/web/src/app/page.tsx +0 -35
- package/templates/web/src/app/providers.tsx +0 -18
- package/templates/web/src/components/boards/ArtifactInputSlots.tsx +0 -206
- package/templates/web/src/components/boards/ArtifactPreview.tsx +0 -466
- package/templates/web/src/components/boards/GenerationGrid.tsx +0 -282
- package/templates/web/src/components/boards/GenerationInput.tsx +0 -370
- package/templates/web/src/components/boards/GeneratorSelector.tsx +0 -272
- package/templates/web/src/components/boards/UploadArtifact.tsx +0 -563
- package/templates/web/src/components/header.tsx +0 -32
- package/templates/web/src/components/theme-provider.tsx +0 -10
- package/templates/web/src/components/theme-toggle.tsx +0 -75
- package/templates/web/src/components/ui/alert-dialog.tsx +0 -157
- package/templates/web/src/components/ui/button.tsx +0 -58
- package/templates/web/src/components/ui/card.tsx +0 -92
- package/templates/web/src/components/ui/dropdown-menu.tsx +0 -200
- package/templates/web/src/components/ui/navigation-menu.tsx +0 -168
- package/templates/web/src/components/ui/toast.tsx +0 -128
- package/templates/web/src/components/ui/toaster.tsx +0 -35
- package/templates/web/src/components/ui/use-toast.ts +0 -187
- package/templates/web/src/hooks/useGeneratorMRU.ts +0 -57
- package/templates/web/src/lib/utils.ts +0 -6
- package/templates/web/tsconfig.json +0 -41
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
# Storage Providers
|
|
2
|
-
|
|
3
|
-
Boards supports multiple storage providers for artifact storage through a pluggable architecture. This document describes the available providers and their configuration options.
|
|
4
|
-
|
|
5
|
-
## Available Providers
|
|
6
|
-
|
|
7
|
-
### Local Storage
|
|
8
|
-
|
|
9
|
-
The local filesystem provider is ideal for development and testing.
|
|
10
|
-
|
|
11
|
-
**Features:**
|
|
12
|
-
|
|
13
|
-
- Stores files on the local filesystem
|
|
14
|
-
- Optional public URL serving for development
|
|
15
|
-
- No external dependencies
|
|
16
|
-
- Fast for small to medium files
|
|
17
|
-
|
|
18
|
-
**Configuration:**
|
|
19
|
-
|
|
20
|
-
```yaml
|
|
21
|
-
providers:
|
|
22
|
-
local:
|
|
23
|
-
type: "local"
|
|
24
|
-
config:
|
|
25
|
-
base_path: "/tmp/boards/storage" # Storage directory
|
|
26
|
-
public_url_base: "http://localhost:8088/api/storage" # Optional: base URL for serving files
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Use Cases:**
|
|
30
|
-
|
|
31
|
-
- Local development
|
|
32
|
-
- Testing environments
|
|
33
|
-
- Small deployments without cloud requirements
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
### AWS S3
|
|
38
|
-
|
|
39
|
-
The S3 provider offers robust cloud storage with optional CloudFront CDN integration.
|
|
40
|
-
|
|
41
|
-
**Features:**
|
|
42
|
-
|
|
43
|
-
- Scalable cloud storage
|
|
44
|
-
- Server-side encryption
|
|
45
|
-
- CloudFront CDN integration
|
|
46
|
-
- Presigned URLs for direct client uploads
|
|
47
|
-
- Multiple storage classes for cost optimization
|
|
48
|
-
- Cross-region replication support
|
|
49
|
-
|
|
50
|
-
**Dependencies:**
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
pip install boto3 aioboto3
|
|
54
|
-
# or
|
|
55
|
-
pip install boards-backend[storage-s3]
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**Configuration:**
|
|
59
|
-
|
|
60
|
-
```yaml
|
|
61
|
-
providers:
|
|
62
|
-
s3:
|
|
63
|
-
type: "s3"
|
|
64
|
-
config:
|
|
65
|
-
bucket: "my-boards-bucket" # Required: S3 bucket name
|
|
66
|
-
region: "us-east-1" # AWS region
|
|
67
|
-
aws_access_key_id: "${AWS_ACCESS_KEY_ID}" # AWS credentials
|
|
68
|
-
aws_secret_access_key: "${AWS_SECRET_ACCESS_KEY}"
|
|
69
|
-
aws_session_token: "${AWS_SESSION_TOKEN}" # Optional: for temporary credentials
|
|
70
|
-
endpoint_url: "https://s3.amazonaws.com" # Optional: custom endpoint (for S3-compatible services)
|
|
71
|
-
cloudfront_domain: "d123.cloudfront.net" # Optional: CloudFront distribution
|
|
72
|
-
upload_config: # Optional: S3 upload parameters
|
|
73
|
-
ServerSideEncryption: "AES256"
|
|
74
|
-
StorageClass: "STANDARD"
|
|
75
|
-
# Or use KMS encryption:
|
|
76
|
-
# ServerSideEncryption: "aws:kms"
|
|
77
|
-
# SSEKMSKeyId: "arn:aws:kms:region:account:key/key-id"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**Environment Variables:**
|
|
81
|
-
|
|
82
|
-
- `AWS_ACCESS_KEY_ID`: AWS access key (if not in config)
|
|
83
|
-
- `AWS_SECRET_ACCESS_KEY`: AWS secret key (if not in config)
|
|
84
|
-
- `AWS_SESSION_TOKEN`: Temporary session token (optional)
|
|
85
|
-
- `AWS_REGION`: Default region (if not in config)
|
|
86
|
-
|
|
87
|
-
**Use Cases:**
|
|
88
|
-
|
|
89
|
-
- Production deployments
|
|
90
|
-
- Large file storage
|
|
91
|
-
- Global content distribution with CloudFront
|
|
92
|
-
- Compliance requirements (encryption, audit trails)
|
|
93
|
-
- Integration with other AWS services
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
### Google Cloud Storage (GCS)
|
|
98
|
-
|
|
99
|
-
The GCS provider integrates with Google Cloud Platform and Cloud CDN.
|
|
100
|
-
|
|
101
|
-
**Features:**
|
|
102
|
-
|
|
103
|
-
- Google Cloud native storage
|
|
104
|
-
- Automatic encryption at rest
|
|
105
|
-
- Cloud CDN integration
|
|
106
|
-
- Multi-regional storage options
|
|
107
|
-
- IAM integration with fine-grained permissions
|
|
108
|
-
- Lifecycle management policies
|
|
109
|
-
|
|
110
|
-
**Dependencies:**
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
pip install google-cloud-storage
|
|
114
|
-
# or
|
|
115
|
-
pip install boards-backend[storage-gcs]
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Configuration:**
|
|
119
|
-
|
|
120
|
-
```yaml
|
|
121
|
-
providers:
|
|
122
|
-
gcs:
|
|
123
|
-
type: "gcs"
|
|
124
|
-
config:
|
|
125
|
-
bucket: "my-boards-gcs-bucket" # Required: GCS bucket name
|
|
126
|
-
project_id: "my-gcp-project" # GCP project ID
|
|
127
|
-
# Authentication options (choose one):
|
|
128
|
-
credentials_path: "/path/to/service-account-key.json" # Service account key file
|
|
129
|
-
credentials_json: "${GCP_SERVICE_ACCOUNT_JSON}" # Service account JSON as string
|
|
130
|
-
# Or use default credentials (gcloud, environment, etc.)
|
|
131
|
-
cdn_domain: "cdn.example.com" # Optional: Cloud CDN domain
|
|
132
|
-
upload_config: # Optional: GCS upload parameters
|
|
133
|
-
cache_control: "public, max-age=3600"
|
|
134
|
-
predefined_acl: "bucket-owner-read"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**Authentication Methods:**
|
|
138
|
-
|
|
139
|
-
1. **Service Account Key File:**
|
|
140
|
-
|
|
141
|
-
```yaml
|
|
142
|
-
credentials_path: "/path/to/service-account-key.json"
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
2. **Service Account JSON String:**
|
|
146
|
-
|
|
147
|
-
```yaml
|
|
148
|
-
credentials_json: "${GCP_SERVICE_ACCOUNT_JSON}"
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
3. **Default Credentials (recommended for production):**
|
|
152
|
-
- Google Cloud SDK (`gcloud auth application-default login`)
|
|
153
|
-
- Environment variable `GOOGLE_APPLICATION_CREDENTIALS`
|
|
154
|
-
- Compute Engine/GKE service accounts
|
|
155
|
-
- Cloud Run/Cloud Functions default credentials
|
|
156
|
-
|
|
157
|
-
**Use Cases:**
|
|
158
|
-
|
|
159
|
-
- Google Cloud Platform deployments
|
|
160
|
-
- Integration with other GCP services
|
|
161
|
-
- Global content distribution
|
|
162
|
-
- Machine learning workflows (easy integration with AI Platform)
|
|
163
|
-
- Multi-regional applications
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
### Supabase Storage
|
|
168
|
-
|
|
169
|
-
The Supabase provider integrates with Supabase's storage and authentication system.
|
|
170
|
-
|
|
171
|
-
**Features:**
|
|
172
|
-
|
|
173
|
-
- Integrated with Supabase auth
|
|
174
|
-
- Built-in CDN
|
|
175
|
-
- Row Level Security (RLS) integration
|
|
176
|
-
- Real-time subscriptions
|
|
177
|
-
- Automatic image transformations
|
|
178
|
-
|
|
179
|
-
**Dependencies:**
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
pip install supabase
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**Configuration:**
|
|
186
|
-
|
|
187
|
-
```yaml
|
|
188
|
-
providers:
|
|
189
|
-
supabase:
|
|
190
|
-
type: "supabase"
|
|
191
|
-
config:
|
|
192
|
-
url: "${SUPABASE_URL}" # Supabase project URL
|
|
193
|
-
key: "${SUPABASE_ANON_KEY}" # Supabase anon key
|
|
194
|
-
bucket: "boards-artifacts" # Storage bucket name
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Use Cases:**
|
|
198
|
-
|
|
199
|
-
- Supabase-based applications
|
|
200
|
-
- Real-time collaborative features
|
|
201
|
-
- Integrated authentication and storage
|
|
202
|
-
- Rapid prototyping
|
|
203
|
-
|
|
204
|
-
## Provider Selection and Routing
|
|
205
|
-
|
|
206
|
-
Boards supports intelligent provider selection through routing rules:
|
|
207
|
-
|
|
208
|
-
```yaml
|
|
209
|
-
routing_rules:
|
|
210
|
-
# Large files go to S3
|
|
211
|
-
- condition:
|
|
212
|
-
size_gt: "50MB"
|
|
213
|
-
provider: "s3"
|
|
214
|
-
|
|
215
|
-
# Images go to GCS with CDN
|
|
216
|
-
- condition:
|
|
217
|
-
artifact_type: "image"
|
|
218
|
-
provider: "gcs"
|
|
219
|
-
|
|
220
|
-
# Videos go to S3 for CloudFront streaming
|
|
221
|
-
- condition:
|
|
222
|
-
artifact_type: "video"
|
|
223
|
-
provider: "s3"
|
|
224
|
-
|
|
225
|
-
# Default fallback
|
|
226
|
-
- provider: "local"
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Best Practices
|
|
230
|
-
|
|
231
|
-
### Security
|
|
232
|
-
|
|
233
|
-
1. **Never hardcode credentials** in configuration files
|
|
234
|
-
2. **Use environment variables** or secure credential management
|
|
235
|
-
3. **Enable encryption at rest** for sensitive data
|
|
236
|
-
4. **Use IAM roles** instead of access keys when possible
|
|
237
|
-
5. **Implement bucket policies** for additional security
|
|
238
|
-
|
|
239
|
-
### Performance
|
|
240
|
-
|
|
241
|
-
1. **Choose regions close to your users** for better latency
|
|
242
|
-
2. **Use CDN/CloudFront** for frequently accessed content
|
|
243
|
-
3. **Consider storage classes** for cost optimization
|
|
244
|
-
4. **Implement caching** at the application level
|
|
245
|
-
5. **Use presigned URLs** for direct client uploads
|
|
246
|
-
|
|
247
|
-
### Cost Optimization
|
|
248
|
-
|
|
249
|
-
1. **Use appropriate storage classes** (Standard, IA, Glacier, etc.)
|
|
250
|
-
2. **Implement lifecycle policies** for automatic data management
|
|
251
|
-
3. **Monitor usage and costs** regularly
|
|
252
|
-
4. **Use compression** for text-based content
|
|
253
|
-
5. **Clean up unused files** periodically
|
|
254
|
-
|
|
255
|
-
### Development vs Production
|
|
256
|
-
|
|
257
|
-
**Development:**
|
|
258
|
-
|
|
259
|
-
```yaml
|
|
260
|
-
default_provider: "local"
|
|
261
|
-
providers:
|
|
262
|
-
local:
|
|
263
|
-
type: "local"
|
|
264
|
-
config:
|
|
265
|
-
base_path: "/tmp/boards/storage"
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
**Production:**
|
|
269
|
-
|
|
270
|
-
```yaml
|
|
271
|
-
default_provider: "s3"
|
|
272
|
-
providers:
|
|
273
|
-
s3:
|
|
274
|
-
type: "s3"
|
|
275
|
-
config:
|
|
276
|
-
bucket: "prod-boards-artifacts"
|
|
277
|
-
cloudfront_domain: "cdn.example.com"
|
|
278
|
-
gcs:
|
|
279
|
-
type: "gcs"
|
|
280
|
-
config:
|
|
281
|
-
bucket: "prod-boards-media"
|
|
282
|
-
cdn_domain: "media.example.com"
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
## Migration Between Providers
|
|
286
|
-
|
|
287
|
-
When migrating between providers, consider:
|
|
288
|
-
|
|
289
|
-
1. **Gradual migration** using routing rules
|
|
290
|
-
2. **Data consistency** during the migration
|
|
291
|
-
3. **URL updates** for existing references
|
|
292
|
-
4. **Testing** with non-critical data first
|
|
293
|
-
5. **Backup strategies** for data safety
|
|
294
|
-
|
|
295
|
-
Example gradual migration:
|
|
296
|
-
|
|
297
|
-
```yaml
|
|
298
|
-
# Phase 1: Route new uploads to S3, keep existing on local
|
|
299
|
-
routing_rules:
|
|
300
|
-
- condition:
|
|
301
|
-
artifact_type: "image"
|
|
302
|
-
provider: "s3"
|
|
303
|
-
- provider: "local" # Existing files
|
|
304
|
-
|
|
305
|
-
# Phase 2: Migrate all new uploads to S3
|
|
306
|
-
routing_rules:
|
|
307
|
-
- provider: "s3"
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Troubleshooting
|
|
311
|
-
|
|
312
|
-
### Common Issues
|
|
313
|
-
|
|
314
|
-
1. **Authentication errors**: Check credentials and permissions
|
|
315
|
-
2. **Bucket access denied**: Verify bucket policies and IAM permissions
|
|
316
|
-
3. **Network timeouts**: Check network connectivity and endpoint URLs
|
|
317
|
-
4. **Large file uploads**: Consider chunked uploads and timeout settings
|
|
318
|
-
5. **CDN cache issues**: Check cache headers and purge policies
|
|
319
|
-
|
|
320
|
-
### Debugging
|
|
321
|
-
|
|
322
|
-
Enable debug logging:
|
|
323
|
-
|
|
324
|
-
```python
|
|
325
|
-
import logging
|
|
326
|
-
logging.getLogger("boards.storage").setLevel(logging.DEBUG)
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Monitoring
|
|
330
|
-
|
|
331
|
-
Key metrics to monitor:
|
|
332
|
-
|
|
333
|
-
- Upload success rates
|
|
334
|
-
- Download latency
|
|
335
|
-
- Storage costs
|
|
336
|
-
- Error rates by provider
|
|
337
|
-
- CDN hit rates (if applicable)
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "weirdfingers-boards"
|
|
7
|
-
dynamic = ["version"]
|
|
8
|
-
description = "Backend API server for Boards - AI creative toolkit with GraphQL, auth adapters, and generation workers"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.12"
|
|
11
|
-
license = { text = "MIT" }
|
|
12
|
-
authors = [
|
|
13
|
-
{ name = "Boards Contributors", email = "ai.overlord@weirdfingers.com" },
|
|
14
|
-
]
|
|
15
|
-
keywords = [
|
|
16
|
-
"ai",
|
|
17
|
-
"creative",
|
|
18
|
-
"toolkit",
|
|
19
|
-
"graphql",
|
|
20
|
-
"fastapi",
|
|
21
|
-
"strawberry",
|
|
22
|
-
"auth",
|
|
23
|
-
"generation",
|
|
24
|
-
]
|
|
25
|
-
classifiers = [
|
|
26
|
-
"Development Status :: 3 - Alpha",
|
|
27
|
-
"Intended Audience :: Developers",
|
|
28
|
-
"License :: OSI Approved :: MIT License",
|
|
29
|
-
"Programming Language :: Python :: 3",
|
|
30
|
-
"Programming Language :: Python :: 3.12",
|
|
31
|
-
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
|
|
32
|
-
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
33
|
-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
34
|
-
"Framework :: FastAPI",
|
|
35
|
-
"Framework :: AsyncIO",
|
|
36
|
-
]
|
|
37
|
-
dependencies = [
|
|
38
|
-
"sqlalchemy>=2.0.0",
|
|
39
|
-
"pydantic>=2.0.0",
|
|
40
|
-
"pydantic-settings>=2.0.0",
|
|
41
|
-
"httpx>=0.24.0",
|
|
42
|
-
"python-dotenv>=1.0.0",
|
|
43
|
-
"strawberry-graphql[fastapi]>=0.200.0",
|
|
44
|
-
"fastapi>=0.100.0",
|
|
45
|
-
"uvicorn[standard]>=0.23.0",
|
|
46
|
-
"dramatiq[redis,watch]>=1.15.0",
|
|
47
|
-
"pillow>=10.0.0",
|
|
48
|
-
"numpy>=1.24.0",
|
|
49
|
-
"psycopg[binary]>=3.1.0",
|
|
50
|
-
"structlog>=23.0.0",
|
|
51
|
-
"asyncpg>=0.29.0",
|
|
52
|
-
"alembic>=1.13.2",
|
|
53
|
-
"aiofiles>=23.0.0",
|
|
54
|
-
"pyyaml>=6.0.0",
|
|
55
|
-
"click>=8.0.0",
|
|
56
|
-
"redis>=5.0.0",
|
|
57
|
-
"pyjwt[crypto]>=2.8.0",
|
|
58
|
-
"psutil>=7.0.0",
|
|
59
|
-
]
|
|
60
|
-
|
|
61
|
-
[project.optional-dependencies]
|
|
62
|
-
# Generator providers (per-provider)
|
|
63
|
-
generators-replicate = ["replicate>=1.0.4"]
|
|
64
|
-
generators-openai = ["openai>=1.60.1"]
|
|
65
|
-
generators-fal = ["fal-client>=0.5.0"]
|
|
66
|
-
generators-anthropic = ["anthropic>=0.25.0"]
|
|
67
|
-
generators-together = ["together>=1.0.0"]
|
|
68
|
-
|
|
69
|
-
# Convenience: all generators
|
|
70
|
-
generators-all = [
|
|
71
|
-
"replicate>=1.0.4",
|
|
72
|
-
"openai>=1.60.1",
|
|
73
|
-
"fal-client>=0.5.0",
|
|
74
|
-
"anthropic>=0.25.0",
|
|
75
|
-
"together>=1.0.0",
|
|
76
|
-
]
|
|
77
|
-
|
|
78
|
-
# Storage providers (per-provider)
|
|
79
|
-
storage-supabase = ["supabase>=2.0.0"]
|
|
80
|
-
storage-s3 = ["boto3>=1.34.0", "aioboto3>=12.0.0"]
|
|
81
|
-
storage-gcs = ["google-cloud-storage>=2.10.0"]
|
|
82
|
-
|
|
83
|
-
# Convenience: all storage backends
|
|
84
|
-
storage-all = [
|
|
85
|
-
"supabase>=2.0.0",
|
|
86
|
-
"boto3>=1.34.0",
|
|
87
|
-
"aioboto3>=12.0.0",
|
|
88
|
-
"google-cloud-storage>=2.10.0",
|
|
89
|
-
]
|
|
90
|
-
|
|
91
|
-
# Auth providers (only Supabase needs extra deps beyond core httpx/pyjwt)
|
|
92
|
-
auth-supabase = ["supabase>=2.0.0"]
|
|
93
|
-
|
|
94
|
-
# Convenience: everything
|
|
95
|
-
all = [
|
|
96
|
-
"replicate>=1.0.4",
|
|
97
|
-
"openai>=1.60.1",
|
|
98
|
-
"fal-client>=0.5.0",
|
|
99
|
-
"anthropic>=0.25.0",
|
|
100
|
-
"together>=1.0.0",
|
|
101
|
-
"supabase>=2.0.0",
|
|
102
|
-
"boto3>=1.34.0",
|
|
103
|
-
"aioboto3>=12.0.0",
|
|
104
|
-
"google-cloud-storage>=2.10.0",
|
|
105
|
-
]
|
|
106
|
-
|
|
107
|
-
# Development dependencies
|
|
108
|
-
dev = [
|
|
109
|
-
"pytest>=7.0.0",
|
|
110
|
-
"pytest-asyncio>=0.21.0",
|
|
111
|
-
"pytest-postgresql>=6.0.0",
|
|
112
|
-
"pytest-cov>=4.0.0",
|
|
113
|
-
"ruff>=0.1.0",
|
|
114
|
-
"pyright>=1.1.0",
|
|
115
|
-
"black>=23.0.0",
|
|
116
|
-
"pre-commit>=3.0.0",
|
|
117
|
-
# Include all provider deps for typecheck
|
|
118
|
-
"openai>=1.60.1",
|
|
119
|
-
"anthropic>=0.25.0",
|
|
120
|
-
"replicate>=1.0.4",
|
|
121
|
-
"together>=1.0.0",
|
|
122
|
-
"fal-client>=0.5.0",
|
|
123
|
-
# Include all storage deps for typecheck
|
|
124
|
-
"supabase>=2.0.0",
|
|
125
|
-
"boto3>=1.34.0",
|
|
126
|
-
"aioboto3>=12.0.0",
|
|
127
|
-
"google-cloud-storage>=2.10.0",
|
|
128
|
-
# Type stubs
|
|
129
|
-
"types-redis>=4.6.0",
|
|
130
|
-
]
|
|
131
|
-
|
|
132
|
-
[project.urls]
|
|
133
|
-
Homepage = "https://github.com/weirdfingers/boards"
|
|
134
|
-
Documentation = "https://docs.boards.io"
|
|
135
|
-
Repository = "https://github.com/weirdfingers/boards"
|
|
136
|
-
Issues = "https://github.com/weirdfingers/boards/issues"
|
|
137
|
-
Changelog = "https://github.com/weirdfingers/boards/blob/main/CHANGELOG.md"
|
|
138
|
-
|
|
139
|
-
[project.scripts]
|
|
140
|
-
boards-server = "boards.cli:main"
|
|
141
|
-
boards-worker = "boards.workers.cli:main"
|
|
142
|
-
boards-migrate = "boards.database.cli:main"
|
|
143
|
-
|
|
144
|
-
[tool.setuptools.packages.find]
|
|
145
|
-
where = ["src"]
|
|
146
|
-
|
|
147
|
-
[tool.ruff]
|
|
148
|
-
line-length = 100
|
|
149
|
-
target-version = "py312"
|
|
150
|
-
exclude = ["alembic"]
|
|
151
|
-
|
|
152
|
-
[tool.ruff.lint]
|
|
153
|
-
select = [
|
|
154
|
-
"E", # pycodestyle errors
|
|
155
|
-
"W", # pycodestyle warnings
|
|
156
|
-
"F", # pyflakes
|
|
157
|
-
"I", # isort
|
|
158
|
-
"B", # flake8-bugbear
|
|
159
|
-
"C4", # flake8-comprehensions
|
|
160
|
-
"UP", # pyupgrade
|
|
161
|
-
]
|
|
162
|
-
|
|
163
|
-
[tool.ruff.lint.per-file-ignores]
|
|
164
|
-
# FastAPI uses Depends in function signatures
|
|
165
|
-
"src/boards/api/**/*.py" = ["B008"]
|
|
166
|
-
"tests/**/test_*.py" = ["B008"]
|
|
167
|
-
# Alembic needs imports after path manipulation
|
|
168
|
-
"alembic/env.py" = ["E402"]
|
|
169
|
-
# __init__.py files often have unused imports for re-export
|
|
170
|
-
"**/__init__.py" = ["F401"]
|
|
171
|
-
|
|
172
|
-
[tool.pytest.ini_options]
|
|
173
|
-
testpaths = ["tests"]
|
|
174
|
-
pythonpath = ["src"]
|
|
175
|
-
asyncio_mode = "auto"
|
|
176
|
-
|
|
177
|
-
[tool.setuptools.dynamic]
|
|
178
|
-
version = { attr = "boards.__version__" }
|
|
179
|
-
|
|
180
|
-
[tool.uv]
|
|
181
|
-
dev-dependencies = [
|
|
182
|
-
"pytest>=7.0.0",
|
|
183
|
-
"pytest-asyncio>=0.21.0",
|
|
184
|
-
"pytest-postgresql>=6.0.0",
|
|
185
|
-
"pytest-cov>=4.0.0",
|
|
186
|
-
"ruff>=0.1.0",
|
|
187
|
-
"pyright>=1.1.0",
|
|
188
|
-
"black>=23.0.0",
|
|
189
|
-
"pre-commit>=3.0.0",
|
|
190
|
-
"build>=1.3.0",
|
|
191
|
-
"twine>=6.1.0",
|
|
192
|
-
"watchfiles>=1.1.0",
|
|
193
|
-
# Include all provider deps for typecheck
|
|
194
|
-
"openai>=1.60.1",
|
|
195
|
-
"anthropic>=0.25.0",
|
|
196
|
-
"replicate>=1.0.4",
|
|
197
|
-
"together>=1.0.0",
|
|
198
|
-
"fal-client>=0.5.0",
|
|
199
|
-
# Include all storage deps for typecheck
|
|
200
|
-
"boto3>=1.34.0",
|
|
201
|
-
"aioboto3>=12.0.0",
|
|
202
|
-
"google-cloud-storage>=2.10.0",
|
|
203
|
-
# Type stubs
|
|
204
|
-
"types-redis>=4.6.0",
|
|
205
|
-
]
|