### Start Development Server Source: https://github.com/dorasto/sayr/blob/main/apps/start/README.md Use this command to start the development server and run the application locally. ```bash pnpm start ``` -------------------------------- ### Install @sayrio/public SDK Source: https://github.com/dorasto/sayr/blob/main/packages/public/src/react/README.md Install the core SDK which includes the React hooks. ```bash npm install @sayrio/public ``` ```bash pnpm add @sayrio/public ``` -------------------------------- ### Restore Development Environment Source: https://github.com/dorasto/sayr/blob/main/BUN_MIGRATION_SUMMARY.md Commands to install dependencies and start the development environment from the repository root. ```bash pnpm install --frozen-lockfile pnpm run dev ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/dorasto/sayr/blob/main/README.md Command to start the TanStack Start frontend application in development mode. ```bash pnpm -F start dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/dorasto/sayr/blob/main/packages/database/README.md Run this command from the repository root to install all necessary project dependencies. ```bash bun install ``` -------------------------------- ### Start Marketing Site Development Server Source: https://github.com/dorasto/sayr/blob/main/README.md Command to start the Astro marketing site in development mode. ```bash pnpm -F marketing dev ``` -------------------------------- ### Installation Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Install the Sayr Public SDK using npm or pnpm. ```APIDOC ## Installation ```bash npm install @sayrio/public ``` or ```bash pnpm add @sayrio/public ``` ``` -------------------------------- ### Install pnpm, Bun, and Verify Versions Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/local-development.mdx Installs pnpm globally, Bun using its official script, and then verifies the installed versions of Node.js, pnpm, and Bun. Ensure Bun is installed as a system-level binary. ```bash npm install -g pnpm curl -fsSL https://bun.sh/install | bash node --version pnpm --version bun --version ``` -------------------------------- ### Start Backend Development Server Source: https://github.com/dorasto/sayr/blob/main/README.md Command to start the backend API server in development mode. ```bash pnpm -F backend dev ``` -------------------------------- ### Install and Verify Bun Source: https://github.com/dorasto/sayr/blob/main/BUN_MIGRATION_SUMMARY.md Commands to install the Bun runtime and verify the current version. ```bash curl -fsSL https://bun.sh/install | bash bun --version ``` -------------------------------- ### Install Sayr Public SDK using pnpm Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Install the Sayr public SDK using pnpm. ```bash pnpm add @sayrio/public ``` -------------------------------- ### Install Sayr Public SDK using npm Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Install the Sayr public SDK using npm. ```bash npm install @sayrio/public ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/README.md Run this command in the project root to install all necessary dependencies listed in 'package.json'. ```sh pnpm install ``` -------------------------------- ### Start Local Development Server Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/README.md This command starts a local development server, typically accessible at 'localhost:4321', for previewing your site during development. ```sh pnpm dev ``` -------------------------------- ### Release Workflow Example Source: https://github.com/dorasto/sayr/blob/main/RELEASES.md An example showing the outcome of a patch release triggered by a PR label. ```bash # PR #123: "fix: resolve websocket connection issue" # Label: release:patch # Latest tag: v0.0.0 # After merge: # - New tag: v0.0.1 # - Release title: "fix: resolve websocket connection issue" # - Release notes: PR body content # - Docker images: latest, v0.0.1, v0.0, v0 # - Deployed to Railway ``` -------------------------------- ### Per-App Development Source: https://github.com/dorasto/sayr/blob/main/CLAUDE.md Commands to start development servers for individual applications within the monorepo. ```bash pnpm -F backend dev # Backend only pnpm -F web dev # Frontend only pnpm -F worker dev # GitHub webhook processor only ``` -------------------------------- ### Create Astro Project with Basics Template Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/README.md Use this command to initialize a new Astro project with the 'basics' starter template. Ensure you have pnpm installed. ```sh pnpm create astro@latest -- --template basics ``` -------------------------------- ### Link GitHub Installation to Organization Source: https://context7.com/dorasto/sayr/llms.txt Links a GitHub App installation to your organization. Requires the installation ID obtained from GitHub. ```typescript // Link GitHub installation to organization // POST /api/internal/v1/organization/:orgId/github/link await fetch("/api/internal/v1/organization/org_abc123/github/link", { method: "POST", headers: { "Content-Type": "application/json", "Cookie": sessionCookie }, body: JSON.stringify({ installationId: 12345678 }) }); ``` -------------------------------- ### Verify Bun Installation Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/local-development.mdx Check if Bun is installed and accessible in the system's PATH, and reinstall if necessary. ```bash # Check Bun installation which bun bun --version ``` ```bash # If not found, reinstall curl -fsSL https://bun.sh/install | bash source ~/.bashrc # or ~/.zshrc ``` -------------------------------- ### Development Commands Source: https://github.com/dorasto/sayr/blob/main/AGENTS.md Commands for starting various applications within the monorepo using pnpm. ```bash pnpm dev # Start all apps (backend :5468, start :3000, marketing :3002) pnpm dev:op # Start with 1Password secret injection pnpm -F backend dev # Backend only pnpm -F start dev # Frontend (TanStack Start) only pnpm -F marketing dev # Marketing site only pnpm -F worker dev # GitHub webhook processor only ``` -------------------------------- ### Commit Message Examples Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/Guidelines/pull-requests.md Examples of commit messages using various types and scopes. ```bash # Feature feat(tasks): add task filtering by status # Bug fix fix(auth): resolve redirect loop on login # With scope and body feat(api): add rate limiting to public endpoints Implements token bucket algorithm with configurable limits per endpoint. Default is 100 requests per minute. Closes #123 ``` -------------------------------- ### Install React-Query Dependencies Source: https://github.com/dorasto/sayr/blob/main/apps/start/README.md Add React-Query and its devtools to your project using pnpm. ```bash pnpm add @tanstack/react-query @tanstack/react-query-devtools ``` -------------------------------- ### Start Specific Sayr Applications Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/local-development.mdx Starts individual applications within the Sayr monorepo in development mode. Use this command to run only the backend API, frontend, or marketing site. ```bash # Backend API only pnpm -F backend dev # Frontend only pnpm -F start dev # Marketing/docs site only pnpm -F marketing dev ``` -------------------------------- ### Install Shadcn Components Source: https://github.com/dorasto/sayr/blob/main/AGENTS.md Command to add new UI components to the project using the Shadcn CLI. ```bash pnpm dlx shadcn@latest add ``` -------------------------------- ### Browser Usage (No Bundler) Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Example of how to use the Sayr SDK in a browser environment without a bundler. ```APIDOC ## Browser Usage (No Bundler) ```html ``` ``` -------------------------------- ### Run Development Server Source: https://github.com/dorasto/sayr/blob/main/CLAUDE.md Starts all applications, including the backend and web frontend. Use `pnpm dev:op` for 1Password secret injection. ```bash pnpm dev # Start all apps (backend :5468, web :3001) pnpm dev:op # Start with 1Password secret injection ``` -------------------------------- ### Run Vitest Tests for Frontend Source: https://github.com/dorasto/sayr/blob/main/README.md Command to run tests for the 'start' frontend application using Vitest. ```bash pnpm -F start test ``` -------------------------------- ### TabbedDialog Example Component Source: https://github.com/dorasto/sayr/blob/main/packages/ui/src/components/tomui/README.md Imports and renders the TabbedDialogExample component for a full demonstration. This example showcases various layouts, footers, and responsive behaviors. ```tsx import { TabbedDialogExample } from "@repo/ui/components/tomui/tabbed-dialog"; export default function MyPage() { return ; } ``` -------------------------------- ### Download Nginx Configuration Files Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/get-started.md Fetch the necessary Nginx configuration files for the reverse proxy setup. Ensure the 'apps/nginx' directory exists. ```bash mkdir -p apps/nginx curl -o apps/nginx/Dockerfile https://raw.githubusercontent.com/dorasto/sayr/main/docker/cloud/nginx/Dockerfile curl -o apps/nginx/nginx.conf.template https://raw.githubusercontent.com/dorasto/sayr/main/docker/cloud/nginx/nginx.conf.template curl -o apps/nginx/proxy.conf https://raw.githubusercontent.com/dorasto/sayr/main/docker/cloud/nginx/proxy.conf ``` -------------------------------- ### Start Sayr Containers Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/get-started.md Launch all Sayr services in detached mode using Docker Compose. ```bash docker compose up -d ``` -------------------------------- ### Implement BookmarkButton Usage Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/adding-features.md Example of integrating the BookmarkButton component into a task card or detail page. ```tsx // In a task detail page or task card import { BookmarkButton } from "@/components/tasks/task/bookmark-button"; function TaskCard({ task, organization }) { return (

