### Build No-Code Architects Toolkit Docker Image Locally Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Builds the Docker image for the No-Code Architects Toolkit from the current directory, tagging it for local use. This command should be run in the directory containing your Dockerfile. ```bash docker build -t no-code-architects-toolkit . ``` -------------------------------- ### Build and Push Docker Image to Google Container Registry Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Builds the Docker image and pushes it to Google Container Registry (GCR) for deployment on Google Cloud Run. Replace `YOUR_PROJECT_ID` with your actual Google Cloud project ID. ```bash gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/no-code-architects-toolkit ``` -------------------------------- ### Convert Media to MP3 via API with cURL Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started This cURL command demonstrates how to use the `/media-to-mp3` endpoint to initiate media conversion. It sends a JSON payload containing the `media_url` of the file to convert and a `webhook_url` for status updates, also requiring an `X-API-Key`. ```bash curl -X POST http://localhost:8080/media-to-mp3 \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{\"media_url\": \"https://example.com/media.mp4\", \"webhook_url\": \"https://your-webhook.com\"}' ``` -------------------------------- ### Test No-Code Architects Toolkit API Authentication Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Tests the deployed No-Code Architects Toolkit service on Google Cloud Run by sending a POST request to the `/authenticate` endpoint with the provided API key. Replace `your-service-url` and `your_api_key` with actual values from your deployment. ```bash curl -X POST https://your-service-url/authenticate -H "X-API-Key: your_api_key" ``` -------------------------------- ### Example Curl Request for API Authentication Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/authenticate.md This `curl` command demonstrates how to make a GET request to the `/v1/toolkit/authenticate` endpoint, including the required `X-API-Key` header for authentication. Replace `YOUR_API_KEY` with your actual API key. ```bash curl -X GET -H "X-API-Key: YOUR_API_KEY" http://localhost:8080/v1/toolkit/authenticate ``` -------------------------------- ### Git Setup: Clone Fork and Add Upstream Remote Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/CONTRIBUTING.md Instructions for initial repository setup, including cloning your forked repository and adding the main project's upstream remote for synchronization. ```bash git clone https://github.com/YOUR_USERNAME/no-code-architects-toolkit.git cd no-code-architects-toolkit git remote add upstream https://github.com/stephengpope/no-code-architects-toolkit.git ``` -------------------------------- ### Copy example environment configuration file Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.local.minio.n8n.md Copies the provided example environment file to a new file for local customization, which will be used by Docker Compose. ```bash cp .env.local.minio.n8n.example .env.local.minio.n8n ``` -------------------------------- ### Run No-Code Architects Toolkit Locally with S3-Compatible Storage Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Runs the No-Code Architects Toolkit Docker container locally, exposing port 8080 and configuring it to use S3-compatible storage (e.g., DigitalOcean Spaces). Replace placeholders with your actual API key, S3 endpoint URL, access key, secret key, and bucket name. ```bash docker run -p 8080:8080 \ -e API_KEY=your_api_key \ -e S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com \ -e S3_ACCESS_KEY=your_s3_access_key \ -e S3_SECRET_KEY=your_s3_secret_key \ -e S3_BUCKET_NAME=your_bucket_name \ no-code-architects-toolkit ``` -------------------------------- ### Run No-Code Architects Toolkit Locally with Google Cloud Storage Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Runs the No-Code Architects Toolkit Docker container locally, exposing port 8080 and configuring it to use Google Cloud Storage. Replace placeholders with your actual API key, GCP bucket name, and service account JSON content. ```bash docker run -p 8080:8080 \ -e API_KEY=your_api_key \ -e GCP_BUCKET_NAME=your_gcp_bucket_name \ -e GCP_SA_CREDENTIALS='contents_of_your_service_account_json' \ no-code-architects-toolkit ``` -------------------------------- ### Authenticate API Endpoint with cURL Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started This cURL command sends a POST request to the `/authenticate` endpoint to verify API key authentication. It requires an `X-API-Key` header with your API key. ```bash curl -X POST http://localhost:8080/authenticate -H "X-API-Key: your_api_key" ``` -------------------------------- ### No-Code Architects Toolkit Environment Variables Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Defines the required and optional environment variables for configuring the No-Code Architects Toolkit, including API authentication, Google Cloud Storage, Google Drive, and S3-compatible storage settings. ```APIDOC General Variables: API_KEY: Authentication key for API requests. GCP_SA_CREDENTIALS (optional): Google Cloud service account JSON key content for accessing Google Cloud Storage. GDRIVE_USER (optional): Google Drive email for setting up Google Drive access. Google Cloud Storage Variables: GCP_BUCKET_NAME: Name of your Google Cloud Storage bucket for file storage. S3-Compatible Storage Variables (DigitalOcean Spaces): S3_ENDPOINT_URL: Endpoint for your S3-compatible storage service. S3_ACCESS_KEY: Credentials for accessing the S3-compatible service. S3_SECRET_KEY: Credentials for accessing the S3-compatible service. S3_BUCKET_NAME: Name of your S3-compatible storage bucket. ``` -------------------------------- ### Run No-Code Architects Toolkit Locally with Google Drive Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Runs the No-Code Architects Toolkit Docker container locally, exposing port 8080 and configuring it to use Google Drive. Ensure the target Google Drive folder is shared with the service account email. Replace placeholders with your actual API key, Google Drive user email, folder ID, and service account JSON content. ```bash docker run -p 8080:8080 \ -e API_KEY=your_api_key \ -e GDRIVE_USER=your_gdrive_user_email \ -e GDRIVE_FOLDER_ID=your_folder_id \ -e GCP_SA_CREDENTIALS='contents_of_your_service_account_json' \ no-code-architects-toolkit ``` -------------------------------- ### Deploy No-Code Architects Toolkit to Google Cloud Run Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Getting_Started Deploys the Docker image from Google Container Registry to Google Cloud Run as a managed service. This command configures the region, allows unauthenticated access, and sets environment variables for API key, GCP bucket, and service account credentials. ```bash gcloud run deploy no-code-architects-toolkit \ --image gcr.io/YOUR_PROJECT_ID/no-code-architects-toolkit \ --platform managed \ --region us-central1 \ --allow-unauthenticated \ --set-env-vars API_KEY=your_api_key,GCP_BUCKET_NAME=your_gcp_bucket_name,GCP_SA_CREDENTIALS=your_service_account_json ``` -------------------------------- ### Git Workflow: Example Branch Naming for Contributions Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/CONTRIBUTING.md Examples demonstrating the project's branch naming conventions for new features ('feature/') and bug fixes ('fix/'), showing the full 'git fetch' and 'git checkout' commands. ```bash # For a new feature git fetch upstream git checkout -b feature/pdf-to-text-converter upstream/build # For a bug fix git fetch upstream git checkout -b fix/webp-upload-crash upstream/build ``` -------------------------------- ### Testing No-Code Architects Toolkit API with Postman Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/cloud-installation/do.md This section details how to test the deployed No-Code Architects Toolkit API using Postman, including environment setup and verification of key endpoints to ensure successful deployment and functionality. ```APIDOC Postman Environment Variables: - x-api-key: Your API key (e.g., 'test123' for testing). This should match the API_KEY environment variable set during deployment. - base_url: The base URL of your deployed Digital Ocean App. This URL is provided in the Digital Ocean dashboard after successful deployment. API Endpoints: 1. /toolkit/authenticate - Method: POST (implied for authentication flows) - Description: Authenticates the provided API key against the deployed toolkit. This endpoint is used to verify the validity of your API_KEY and the initial connectivity to the service. - Parameters: None (API key is typically passed via a custom header like 'x-api-key' as configured in the Postman environment). - Returns: A success response (e.g., HTTP 200 OK) upon valid authentication, indicating that the API key is recognized and the service is reachable. - Usage: Send a request to this endpoint as the first step to confirm your API_KEY is correctly configured and the application is responding. 2. /toolkit/test - Method: GET/POST (implied for general functionality testing) - Description: Verifies the complete functionality of the No-Code Architects Toolkit API. This endpoint typically triggers internal tests or returns a status indicating the health of various components. - Parameters: None - Returns: A success response (e.g., HTTP 200 OK) upon successful internal tests, confirming that all core services and dependencies are operational. - Usage: After successful authentication, send a request to this endpoint to ensure that the entire toolkit is functioning as expected. ``` -------------------------------- ### Example Success Response (JSON) Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/caption_video.md An example JSON object representing a successful response from the video captioning API, including job details, output URL, and performance metrics. ```json { "code": 200, "id": "request-123", "job_id": "d290f1ee-6c54-4b01-90e6-d701748f0851", "response": "https://cloud.example.com/captioned-video.mp4", "message": "success", "pid": 12345, "queue_id": 140682639937472, "run_time": 5.234, "queue_time": 0.012, "total_time": 5.246, "queue_length": 0, "build_number": "1.0.0" } ``` -------------------------------- ### Video Captioning API Request Examples Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/caption_video.md Demonstrates how to construct requests for the `/v1/video/caption` endpoint. Includes a basic example for automatic captioning and another for custom text with detailed styling options. ```JSON { "video_url": "https://example.com/video.mp4" } { "video_url": "https://example.com/video.mp4", "captions": "This is a sample caption text.", "settings": { "style": "classic", "line_color": "#FFFFFF", "outline_color": "#000000", "position": "bottom_center", "alignment": "center", "font_family": "Arial", "font_size": 24, "bold": true } } ``` -------------------------------- ### Set up Docker APT Repository on Ubuntu Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.md This script updates package lists, installs necessary certificates and curl, adds Docker's official GPG key, and configures the Docker APT repository for Ubuntu systems. This is a prerequisite for installing Docker packages. ```bash # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to APT sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update ``` -------------------------------- ### Toolkit Logging Configuration and Example Entries Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Error_Handling_and_Logging Illustrates the standard log entry format, including timestamp, log level, module name, and message. Provides examples for various key events such as task initiation, file upload failures, and webhook delivery issues, demonstrating the level of detail captured for debugging and monitoring. ```text Logging Configuration: - Log Level: Default INFO, configurable to DEBUG for detailed troubleshooting. - Format: Each log entry includes a timestamp, log level, module name, and message. - Log Outputs: Typically console, configurable for persistent file logging. Key Log Events: - Task Start and End: Messages with unique job IDs for tracing. - Errors and Exceptions: All caught exceptions logged with stack traces (DEBUG level); critical errors logged at ERROR level. - Webhook Delivery Attempts: Each attempt and retry logged, with failure details. Example Log Entries: [2024-10-30 12:00:00] INFO [FFmpeg Toolkit] Video conversion started for job_id: convert_123 [2024-10-30 12:05:01] INFO [FFmpeg Toolkit] Starting media conversion to MP3 for job_id: mp3_001 [2024-10-30 12:05:15] ERROR [GCP Toolkit] Upload failed for job_id: upload_001, reason: Permission denied [2024-10-30 12:06:00] WARNING [Webhook Service] Webhook delivery failed for job_id: mp3_001 to http://yourapp.com/webhook ``` -------------------------------- ### Example JSON Request Body for MP3 Conversion Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_to_mp3.md An example JSON payload demonstrating the required 'media_url' and optional 'webhook_url', 'id', and 'bitrate' parameters for the `/v1/media/convert/mp3` endpoint. ```json { "media_url": "https://example.com/video.mp4", "webhook_url": "https://example.com/webhook", "id": "unique-request-id", "bitrate": "192k" } ``` -------------------------------- ### Example JSON Request for Media Conversion API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_convert.md Illustrates the structure of a JSON request body for the /v1/media/convert endpoint, including all supported parameters for media conversion. ```json { "media_url": "https://example.com/video.mp4", "format": "avi", "video_codec": "libx264", "video_preset": "medium", "video_crf": 23, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" } ``` -------------------------------- ### Example Error Responses (JSON) Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/caption_video.md JSON examples for various error scenarios returned by the API, including missing/invalid parameters, font errors with available options, and internal server errors. ```json { "code": 400, "id": "request-123", "job_id": "d290f1ee-6c54-4b01-90e6-d701748f0851", "message": "Missing or invalid parameters", "pid": 12345, "queue_id": 140682639937472, "queue_length": 0, "build_number": "1.0.0" } ``` ```json { "code": 400, "error": "The requested font 'InvalidFont' is not available. Please choose from the available fonts.", "available_fonts": ["Arial", "Times New Roman", "Courier New", ...], "pid": 12345, "queue_id": 140682639937472, "queue_length": 0, "build_number": "1.0.0" } ``` ```json { "code": 500, "id": "request-123", "job_id": "d290f1ee-6c54-4b01-90e6-d701748f0851", "error": "An unexpected error occurred during the captioning process.", "pid": 12345, "queue_id": 140682639937472, "queue_length": 0, "build_number": "1.0.0" } ``` -------------------------------- ### Example cURL Command for Video Cut Endpoint Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/cut.md A command-line example using cURL to send a POST request to the /v1/video/cut endpoint, including necessary headers and the full JSON request body. ```bash curl -X POST \ https://api.example.com/v1/video/cut \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "video_url": "https://example.com/video.mp4", "cuts": [ { "start": "00:00:10.000", "end": "00:00:20.000" }, { "start": "00:00:30.000", "end": "00:00:40.000" } ], "video_codec": "libx264", "video_preset": "medium", "video_crf": 23, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" }' ``` -------------------------------- ### Example cURL Command for FFmpeg Compose API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/ffmpeg/ffmpeg_compose.md A `curl` command demonstrating how to make a POST request to the `/v1/ffmpeg/compose` API endpoint, including the necessary `x-api-key` header and the JSON request body. This provides a practical example for interacting with the API from the command line. ```bash curl -X POST \ https://api.example.com/v1/ffmpeg/compose \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "inputs": [ { "file_url": "https://example.com/video1.mp4", "options": [ { "option": "-ss", "argument": 10 }, { "option": "-t", "argument": 20 } ] }, { "file_url": "https://example.com/video2.mp4" } ], "filters": [ { "filter": "hflip" } ], "outputs": [ { "options": [ { "option": "-c:v", "argument": "libx264" }, { "option": "-crf", "argument": 23 } ] } ], "global_options": [ { "option": "-y" } ], "metadata": { "thumbnail": true, "filesize": true, "duration": true, "bitrate": true, "encoder": true }, "webhook_url": "https://example.com/webhook", "id": "unique-request-id" }' ``` -------------------------------- ### Example cURL Command for Media Cut Endpoint Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/cut.md A command-line example using cURL to send a POST request to the `/v1/media/cut` endpoint. It includes setting the necessary headers and passing the JSON request body. ```bash curl -X POST \ https://api.example.com/v1/media/cut \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "media_url": "https://example.com/video.mp4", "cuts": [ { "start": "00:00:10.000", "end": "00:00:20.000" }, { "start": "00:00:30.000", "end": "00:00:40.000" } ], "video_codec": "libx264", "video_preset": "medium", "video_crf": 23, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" }' ``` -------------------------------- ### Example JSON Request Body for Video Split API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/split.md An example JSON payload demonstrating the required and optional parameters for the `/v1/video/split` API endpoint, including video URL, split timings, and encoding settings. ```json { "video_url": "https://example.com/video.mp4", "splits": [ { "start": "00:00:10.000", "end": "00:00:20.000" }, { "start": "00:00:30.000", "end": "00:00:40.000" } ], "video_codec": "libx264", "video_preset": "medium", "video_crf": 23, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" } ``` -------------------------------- ### Start Docker Compose development environment Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.local.minio.n8n.md Initiates and starts all defined services (NCA Toolkit, MinIO, n8n) in detached mode using the specified Docker Compose configuration file. ```bash docker compose -f docker-compose.local.minio.n8n.yml up -d ``` -------------------------------- ### Install and Apply Black Code Formatter Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Contributing This sequence of commands first installs the Black code formatter, a popular Python tool, using pip. It then executes Black to automatically format all Python files in the current directory and its subdirectories, ensuring consistent code style across the project. ```bash pip install black black . ``` -------------------------------- ### Example Error Response from Media Conversion API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_convert.md Illustrates the JSON structure of an error response from the media conversion endpoint, typically for bad requests (400) or other server-side issues. ```json { "code": 400, "id": "unique-request-id", "job_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6", "message": "Invalid request payload", "pid": 12345, "queue_id": 1234567890, "queue_length": 0, "build_number": "1.0.0" } ``` -------------------------------- ### Example JSON Request Body for Video Thumbnail Generation Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/thumbnail.md Illustrates the structure and typical values for the JSON request body when calling the video thumbnail generation API. ```json { "video_url": "https://example.com/video.mp4", "second": 30, "webhook_url": "https://your-service.com/webhook", "id": "custom-request-123" } ``` -------------------------------- ### Example JSON Request Body for Job Status Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/jobs_status.md An example JSON payload for the `/v1/toolkit/jobs/status` endpoint, specifying a `since_seconds` value to retrieve jobs from the last hour. This body is optional; if omitted, a default value is used. ```json { "since_seconds": 3600 } ``` -------------------------------- ### cURL Example: Get Job Status with Request Body Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/jobs_status.md A cURL command demonstrating how to make a POST request to the `/v1/toolkit/jobs/status` endpoint with a JSON request body. It includes the required `x-api-key` header, `Content-Type` header, and the `since_seconds` parameter in the `-d` flag. ```bash curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"since_seconds": 3600}' \ http://your-api-url/v1/toolkit/jobs/status ``` -------------------------------- ### cURL Example: Get Job Status without Request Body Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/jobs_status.md A cURL command demonstrating how to make a POST request to the `/v1/toolkit/jobs/status` endpoint without a request body. It includes the required `x-api-key` header and `Content-Type` header, using the default `since_seconds` value. ```bash curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ http://your-api-url/v1/toolkit/jobs/status ``` -------------------------------- ### Example cURL Command for Media Download API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/download.md Demonstrates how to make a POST request to the `/v1/BETA/media/download` endpoint using cURL, including setting headers (`Content-Type`, `x-api-key`) and passing the JSON request body. ```bash curl -X POST \ https://api.example.com/v1/BETA/media/download \ -H 'Content-Type: application/json' \ -H 'x-api-key: your-api-key-here' \ -d '{ "media_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "webhook_url": "https://example.com/webhook", "id": "custom-request-123", "cookie": "# Netscape HTTP Cookie File\n.youtube.com\tTRUE\t/\tFALSE\t0\tCONSENT\tYES+cb", "cloud_upload": true, "format": { "quality": "best", "resolution": "720p" }, "audio": { "extract": true, "format": "mp3" }, "thumbnails": { "download": true } }' ``` -------------------------------- ### Example cURL Command for Media Conversion API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_convert.md Demonstrates how to make a POST request to the /v1/media/convert endpoint using cURL, including the required API key header and a JSON payload. ```bash curl -X POST \ https://api.example.com/v1/media/convert \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "media_url": "https://example.com/video.mp4", "format": "avi", "video_codec": "libx264", "video_preset": "medium", "video_crf": 23, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" }' ``` -------------------------------- ### Manage Docker Compose Services Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.md These commands provide essential operations for managing Docker Compose services. They allow users to start services in detached mode, view real-time logs for debugging, gracefully stop all running containers, and force recreation of a specific service to apply environment variable changes. ```bash docker compose up -d ``` ```bash docker compose logs -f ``` ```bash docker compose stop ``` ```bash docker compose up -d --force-recreate ncat ``` -------------------------------- ### Configure Environment Variables for No Code Architect Toolkit Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.md This `.env` file defines essential environment variables for the No Code Architect Toolkit application, including application name, debug mode, domain, SSL email, and API key. It also provides commented-out examples for S3 and Google Cloud Storage configurations, allowing users to customize storage backends. ```env # The name of your application. APP_NAME=NCAToolkit # Debug mode setting. Set to `false` for production environments. APP_DEBUG=false # Your app's domain or subdomain, without the 'http://' or 'https://' prefix. APP_DOMAIN=example.com # Full application URL is automatically configured; no modification required. APP_URL=https://${APP_DOMAIN} # SSL settings SSL_EMAIL=user@example.com # API_KEY # Purpose: Used for API authentication. # Requirement: Mandatory. API_KEY=your_api_key_here # s3 Compatible Storage Env Vars # #S3_ACCESS_KEY=your_access_key #S3_SECRET_KEY=your_secret_key #S3_ENDPOINT_URL=https://your-endpoint-url #S3_REGION=your-region #S3_BUCKET_NAME=your-bucket-name # Google Cloud Storage Env Variables # # GCP_SA_CREDENTIALS # Purpose: The JSON credentials for the GCP Service Account. # Requirement: Mandatory if using GCP storage. #GCP_SA_CREDENTIALS=/path/to/your/gcp/service_account.json # GCP_BUCKET_NAME # Purpose: The name of the GCP storage bucket. # Requirement: Mandatory if using GCP storage. #GCP_BUCKET_NAME=your_gcp_bucket_name # STORAGE_PATH # Purpose: The base path for storage operations. # Default: GCP # Requirement: Optional. #STORAGE_PATH=GCP ``` -------------------------------- ### Example Requests for Image to Video Conversion API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/image/convert/image_to_video.md Illustrates how to construct and send requests to the image to video conversion API endpoint, providing both a sample JSON request body and a cURL command for execution. ```JSON { "image_url": "https://example.com/image.jpg", "length": 10, "frame_rate": 24, "zoom_speed": 5, "webhook_url": "https://example.com/webhook", "id": "request-123" } ``` ```Bash curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"image_url": "https://example.com/image.jpg", "length": 10, "frame_rate": 24, "zoom_speed": 5, "webhook_url": "https://example.com/webhook", "id": "request-123"}' \ http://your-api-endpoint/v1/image/convert/video ``` -------------------------------- ### Install Docker Engine and Compose Plugins on Ubuntu Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.md This command installs the core Docker Engine (docker-ce), its command-line interface (docker-ce-cli), containerd.io, docker-buildx-plugin, and docker-compose-plugin on an Ubuntu system. These packages are essential for running Docker containers and managing multi-container applications. ```bash sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` -------------------------------- ### Example JSON Request Body for FFmpeg Compose API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/ffmpeg/ffmpeg_compose.md An example JSON payload demonstrating the structure and typical values for a request to the `/v1/ffmpeg/compose` API endpoint. This example includes multiple inputs with options, a filter, output options, global options, metadata preferences, a webhook URL, and a unique request ID. ```JSON { "inputs": [ { "file_url": "https://example.com/video1.mp4", "options": [ { "option": "-ss", "argument": 10 }, { "option": "-t", "argument": 20 } ] }, { "file_url": "https://example.com/video2.mp4" } ], "filters": [ { "filter": "hflip" } ], "outputs": [ { "options": [ { "option": "-c:v", "argument": "libx264" }, { "option": "-crf", "argument": 23 } ] } ], "global_options": [ { "option": "-y" } ], "metadata": { "thumbnail": true, "filesize": true, "duration": true, "bitrate": true, "encoder": true }, "webhook_url": "https://example.com/webhook", "id": "unique-request-id" } ``` -------------------------------- ### Example cURL Command for MP3 Conversion API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_to_mp3.md A cURL command demonstrating how to make a POST request to the `/v1/media/convert/mp3` endpoint. It includes setting the 'x-api-key' header for authentication and sending a JSON payload with the media URL and other optional parameters. ```bash curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"media_url": "https://example.com/video.mp4", "webhook_url": "https://example.com/webhook", "id": "unique-request-id", "bitrate": "192k"}' \ https://your-api-endpoint.com/v1/media/convert/mp3 ``` -------------------------------- ### Example JSON Request for Media Download API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/download.md Illustrates a sample JSON payload for the `/v1/BETA/media/download` endpoint, including `media_url`, `webhook_url`, `id`, `cookie`, `cloud_upload`, and specific `format`, `audio`, and `thumbnails` options. ```json { "media_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "webhook_url": "https://example.com/webhook", "id": "custom-request-123", "cookie": "# Netscape HTTP Cookie File\n.youtube.com\tTRUE\t/\tFALSE\t0\tCONSENT\tYES+cb", "cloud_upload": true, "format": { "quality": "best", "resolution": "720p" }, "audio": { "extract": true, "format": "mp3" }, "thumbnails": { "download": true } } ``` -------------------------------- ### Media Download API Endpoint: /v1/BETA/media/download Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/download.md Comprehensive documentation for the `/v1/BETA/media/download` POST endpoint, detailing request parameters for media URLs, format options, audio/thumbnail/subtitle extraction, and download controls, along with immediate and webhook-based responses. ```APIDOC URL: /v1/BETA/media/download Method: POST Blueprint: v1_media_download_bp Headers: x-api-key: Required for authentication (handled by the @authenticate decorator) Body Parameters: Required Parameters: media_url: string (URI format) - The URL of the media to download Optional Parameters: webhook_url: string (URI format) - URL to receive the result when processing is complete id: string - Custom identifier for tracking the request cookie: string - Path to cookie file, URL to cookie file, or cookie string in Netscape format cloud_upload: boolean - When true (default), the downloaded media will be uploaded to cloud storage and a cloud URL will be returned. When false, the direct download URL of the media will be returned instead. Format Options (Optional): format: object quality: string - Quality specification (e.g., "best") format_id: string - Specific format ID resolution: string - Resolution specification (e.g., "720p") video_codec: string - Video codec preference audio_codec: string - Audio codec preference Audio Options (Optional): audio: object extract: boolean - Whether to extract audio format: string - Audio format (e.g., "mp3", "m4a") quality: string - Audio quality specification Thumbnail Options (Optional): thumbnails: object download: boolean - Whether to download thumbnails download_all: boolean - Whether to download all available thumbnails formats: array of string - Array of thumbnail formats to download convert: boolean - Whether to convert thumbnails embed_in_audio: boolean - Whether to embed thumbnails in audio files Subtitle Options (Optional): subtitles: object download: boolean - Whether to download subtitles languages: array of string - Array of language codes for subtitles formats: array of string - Array of subtitle formats to download Download Options (Optional): download: object max_filesize: integer - Maximum file size in bytes rate_limit: string - Download rate limit (e.g., "50K") retries: integer - Number of download retry attempts Response (Immediate, when using Webhook): code: 202 - HTTP status code id: string - Custom request identifier job_id: string - Unique identifier for the queued job message: string - Status message (e.g., "processing") pid: integer - Process ID queue_id: integer - Identifier for the queue max_queue_length: string - Maximum length of the queue queue_length: integer - Current length of the queue build_number: string - Build number of the API ``` -------------------------------- ### Example cURL Command to Concatenate Audio Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/audio/concatenate.md A command-line example using cURL to send a POST request to the `/v1/audio/concatenate` endpoint, including necessary headers and the request body. ```Bash curl -X POST \ https://api.example.com/v1/audio/concatenate \ -H 'Content-Type: application/json' \ -H 'x-api-key: your-api-key-here' \ -d '{ "audio_urls": [ { "audio_url": "https://example.com/audio1.mp3" }, { "audio_url": "https://example.com/audio2.mp3" } ], "webhook_url": "https://your-webhook-endpoint.com/callback", "id": "custom-request-id-123" }' ``` -------------------------------- ### Example JSON Success Response for Video Cut Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/cut.md An example of a successful JSON response from the /v1/video/cut endpoint, indicating the job ID, processed video URL, and various processing metrics. ```json { "endpoint": "/v1/video/cut", "code": 200, "id": "unique-request-id", "job_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6", "response": "https://example.com/processed-video.mp4", "message": "success", "pid": 12345, "queue_id": 6789, "run_time": 5.234, "queue_time": 0.123, "total_time": 5.357, "queue_length": 0, "build_number": "1.0.0" } ``` -------------------------------- ### Example Success Response from Media Conversion API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_convert.md Shows the JSON structure returned upon successful media conversion, including the URL of the converted file, job identifiers, and performance metrics. ```json { "code": 200, "id": "unique-request-id", "job_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6", "response": "https://cloud.example.com/converted-video.avi", "message": "success", "pid": 12345, "queue_id": 1234567890, "run_time": 10.234, "queue_time": 0.123, "total_time": 10.357, "queue_length": 0, "build_number": "1.0.0" } ``` -------------------------------- ### Running Pytest Commands for Toolkit Tests Source: https://github.com/stephengpope/no-code-architects-toolkit/wiki/Testing Instructions on how to install the pytest testing framework and execute tests for the No-Code Architects Toolkit. This includes commands to run all tests in the 'tests' directory and an option for more detailed output. ```bash pip install pytest ``` ```bash pytest tests/ ``` ```bash pytest -v tests/ ``` -------------------------------- ### Example cURL Request for Video Trim API Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/trim.md A cURL command demonstrating how to make a POST request to the `/v1/video/trim` endpoint, including setting the `x-api-key` header and passing the JSON request body. ```bash curl -X POST \ https://api.example.com/v1/video/trim \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "video_url": "https://example.com/video.mp4", "start": "00:01:00", "end": "00:03:00", "video_codec": "libx264", "video_preset": "faster", "video_crf": 28, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" }' ``` -------------------------------- ### Example JSON Request Body for Video Cut Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/cut.md An example JSON payload demonstrating the structure and parameters required to initiate a video cutting operation, including multiple cut segments and optional encoding settings. ```json { "video_url": "https://example.com/video.mp4", "cuts": [ { "start": "00:00:10.000", "end": "00:00:20.000" }, { "start": "00:00:30.000", "end": "00:00:40.000" } ], "video_codec": "libx264", "video_preset": "medium", "video_crf": 23, "audio_codec": "aac", "audio_bitrate": "128k", "webhook_url": "https://example.com/webhook", "id": "unique-request-id" } ``` -------------------------------- ### Media Processing API Usage Guidelines Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/download.md This section provides essential usage notes for the media processing API, covering asynchronous webhook handling, synchronous processing, fine-grained format selection, audio extraction options, thumbnail download configurations, and rate limiting controls for downloads. ```APIDOC 1. Webhook Handling: - When providing a `webhook_url`, the request will be queued and processed asynchronously - Without a `webhook_url`, the request will be processed synchronously, which may lead to longer response times 2. Format Selection: - The `format` options allow fine-grained control over the downloaded media quality - When multiple format options are specified, they are combined with a '+' separator 3. Audio Extraction: - Setting `audio.extract` to `true` will extract audio from the media - Specify `audio.format` to control the output audio format (e.g., "mp3", "m4a") 4. Thumbnail Handling: - When `thumbnails.download` is `true`, the API will download and provide URLs for thumbnails - Use `thumbnails.download_all` to retrieve all available thumbnails 5. Rate Limiting: - Use `download.rate_limit` to control download speed (e.g., "50K" for 50 KB/s) - This can help prevent IP blocking from some media sources ``` -------------------------------- ### Restart MinIO Bucket Initialization Service Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.local.minio.n8n.md These commands are used to troubleshoot issues with MinIO bucket creation and configuration. If the `minio-init` service fails or buckets are not correctly set up, restarting it can re-trigger the initialization process. Checking its logs provides insights into any errors during bucket setup. ```bash # Restart the init service docker compose -f docker-compose.local.minio.n8n.yml restart minio-init # Check init logs docker compose -f docker-compose.local.minio.n8n.yml logs minio-init ``` -------------------------------- ### Example JSON Error Responses for Video Cut Source: https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/cut.md Examples of various JSON error responses returned by the /v1/video/cut endpoint, covering scenarios such as bad requests, unauthorized access, rate limiting, and internal server errors. ```json HTTP 400 Bad Request: { "code": 400, "message": "Invalid request payload" } HTTP 401 Unauthorized: { "code": 401, "message": "Invalid API key" } HTTP 429 Too Many Requests: { "code": 429, "id": "unique-request-id", "job_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6", "message": "MAX_QUEUE_LENGTH (100) reached", "pid": 12345, "queue_id": 6789, "queue_length": 100, "build_number": "1.0.0" } HTTP 500 Internal Server Error: { "code": 500, "message": "An error occurred during video processing" } ```