steedos-builder6-modules

Implements Builder6 authentication, file storage, and plugin modules for NestJS applications.

1.6k|414|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/steedos/steedos-platform --skill steedos-builder6-modules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: steedos-builder6-modules
Source: https://github.com/steedos/steedos-platform/tree/main/skills/steedos-builder6-modules
Command: npx skills add https://github.com/steedos/steedos-platform --skill steedos-builder6-modules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers working with the Builder6 platform need a single reference for its multi-format authentication system, file storage APIs, and plugin loading mechanism, which are otherwise scattered across multiple packages and configuration variables.

Core Features & Use Cases

  • Authentication: Covers JWT Bearer tokens, cookie-based sessions, and API keys, enforced by AuthGuard and AdminGuard from @builder6/core, including signIn flows, SHA256+bcrypt password verification, and auth cookie management.
  • File Storage: Documents upload/download endpoints under /api/v6/files with local and AWS S3 backends, cfs.* collections, presigned URLs, and file record schemas.
  • Plugin System: Explains loading NestJS module plugins via B6_PLUGIN_MODULES and Moleculer service plugins via B6_PLUGIN_PACKAGES, including the npm-based installation lifecycle.
  • Use Case: When building a custom endpoint that requires admin-only access and file attachments, use this Skill to apply AdminGuard, extract the user from the request, and store uploads via the files API with S3 presigned download URLs.

Quick Start

Ask the AI to add an authenticated file upload endpoint to a Builder6 project using AuthGuard and the /api/v6/files API with S3 storage.

Frequently Asked Questions about steedos-builder6-modules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate API requests in Builder6?

Builder6 supports three token formats: JWT Bearer tokens, cookie-based sessions using X-Auth-Token and X-User-Id cookies, and API keys sent as 'Bearer apikey,<key>'. The AuthGuard extracts and validates the token, then attaches the user to the request object.

How to upload and download files with the Builder6 files API?

Upload files via POST /api/v6/files/:collectionName as multipart with file, object_name, and record_id fields. Download via GET /api/v6/files/:collectionName/:fileId, with optional redirect=true for S3 signed URLs or download=true to force attachment.

Does Builder6 file storage support AWS S3?

Yes, set B6_CFS_STORE=S3 and configure B6_CFS_AWS_S3_ENDPOINT, access key, secret, region, and bucket environment variables. Files are stored under keys like collection/object_name/YYYY/MM/uuid-filename, and presigned URLs are available via the presigned-urls endpoint.

What is the difference between AuthGuard and AdminGuard in Builder6?

AuthGuard validates the token and sets req['user'] for most endpoints. AdminGuard performs the same validation but additionally requires the user's profile field to equal 'admin', restricting access to admin-only operations.

How do Builder6 plugins get installed and loaded?

Plugins are NPM packages listed in B6_PLUGIN_MODULES for NestJS modules or B6_PLUGIN_PACKAGES for Moleculer services. At startup the platform updates .npmrc, runs npm install in the plugins directory, then loads each module's dist/plugin.module.js entry point.

Why is my Builder6 API key request being rejected?

API key authentication requires the Authorization header formatted as 'Bearer apikey,<api-key-string>' and the key must exist in the api_keys collection with active set to true. Inactive or missing keys fail validation in AuthGuard.