{task.title}

); } ``` -------------------------------- ### Configure Database Connection URL Source: https://github.com/dorasto/sayr/blob/main/packages/database/README.md Example of a .env file entry for the DATABASE_URL. Ensure this file is not committed to version control. ```dotenv DATABASE_URL=postgres://postgres:password@localhost:5432/sayr_dev ``` -------------------------------- ### Create and Manage SSE Connection Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Shows how to establish an SSE connection for public events and provides an example of how to close the connection when it's no longer needed. ```typescript const conn = Sayr.sse(eventsUrl, { UPDATE_TASK: () => {}, }); conn.close(); ``` -------------------------------- ### Astro Configuration for Sidebar Topics Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/documentation.md Example configuration for `starlight-sidebar-topics` in `astro.config.mjs` to manage sidebar navigation structure. ```javascript starlightSidebarTopics([ { label: "Documentation", link: "/docs/", icon: "open-book", id: "docs", items: [ { label: "Getting Started", items: [ { label: "Introduction", slug: "docs" }, { label: "Quick Start", slug: "docs/quick-start" }, ], }, { label: "Tasks", autogenerate: { directory: "/docs/tasks" }, collapsed: true, }, { label: "Organize", autogenerate: { directory: "/docs/organize" }, collapsed: true, }, { label: "Visibility & Pages", autogenerate: { directory: "/docs/visibility" }, collapsed: true, }, { label: "Account", autogenerate: { directory: "/docs/account" }, collapsed: true, }, { label: "Organizations", autogenerate: { directory: "/docs/organizations" }, collapsed: true, }, // ... ], }, ]), ``` -------------------------------- ### Run Database Migrations Source: https://github.com/dorasto/sayr/blob/main/packages/database/README.md Applies pending SQL migration files to the database. This command should be used after initial setup and whenever schema changes are applied. ```bash bun run migrate ``` ```bash bunx drizzle-kit migrate ``` -------------------------------- ### Markdown Internal Link Example Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/documentation.md Create internal links using relative paths starting with '/docs/'. ```markdown See the [Architecture Overview](/docs/contributing/architecture) ``` -------------------------------- ### Run App in Internal Mode with 1Password Source: https://github.com/dorasto/sayr/blob/main/ENVIRONMENT.md Resolves secrets from 1Password, generates .env.local files, and starts all development servers. This command will prompt for authentication with 1Password. ```bash pnpm dev:op ``` -------------------------------- ### Set up React-Query Client and Provider Source: https://github.com/dorasto/sayr/blob/main/apps/start/README.md Initialize a QueryClient and wrap your application with QueryClientProvider in main.tsx. ```tsx import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; // ... const queryClient = new QueryClient(); // ... if (!rootElement.innerHTML) { const root = ReactDOM.createRoot(rootElement); root.render( ); } ``` -------------------------------- ### Get GitHub Connections Source: https://context7.com/dorasto/sayr/llms.txt Retrieves a list of all GitHub connections for a given organization, including installed applications and synced repositories. ```typescript // Get GitHub connections for org // GET /api/internal/v1/organization/:orgId/connections/github const connections = await fetch("/api/internal/v1/organization/org_abc123/connections/github", { headers: { "Cookie": sessionCookie } }).then(r => r.json()); // Returns installations and synced repositories ``` -------------------------------- ### Sayr Integration Documentation String Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/integrations/building-integrations.md Defines the end-user documentation for the Sayr integration, explaining its functionality, setup steps for both cloud and self-hosted environments, and Discord bot commands. ```typescript export const docs = ` Sayr integrates with Discord via a slash-command bot, letting your team create tasks without leaving Discord. - **\`/sayr create\`** — Opens a form to submit a new task directly from any channel. - **Templates** — Configure multiple task templates, each with custom questions and default values. --- ### Setup (Sayr Cloud) 1. Invite the bot to your server. 2. Copy your Server ID and Default Channel ID. 3. Paste them into the Settings page. 4. Create at least one template. ### Setup (Self-hosted) 1. Create a Discord application and add a Bot. 2. Copy the bot token into your environment configuration. 3. Follow the cloud setup steps above. `; ``` -------------------------------- ### Browser Usage (No Bundler) Source: https://github.com/dorasto/sayr/blob/main/packages/public/README.md Include the SDK directly in HTML using a module script tag from a CDN like esm.sh. Demonstrates fetching an organization and setting up SSE. ```html ``` -------------------------------- ### Start Worker Development Server Source: https://github.com/dorasto/sayr/blob/main/README.md Command to start the background job processor (worker) in development mode. ```bash pnpm -F worker dev ``` -------------------------------- ### TanStack Start Frontend Source: https://github.com/dorasto/sayr/blob/main/README.md Configuration for the TanStack Start frontend application, usually running on port 3000. ```typescript apps/start/ # TanStack Start frontend (port 3000) ``` -------------------------------- ### Initialize Variables and DOM Elements Source: https://github.com/dorasto/sayr/blob/main/apps/backend/public/render/file-test.html Sets up global variables for selected files and preview data, and gets references to necessary DOM elements for file input, preview display, submit button, and upload log. ```javascript let selectedFiles = []; let previewBlobs = []; const fileInput = document.getElementById("file-input"); const previewGrid = document.getElementById("preview-grid"); const submitBtn = document.getElementById("submit-btn"); const uploadLog = document.getElementById("upload-log"); ``` -------------------------------- ### Build and Quality Commands Source: https://github.com/dorasto/sayr/blob/main/AGENTS.md Commands for building the project, linting, formatting, and type checking. ```bash pnpm build # Build all apps pnpm lint # Run Biome linting pnpm lint:fix # Fix lint issues pnpm format-write # Format with Biome (or: biome format --write .) pnpm check-types # TypeScript type checking (turbo check-types) ``` -------------------------------- ### Local Preview Command Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/documentation.md Command to run a local preview of the documentation site from the repository root. ```bash # From repository root pnpm -F marketing dev # Opens at http://localhost:3002 ``` -------------------------------- ### GET /org/labels-categories Source: https://context7.com/dorasto/sayr/llms.txt Fetch organization labels and categories for filtering tasks. ```APIDOC ## GET /org/labels/list ### Description Fetch organization labels. ### Parameters #### Path Parameters - **orgSlug** (string) - Required - The organization slug ## GET /org/categories/list ### Description Fetch organization categories. ### Parameters #### Path Parameters - **orgSlug** (string) - Required - The organization slug ``` -------------------------------- ### GET /tasks/:id Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/overview.md Retrieve details for a specific task by its ID. ```APIDOC ## GET /tasks/:id ### Description Get task details. ### Method GET ### Endpoint https://api.sayr.io/tasks/:id ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the task. ``` -------------------------------- ### GET /organizations/:slug/tasks Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/overview.md List all tasks associated with a specific organization. ```APIDOC ## GET /organizations/:slug/tasks ### Description List tasks for a specific organization. ### Method GET ### Endpoint https://api.sayr.io/organizations/:slug/tasks ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier for the organization. ``` -------------------------------- ### GET /organizations Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/overview.md Retrieve a list of organizations associated with the authenticated user. ```APIDOC ## GET /organizations ### Description List all organizations accessible to the authenticated user. ### Method GET ### Endpoint https://api.sayr.io/organizations ``` -------------------------------- ### Configure Core Environment Variables Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/get-started.md Set up essential environment variables for your Sayr instance, including the root domain, admin URL, project name, and runtime environment. ```bash # Your root domain (subdomains are derived from this) VITE_ROOT_DOMAIN=sayr.example.com # Full URL to the admin panel VITE_URL_ROOT=https://admin.sayr.example.com # Display name for your instance VITE_PROJECT_NAME=Sayr # Runtime environment APP_ENV=production ``` -------------------------------- ### Initialize Sayr client and render data Source: https://github.com/dorasto/sayr/blob/main/apps/backend/public/render/test.html Handles API key authentication via localStorage and renders user and organization data to the DOM. ```javascript import Sayr from "https://esm.sh/@sayrio/public"; const STORAGE_KEY = "sayr_api_key_local_test"; function getToken() { let token = localStorage.getItem(STORAGE_KEY); if (!token) { token = prompt("Enter your Sayr API key"); if (token) { localStorage.setItem(STORAGE_KEY, token); } } return token; } const token = getToken(); if (!token) { document.body.innerHTML = "

