{"id":31737624,"url":"https://github.com/cedarcopilot/cedar-mastra-blank","last_synced_at":"2025-10-09T09:26:55.563Z","repository":{"id":310239861,"uuid":"1039183248","full_name":"CedarCopilot/cedar-mastra-blank","owner":"CedarCopilot","description":"Cedar starter with Mastra","archived":false,"fork":false,"pushed_at":"2025-09-14T06:19:45.000Z","size":369,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-14T08:26:53.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CedarCopilot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-16T16:52:47.000Z","updated_at":"2025-09-14T06:19:49.000Z","dependencies_parsed_at":"2025-08-16T19:18:02.676Z","dependency_job_id":null,"html_url":"https://github.com/CedarCopilot/cedar-mastra-blank","commit_stats":null,"previous_names":["cedarcopilot/cedar-mastra-blank"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CedarCopilot/cedar-mastra-blank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedarCopilot%2Fcedar-mastra-blank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedarCopilot%2Fcedar-mastra-blank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedarCopilot%2Fcedar-mastra-blank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedarCopilot%2Fcedar-mastra-blank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CedarCopilot","download_url":"https://codeload.github.com/CedarCopilot/cedar-mastra-blank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedarCopilot%2Fcedar-mastra-blank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001131,"owners_count":26083022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T09:26:51.124Z","updated_at":"2025-10-09T09:26:55.556Z","avatar_url":"https://github.com/CedarCopilot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cedar-OS + Mastra Starter Template\n\nA blank starter template combining [Cedar-OS](https://cedar.ai) for the frontend AI interface and [Mastra](https://mastra.ai) for the backend agent orchestration.\n\n## Features\n\n- **🤖 AI Chat Integration**: Built-in chat workflows powered by OpenAI through Mastra agents\n- **⚡ Real-time Streaming**: Server-sent events (SSE) for streaming AI responses\n- **🎨 Beautiful UI**: Cedar-OS components with 3D effects and modern design\n- **🔧 Type-safe Workflows**: Mastra-based backend with full TypeScript support\n- **📡 Dual API Modes**: Both streaming and non-streaming chat endpoints\n\n## Quick Start\n\nThe fastest way to get started:\n\n```bash\nnpx cedar-os-cli plant-seed\n```\n\nThen select this template when prompted. This will set up the entire project structure and dependencies automatically.\n\nThis template contains the Cedar chat connected to a mastra backend to demonstrate what endpoints need to be implemented.\n\nFor more details, see the [Cedar Getting Started Guide](https://docs.cedarcopilot.com/getting-started/getting-started).\n\n## Manual Setup\n\n### Prerequisites\n\n- Node.js 18+\n- OpenAI API key\n- pnpm (recommended) or npm\n\n### Installation\n\n1. **Clone and install dependencies:**\n\n```bash\ngit clone \u003crepository-url\u003e\ncd cedar-mastra-starter\npnpm install \u0026\u0026 cd src/backend \u0026\u0026 pnpm install \u0026\u0026 cd ../..\n```\n\n2. **Set up environment variables:**\n   Create a `.env` file in the root directory:\n\n```env\nOPENAI_API_KEY=your-openai-api-key-here\n```\n\n3. **Start the development servers:**\n\n```bash\nnpm run dev\n```\n\nThis runs both the Next.js frontend and Mastra backend concurrently:\n\n- Frontend: http://localhost:3000\n- Backend API: http://localhost:4111\n\n## Project Architecture\n\n### Frontend (Next.js + Cedar-OS)\n\n- **Simple Chat UI**: See Cedar OS components in action in a pre-configured chat interface\n- **Cedar-OS Components**: Cedar-OS Components installed in shadcn style for local changes\n- **Tailwind CSS, Typescript, NextJS**: Patterns you're used to in any NextJS project\n\n### Backend (Mastra)\n\n- **Chat Workflow**: Example of a Mastra workflow – a chained sequence of tasks including LLM calls\n- **Streaming Utils**: Examples of streaming text, status updates, and objects like tool calls\n- **API Routes**: Examples of registering endpoint handlers for interacting with the backend\n\n## API Endpoints (Mastra backend)\n\n### Non-streaming Chat\n\n```bash\nPOST /chat/execute-function\nContent-Type: application/json\n\n{\n  \"prompt\": \"Hello, how can you help me?\",\n  \"temperature\": 0.7,\n  \"maxTokens\": 1000,\n  \"systemPrompt\": \"You are a helpful assistant.\"\n}\n```\n\n### Streaming Chat\n\n```bash\nPOST /chat/execute-function/stream\nContent-Type: application/json\n\n{\n  \"prompt\": \"Tell me a story\",\n  \"temperature\": 0.7\n}\n```\n\nReturns Server-Sent Events with:\n\n- **JSON Objects**: `{ type: 'stage_update', status: 'update_begin', message: 'Generating response...'}`\n- **Text Chunks**: Streamed AI response text\n- **Completion**: `event: done` signal\n\n## Development\n\n### Running the Project\n\n```bash\n# Start both frontend and backend\nnpm run dev\n\n# Run frontend only\nnpm run dev:next\n\n# Run backend only\nnpm run dev:mastra\n```\n\n## Learn More\n\n- [Cedar-OS Documentation](https://docs.cedarcopilot.com/)\n- [Mastra Documentation](https://mastra.ai/docs)\n- [Next.js Documentation](https://nextjs.org/docs)\n\n## License\n\nMIT License - see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedarcopilot%2Fcedar-mastra-blank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedarcopilot%2Fcedar-mastra-blank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedarcopilot%2Fcedar-mastra-blank/lists"}