This directory contains embeddable widgets that can be displayed in iframes on external websites.
/embed/[companyId]/projectsDisplays a company’s projects in a responsive grid layout.
File: [companyId]/projects.astro
Features:
Usage:
<iframe
src="https://workreels.ai/embed/COMPANY_ID/projects"
width="100%"
height="600"
frameborder="0"
title="WorkReels Projects">
</iframe>
All embed routes use EmbedLayout.astro which provides:
Simplified version of CompanyProjectsGrid designed for embeds.
Key differences from CompanyProjectsGrid:
companyId instead of slug for clarityEmbed routes use these API endpoints:
Company Metadata
GET /company/{companyId}
Returns: company info (name, logo, etc.)
Projects List
GET /company/{companyId}/projects?status=in_progress,completed&limit=12&offset=0
Returns: paginated projects list
To add a new embed type (e.g., /embed/[companyId]/timeline):
[companyId]/timeline.astroEmbedLayout for consistent structureExample structure:
---
import EmbedLayout from "../../../layouts/EmbedLayout.astro";
import YourComponent from "../../../components/YourComponent.tsx";
export const prerender = false;
const companyId = Astro.params.companyId;
// Fetch data, handle errors
---
<EmbedLayout title="..." description="...">
<main class="p-4">
{/* Your content */}
</main>
</EmbedLayout>
Test locally:
npm run dev
Visit:
http://localhost:4321/embed-demo?company=YOUR_COMPANY_IDhttp://localhost:4321/embed/YOUR_COMPANY_ID/projectsSee root-level documentation:
EMBED_DOCUMENTATION.md - Complete usage guideEMBED_QUICKSTART.md - Quick start for all audiencesEMBED_FEATURE_SUMMARY.md - Technical overviewEMBED_CHECKLIST.md - Launch checklistembed-example.html - Working HTML example