Missing API key

"; throw new Error("Missing API key"); } Sayr.client.setToken(token); const app = document.getElementById("app"); function renderError(message) { app.innerHTML = `

Error

${message}

`; } function renderUser(user) { const { id, name, email, image, createdAt } = user; app.innerHTML = `

${name}

${email}
User ID: ${id}
Joined ${new Date(createdAt).toLocaleDateString()}

Organizations

`; } function renderOrganizations(orgs) { const container = document.getElementById("orgs"); if (!orgs.length) { container.innerHTML = `

No organizations

`; return; } container.innerHTML = orgs .map( (org) => `
${org.name}
${org.slug}
${org.bannerImg ? `` : "" }
${org.description ?? ""}
Created ${new Date(org.createdAt).toLocaleDateString()} · Updated ${new Date(org.updatedAt).toLocaleDateString()}

Members (${org.members.length})

${org.members .map( (m) => `
${m.user.name}
`, ) .join("")}
${org.members .map( (m) => `${m.user.name} (joined ${new Date( m.createdAt, ).toLocaleDateString()})`, ) .join(", ")}
`, ) .join(""); } try { const meRes = await Sayr.me.get(); if (meRes.success) renderUser(meRes.data); const orgRes = await Sayr.me.organizations(); if (orgRes.success) renderOrganizations(orgRes.data); } catch (err) { console.error(err); renderError( "Failed to load user or organizations. Check API key.", ); } ``` -------------------------------- ### Basic Usage (REST) Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Demonstrates basic usage of the SDK to fetch a public organization using the `Sayr.org` alias. ```APIDOC ## Usage ### Basic Usage (REST) Fetch a public organization. `Sayr.org` is an alias for the latest API version (`v1`). ```ts import Sayr from "@sayrio/public"; const res = await Sayr.org.get("acme"); if (!res.success) { console.error(res.error); return; } console.log(res.data.name); ``` You can also use the versioned API explicitly: ```ts const res = await Sayr.v1.org.get("acme"); ``` ``` -------------------------------- ### GET /api/internal/v1/integrations/ui/:id/pages Source: https://context7.com/dorasto/sayr/llms.txt Retrieves UI configuration pages for a specific integration. ```APIDOC ## GET /api/internal/v1/integrations/ui/:id/pages ### Description Fetches integration UI pages used for configuration. ### Method GET ### Endpoint /api/internal/v1/integrations/ui/:id/pages ### Parameters #### Path Parameters - **id** (string) - Required - The integration identifier. ``` -------------------------------- ### GET /org/events Source: https://context7.com/dorasto/sayr/llms.txt Subscribe to real-time updates for an organization using Server-Sent Events. ```APIDOC ## GET /org/events ### Description Subscribe to real-time updates for an organization using Server-Sent Events (SSE). ### Parameters #### Path Parameters - **eventsUrl** (string) - Required - The URL obtained from the organization details endpoint ``` -------------------------------- ### Preview Production Build Locally Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/README.md Use this command to preview your production build locally before deploying it. It serves the contents of the './dist/' folder. ```sh pnpm preview ``` -------------------------------- ### GET /org/comments/list Source: https://context7.com/dorasto/sayr/llms.txt Fetch public comments for a specific task with pagination support. ```APIDOC ## GET /org/comments/list ### Description Fetch public comments for a specific task with pagination. ### Parameters #### Path Parameters - **orgSlug** (string) - Required - The organization slug - **taskShortId** (number) - Required - The task short ID #### Query Parameters - **page** (number) - Optional - Page number - **limit** (number) - Optional - Number of items per page ### Response #### Success Response (200) - **items** (array) - List of comment objects - **pagination** (object) - Pagination metadata ``` -------------------------------- ### Open Drizzle Studio for Database Exploration Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/local-development.mdx Launches Drizzle Studio, a visual interface for exploring and managing your database, specifically for the @repo/database package. ```bash pnpm -F @repo/database db:studio ``` -------------------------------- ### GET /organizations/:slug Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/overview.md Retrieve detailed information for a specific organization by its slug. ```APIDOC ## GET /organizations/:slug ### Description Get organization details. ### Method GET ### Endpoint https://api.sayr.io/organizations/:slug ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier for the organization. ``` -------------------------------- ### Scaffold a New Integration Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/integrations/building-integrations.md Use the CLI to generate a new integration skeleton in the services directory. ```bash pnpm create-integration "My Integration" --author "Your Name" --description "What it does" ``` -------------------------------- ### View Container Logs Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/get-started.md Check the logs of specific containers to troubleshoot startup issues. ```bash docker compose logs start docker compose logs backend docker compose logs github-worker ``` -------------------------------- ### Markdown External Link Example Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/documentation.md Create external links using full URLs. ```markdown Learn more at [Starlight docs](https://starlight.astro.build/) ``` -------------------------------- ### Configure Backend Environment Variables Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/architecture.md Environment variables required for the backend application setup. ```env DATABASE_URL=postgresql://... STORAGE_URL=http://localhost:9000 INTERNAL_SECRET=... ``` -------------------------------- ### Build Production Site Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/README.md Executes the build process to create optimized production-ready files in the './dist/' directory. ```sh pnpm build ``` -------------------------------- ### Configure PostgreSQL Database Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/get-started.md Provide the connection string for your PostgreSQL database. Ensure the database is accessible by the Sayr backend container. ```bash # PostgreSQL connection string DATABASE_URL=postgresql://user:password@host:5432/sayr ``` -------------------------------- ### Configure Frontend Environment Variables Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/architecture.md Environment variables required for the frontend application setup. ```env VITE_URL_ROOT=http://admin.app.localhost:3000 VITE_ROOT_DOMAIN=app.localhost VITE_PROJECT_NAME=Sayr ``` -------------------------------- ### Create Integration Scaffolding Source: https://github.com/dorasto/sayr/blob/main/README.md Use this command to generate a new integration within the project. It requires the integration name, author name, and a brief description. ```bash pnpm create-integration -a -d ``` -------------------------------- ### Use Sayr SDK in Browser without Bundler Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/api/sdk.mdx Demonstrates how to import and use the Sayr SDK directly in a browser environment using an ES module import from esm.sh. ```html ``` -------------------------------- ### Install TanStack Store Dependency Source: https://github.com/dorasto/sayr/blob/main/apps/start/README.md Add TanStack Store to your project dependencies using pnpm. ```bash pnpm add @tanstack/store ``` -------------------------------- ### Markdown Table Example Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/contributing/documentation.md Structure information using markdown tables with defined columns and rows. ```markdown | Column 1 | Column 2 | Column 3 | |----------|----------|----------| | Data | Data | Data | ``` -------------------------------- ### Integration README Source: https://github.com/dorasto/sayr/blob/main/README.md Provides integration-specific documentation in Markdown format. ```markdown README.md # Integration-specific docs ``` -------------------------------- ### Enable Multiple OAuth Providers Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/authentication.md Combine environment variables to enable multiple authentication methods simultaneously. ```bash GITHUB_CLIENT_ID=... GITHUB_CLIENT_SECRET=... DISCORD_CLIENT_ID=... DISCORD_CLIENT_SECRET=... ``` -------------------------------- ### GET /api/internal/v1/integrations/list Source: https://context7.com/dorasto/sayr/llms.txt Retrieves a list of available integrations for a specific organization, including their enabled status. ```APIDOC ## GET /api/internal/v1/integrations/list ### Description Retrieves a list of available integrations for an organization. ### Method GET ### Endpoint /api/internal/v1/integrations/list ### Parameters #### Query Parameters - **orgId** (string) - Required - The unique identifier of the organization. ``` -------------------------------- ### Get Labels and Categories with Public SDK Source: https://context7.com/dorasto/sayr/llms.txt Fetches organization-wide labels and categories for task filtering. ```typescript import Sayr from "@repo/public"; async function getLabelsAndCategories() { // Fetch labels const labelsResult = await Sayr.org.labels.list("my-organization"); if (labelsResult.success) { labelsResult.data.items.forEach(label => { console.log(`Label: ${label.name} (${label.color})`); }); } // Fetch categories const categoriesResult = await Sayr.org.categories.list("my-organization"); if (categoriesResult.success) { categoriesResult.data.items.forEach(category => { console.log(`Category: ${category.name}`); console.log(` Color: ${category.color}`); console.log(` Icon: ${category.icon}`); }); } } ``` -------------------------------- ### Configure Axiom Observability Source: https://github.com/dorasto/sayr/blob/main/apps/marketing/src/content/docs/docs/self-hosting/get-started.md Set these environment variables if you are using Axiom for log aggregation. Self-hosted instances log to the console by default. ```bash AXIOM_OTEL_TOKEN= AXIOM_OTEL_DATASET= AXIOM_OTEL_DOMAIN= ```