{"id":32645536,"url":"https://github.com/agoodway/star-support-demo","last_synced_at":"2026-04-15T23:32:28.381Z","repository":{"id":307919964,"uuid":"1031082686","full_name":"agoodway/star-support-demo","owner":"agoodway","description":"AI powered support and Q\u0026A bot powered by Astro","archived":false,"fork":false,"pushed_at":"2025-08-03T14:10:35.000Z","size":164245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T14:37:50.060Z","etag":null,"topics":["astro","fireworksai","support","vercel-ai-sdk","widget"],"latest_commit_sha":null,"homepage":"https://star-support-demo.vercel.app","language":"MDX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agoodway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-03T01:07:04.000Z","updated_at":"2025-08-03T14:12:49.000Z","dependencies_parsed_at":"2025-08-03T14:48:04.379Z","dependency_job_id":null,"html_url":"https://github.com/agoodway/star-support-demo","commit_stats":null,"previous_names":["agoodway/star-support","agoodway/star-support-demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/agoodway/star-support-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoodway%2Fstar-support-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoodway%2Fstar-support-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoodway%2Fstar-support-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoodway%2Fstar-support-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agoodway","download_url":"https://codeload.github.com/agoodway/star-support-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoodway%2Fstar-support-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31865055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["astro","fireworksai","support","vercel-ai-sdk","widget"],"created_at":"2025-10-31T04:14:21.944Z","updated_at":"2026-04-15T23:32:28.370Z","avatar_url":"https://github.com/agoodway.png","language":"MDX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Star Support Demo\n\nThis is a demonstration of the [Star Support](https://github.com/agoodway/star-support) AI-powered documentation assistant widget, integrated with a fork of the official Astro documentation site.\n\n## About This Demo\n\n- **Based on**: Fork of the [Astro Docs Starlight site](https://github.com/withastro/docs)\n- **Modified**: Removed all non-English language content to simplify the demo\n- **Purpose**: Showcase Star Support widget capabilities with real documentation content\n\n## What is Star Support?\n\nStar Support is a TypeScript widget library for creating AI-powered question and support bots that understand your documentation content. It uses a simplified RAG (Retrieval-Augmented Generation) approach:\n\n- **Pre-built Index**: A build script generates AI-powered summaries of each document\n- **Smart Document Selection**: AI selects the most relevant documents per query\n- **Framework Agnostic**: Works with any web application\n- **Vercel AI SDK**: Uses Fireworks AI provider by default (can be modified for other providers)\n\n## Quick Start\n\n```bash\ngit clone https://github.com/agoodway/star-support-demo\ncd star-support-demo\npnpm install\ncp .env.example .env\n# Configure your AI_API_KEY in .env\n\n# Build the widget first (required)\ncd widget \u0026\u0026 npm install \u0026\u0026 npm run build \u0026\u0026 cd ..\ncp -r widget/dist/* public/widget/dist/\n\n# Generate the search index\npnpm run build-star-support-index\n\n# Start the dev server\npnpm run dev\n```\n\nVisit `http://localhost:4321` to see the Star Support widget in action on the Astro documentation.\n\n## Configuration\n\nSet environment variables in `.env`:\n\n```bash\n# AI Provider (Required)\nAI_API_KEY=\"fw_your_fireworks_api_key\"\nAI_MODEL_NAME=\"accounts/fireworks/models/llama-v3p1-8b-instruct\"\n\n# Widget Security (Recommended to prevent API abuse)\nSTAR_SUPPORT_AUTH_KEY=\"your_secret_key\"\n\n# Search Configuration (Optional)\nMAX_SEARCH_RESULTS=\"4\"  # Number of documents to use for answers (default: 4)\n\n# Content Path Configuration (Required)\nCONTENT_PATH=\"src/content/docs/en\"  # Base path where your content files are located\n```\n\n## Demo Features\n\n### Try These Questions\n\nTest the AI assistant with these documentation-focused questions:\n\n1. **\"How do I add TypeScript to my Astro project?\"**\n2. **\"What's the difference between .astro and .md files?\"**\n3. **\"How do I fetch data from an API in Astro?\"**\n4. **\"Can I use React components in Astro?\"**\n5. **\"How do I set up environment variables?\"**\n6. **\"What's the best way to handle images in Astro?\"**\n7. **\"How do I enable server-side rendering?\"**\n8. **\"How do I deploy my Astro site to Vercel?\"**\n9. **\"How do I create dynamic routes?\"**\n10. **\"What are Astro integrations and how do I install them?\"**\n11. **\"How do I use content collections for my blog?\"**\n12. **\"How do I optimize my Astro site for SEO?\"**\n\n### Widget Integration\n\nThe widget is integrated in the site footer (`src/components/starlight/Footer.astro`):\n\n```astro\n\u003cstar-support\n  api-base-url=\"\"\n  auth-key={import.meta.env.STAR_SUPPORT_AUTH_KEY || ''}\n  theme=\"auto\"\n  position=\"bottom-right\"\n  welcome-message=\"Hi! How can I help you with Astro today?\"\n  bot-name=\"Astro AI\"\n  header-title=\"Astro Chat\"\n  topic-context=\"Astro framework documentation - help users understand and use the Astro web framework\"\n  suggested-questions={JSON.stringify([\n    \"How do I install Astro on my Mac?\", \n    \"Where can I deploy my Astro app?\", \n    \"Can I use React components with Astro?\"\n  ])}\u003e\n\u003c/star-support\u003e\n```\n\n## Architecture\n\nThis demo uses Astro's Pages API to serve the chat backend, but the Star Support widget is designed to work with any backend that implements the required API interface. You can use Node.js, Python, Elixir, or any other server technology as long as it provides the expected endpoints and response format.\n\n```\nstar-support-demo/\n├── widget/                     # Star Support widget library (future npm package)\n│   ├── src/\n│   │   ├── star-support.ts    # Main widget class\n│   │   ├── icons.ts           # SVG icon definitions\n│   │   ├── types.ts           # TypeScript interfaces\n│   │   └── styles.css         # Widget styles\n│   ├── dist/                  # Built files (generated)\n│   ├── build.js              # Custom bundler script\n│   └── package.json          # Widget package configuration\n├── src/pages/api/star-support/\n│   └── chat.ts               # Chat API endpoint (Astro Pages API)\n├── scripts/\n│   └── build-index.mjs       # Documentation indexer\n└── public/\n    ├── star-support-index.json  # Generated search index\n    └── widget/dist/            # Widget files served to browser\n```\n\n## Development\n\n### Building the Widget\n\n**Note**: The Star Support widget is currently bundled with this demo but will be published as a standalone npm package in the future.\n\nTo build the widget locally:\n\n```bash\n# Install widget dependencies (only needed once)\ncd widget \u0026\u0026 npm install \u0026\u0026 cd ..\n\n# Build and copy widget to public directory\ncd widget \u0026\u0026 npm run build \u0026\u0026 cd ..\ncp -r widget/dist/* public/widget/dist/\n```\n\n### Widget Build Process\n\nThe widget uses a custom build script (`widget/build.js`) that:\n1. Compiles TypeScript to JavaScript\n2. Bundles all imports (icons, styles) into a single file\n3. Outputs browser-ready ES modules\n\nThis bundling approach avoids module resolution issues when serving the widget as static files.\n\n### Regenerating the Documentation Index\n\n```bash\npnpm run build-star-support-index\n```\n\n### Running the Demo\n\n```bash\npnpm run dev\n```\n\n### Common Development Tasks\n\n1. **Modify widget code**: Edit files in `widget/src/`, then rebuild:\n   ```bash\n   cd widget \u0026\u0026 npm run build \u0026\u0026 cd ..\n   cp -r widget/dist/* public/widget/dist/\n   ```\n\n2. **Update documentation index**: After changing content:\n   ```bash\n   pnpm run build-star-support-index\n   ```\n\n3. **Test API endpoints**: The chat API is available at:\n   ```\n   POST http://localhost:4321/api/star-support/chat\n   ```\n\n## Deployment\n\nThe demo is configured for Vercel deployment:\n\n1. Set environment variables in Vercel dashboard\n2. Deploy with `git push`\n\n## About the Original Astro Docs\n\nThis demo is built on top of the official Astro documentation, which showcases:\n- Content collections\n- MDX components\n- Starlight theme\n- Multi-language support (removed in this demo)\n\nFor the original Astro documentation, visit [docs.astro.build](https://docs.astro.build).\n\n## License\n\n- Star Support widget code: See [Star Support repository](https://github.com/agoodway/star-support)\n- Astro documentation content: See original [Astro Docs license](https://github.com/withastro/docs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagoodway%2Fstar-support-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagoodway%2Fstar-support-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagoodway%2Fstar-support-demo/lists"}