{"id":23207165,"url":"https://github.com/one-ie/one","last_synced_at":"2025-08-29T21:33:49.681Z","repository":{"id":263235698,"uuid":"887265058","full_name":"one-ie/one","owner":"one-ie","description":"Build AI powered websites with Astro, Shadcn and Vercel AI SDK","archived":false,"fork":false,"pushed_at":"2025-08-20T14:36:47.000Z","size":127541,"stargazers_count":85,"open_issues_count":2,"forks_count":21,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-24T17:13:12.972Z","etag":null,"topics":["ai","astro","astro-5","astrojs","astrojs-framework","astrojs-template","blog","claude-3-5-sonnet","deepseek","gpt-4o","openai","react","reactjs","shadcn","shadcn-ui","shadcnui","starter-template","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"https://one.ie","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/one-ie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2024-11-12T12:59:19.000Z","updated_at":"2025-08-24T04:02:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"a01d8f4f-530b-46ba-939c-0945b4f73066","html_url":"https://github.com/one-ie/one","commit_stats":null,"previous_names":["agentc-app/astro-shadcn","one-ie/one"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/one-ie/one","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-ie%2Fone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-ie%2Fone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-ie%2Fone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-ie%2Fone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/one-ie","download_url":"https://codeload.github.com/one-ie/one/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-ie%2Fone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272726033,"owners_count":24982844,"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-08-29T02:00:10.610Z","response_time":87,"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":["ai","astro","astro-5","astrojs","astrojs-framework","astrojs-template","blog","claude-3-5-sonnet","deepseek","gpt-4o","openai","react","reactjs","shadcn","shadcn-ui","shadcnui","starter-template","vercel-ai-sdk"],"created_at":"2024-12-18T17:18:01.212Z","updated_at":"2025-08-29T21:33:49.676Z","avatar_url":"https://github.com/one-ie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 ONE Web - Astro AI Chat \u0026 Book Generation Platform\n\nclaude --dangerously-skip-permissions\n\n\u003e A modern Astro application with AI-powered chat interface and professional book generation capabilities.\n\nONE Web is a cutting-edge Astro application that combines AI chat capabilities with professional EPUB book generation. Built with modern web technologies, it provides a seamless experience for creating interactive AI-powered content and generating professional publications.\n\nPerfect for building modern web applications, from simple landing pages to complex AI-powered platforms.\n\n![ONE Screenshot](https://one.ie/screenshots/screenshot.png)\n\n## 🌟 What Makes ONE Web Special\n\n### 🤖 **AI-Powered Chat Interface**\n- Multiple AI provider support (OpenAI, Claude, OpenRouter)\n- Configurable chat panels with flexible layouts\n- Real-time streaming responses\n- Context-aware conversations\n\n### 📚 **Professional Book Generation**\n- Markdown-to-EPUB conversion using Pandoc\n- Comprehensive metadata management\n- Custom styling and layouts\n- Automated table of contents\n\n### ⚡ **Modern Tech Stack**\n- **Astro**: Lightning-fast static site generation with SSR\n- **React + TypeScript**: Interactive components with type safety\n- **Shadcn/UI**: Beautiful, accessible UI components\n- **Tailwind CSS**: Utility-first styling\n- **AI SDK**: Multi-provider AI integration\n- **Pandoc**: Professional document generation\n\n## ⚡ Quick Start\n\n### Prerequisites\n\n- Node.js 20 or higher\n- pnpm package manager (`npm install -g pnpm`)\n- Pandoc (for book generation): `brew install pandoc` (macOS) or `sudo apt-get install pandoc` (Ubuntu)\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/one-ie/one.git\n   cd one/web\n   ```\n\n2. **Install dependencies**\n   ```bash\n   pnpm install\n   ```\n\n3. **Configure environment variables**\n   ```bash\n   cp .env.example .env\n   ```\n   \n   Add your API keys to `.env`:\n   ```env\n   # AI Services\n   OPENAI_API_KEY=your_openai_key\n   ANTHROPIC_API_KEY=your_claude_key\n   OPENROUTER_API_KEY=your_openrouter_key\n   ```\n\n4. **Start development server**\n   ```bash\n   pnpm dev\n   ```\n\nVisit `http://localhost:4321` to see your application.\n\n## 🗂️ Project Structure\n\n```\nsrc/\n├── components/           # UI Components\n│   ├── ui/              # Shadcn/UI components\n│   ├── chat/            # AI chat components\n│   └── course/          # Course-related components\n├── content/             # Content Collections\n│   ├── book/            # Book content and metadata\n│   ├── docs/            # Documentation pages\n│   └── lessons/         # Lesson content\n├── layouts/             # Page layouts\n├── pages/               # Routes and API endpoints\n│   └── api/             # AI chat API endpoints\n├── lib/                 # Utility functions\n├── styles/              # Global styles\n└── types/               # TypeScript definitions\n```\n\n## 🤖 AI Chat Features\n\n### Adding AI Chat to Pages\n\nAdd an AI chat interface to any Astro page:\n\n```astro\n---\nimport Layout from \"../layouts/Layout.astro\";\nimport { ChatConfigSchema } from '../schema/chat';\n\nconst chatConfig = ChatConfigSchema.parse({\n  provider: \"openai\",\n  model: \"gpt-4o-mini\",\n  systemPrompt: [{\n    type: \"text\",\n    text: \"You are a helpful assistant specialized in this topic.\"\n  }],\n  welcome: {\n    message: \"👋 How can I help you today?\",\n    avatar: \"/icon.svg\",\n    suggestions: [\n      {\n        label: \"Get Started\",\n        prompt: \"How do I get started?\"\n      }\n    ]\n  }\n});\n---\n\n\u003cLayout \n  title=\"AI Chat Page\"\n  chatConfig={chatConfig}\n  rightPanelMode=\"quarter\"\n\u003e\n  \u003cmain\u003e\n    \u003ch1\u003eYour Content Here\u003c/h1\u003e\n    \u003c!-- The chat will appear in the right panel --\u003e\n  \u003c/main\u003e\n\u003c/Layout\u003e\n```\n\n### Chat Panel Modes\n\n- `quarter`: 25% width side panel\n- `half`: 50% width side panel  \n- `full`: Full screen chat\n- `floating`: Floating chat window\n- `icon`: Minimized chat button\n\n### Supported AI Providers\n\n- **OpenAI**: GPT-4, GPT-3.5, and other models\n- **Anthropic**: Claude 3.5 Sonnet, Claude 3 Haiku\n- **OpenRouter**: Access to 100+ models from multiple providers\n\n## 📚 Book Generation\n\n### Book Structure\n\n```\nsrc/content/book/\n├── metadata.yaml         # Book metadata\n├── chapters/            # Markdown chapters\n│   ├── 01-introduction.md\n│   ├── 02-getting-started.md\n│   └── ...\n├── assets/              # Images and resources\n│   └── cover.png\n└── epub-style.css       # Custom EPUB styling\n```\n\n### Book Metadata\n\nDefine comprehensive book metadata in `metadata.yaml`:\n\n```yaml\n---\ntitle: 'Your Book Title'\ndescription: 'Comprehensive guide to...'\nauthor: \"Your Name\"\npublisher: 'Your Publisher'\ndate: '2024-06-26'\nstatus: 'published'\n\nidentifier:\n  scheme: 'ISBN-13'\n  text: '978-1-234-56789-0'\n\nsubject: 'Technology, Programming'\nlanguage: 'en-US'\ncoverImage: 'assets/cover.png'\ncss: 'epub-style.css'\n\n'@type': 'Book'\n'@context': 'https://schema.org'\nbookFormat: 'EBook'\n---\n```\n\n### Generate EPUB\n\n```bash\n# Generate EPUB book\npnpm run generate:epub\n\n# Generate PDF (requires additional setup)\npnpm run generate:pdf\n```\n\n### Custom Styling\n\nStyle your EPUB with CSS:\n\n```css\n/* src/content/book/epub-style.css */\nbody {\n    font-family: -apple-system, BlinkMacSystemFont, \"SF Pro Text\", sans-serif;\n    line-height: 1.6;\n    color: #333;\n    margin: 0;\n    padding: 1.5em;\n}\n\nh1, h2, h3 {\n    font-family: -apple-system, BlinkMacSystemFont, \"SF Pro Display\", sans-serif;\n    color: #000;\n    margin-top: 2em;\n    margin-bottom: 0.5em;\n}\n```\n\n## 🎨 UI Components\n\nAll Shadcn/UI components are pre-configured:\n\n```astro\n---\nimport { Button } from \"@/components/ui/button\"\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\"\nimport { Dialog } from \"@/components/ui/dialog\"\n---\n\n\u003cCard\u003e\n  \u003cCardHeader\u003e\n    \u003cCardTitle\u003eWelcome\u003c/CardTitle\u003e\n  \u003c/CardHeader\u003e\n  \u003cCardContent\u003e\n    \u003cButton client:load\u003eInteractive Button\u003c/Button\u003e\n  \u003c/CardContent\u003e\n\u003c/Card\u003e\n```\n\n### Available Components\n\n- ✅ Accordion\n- ✅ Alert Dialog  \n- ✅ Avatar\n- ✅ Badge\n- ✅ Button\n- ✅ Card\n- ✅ Dialog\n- ✅ Form components\n- ✅ Navigation\n- ✅ Layout components\n- ... and more!\n\n## 🚀 Development\n\n### Development Commands\n\n```bash\n# Start development server\npnpm dev\n\n# Build for production\npnpm build\n\n# Preview production build\npnpm preview\n\n# Type checking\npnpm astro check\n\n# Generate EPUB book\npnpm generate:epub\n\n# Run tests\npnpm test\n```\n\n### Environment Variables\n\n```env\n# AI Services (Required for chat features)\nOPENAI_API_KEY=your_openai_key\nANTHROPIC_API_KEY=your_claude_key\nOPENROUTER_API_KEY=your_openrouter_key\n\n# Optional: Custom API endpoints\nOPENAI_BASE_URL=https://api.openai.com/v1\nANTHROPIC_BASE_URL=https://api.anthropic.com\n\n# Development\nNODE_ENV=development\n```\n\n## 🛠️ API Endpoints\n\n### Chat API\n\nThe application includes API endpoints for AI chat:\n\n- `/api/openai` - OpenAI chat endpoint\n- `/api/anthropic` - Claude chat endpoint  \n- `/api/openrouter` - OpenRouter multi-model endpoint\n\n### Usage\n\n```javascript\n// Client-side chat integration\nconst response = await fetch('/api/openai', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    messages: [\n      { role: 'user', content: 'Hello!' }\n    ],\n    model: 'gpt-4o-mini',\n    stream: true\n  })\n});\n```\n\n## 🔧 Configuration\n\n### Astro Configuration\n\nThe project uses Astro with Node.js adapter for server-side rendering:\n\n```javascript\n// astro.config.mjs\nexport default defineConfig({\n  integrations: [react(), mdx()],\n  output: 'server',\n  adapter: node({\n    mode: 'standalone'\n  }),\n  vite: {\n    plugins: [tailwindcss()]\n  }\n});\n```\n\n### TypeScript Support\n\nFull TypeScript support with strict configuration:\n\n```json\n{\n  \"extends\": \"astro/tsconfigs/strict\",\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./src/*\"]\n    }\n  }\n}\n```\n\n## 📋 Content Management\n\n### Content Collections\n\nAstro Content Collections for type-safe content:\n\n```typescript\n// src/content/config.ts\nimport { defineCollection, z } from 'astro:content';\n\nconst book = defineCollection({\n  type: 'content',\n  schema: z.object({\n    title: z.string(),\n    author: z.string(),\n    date: z.date(),\n    chapter: z.number().optional(),\n    // ... more fields\n  })\n});\n\nexport const collections = { book };\n```\n\n### Markdown Features\n\n- GitHub Flavored Markdown\n- Syntax highlighting with Shiki\n- Math expressions with KaTeX\n- MDX component support\n\n## 🚀 Deployment\n\n### Cloudflare Pages\n\nOptimized for Cloudflare Pages deployment:\n\n1. **Connect your repository** to Cloudflare Pages\n2. **Build settings**:\n   - Build command: `npm run build`\n   - Build output directory: `dist`\n   - Node.js version: `20`\n\n3. **Environment variables**: Add your API keys in Cloudflare Pages settings\n\n### Other Platforms\n\nThe app also supports:\n- Vercel\n- Netlify  \n- Any Node.js hosting platform\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n1. **TypeScript errors**: Run `pnpm astro check` to identify issues\n2. **Component hydration**: Ensure interactive components use `client:load`\n3. **Build failures**: Check Node.js version (requires 20+)\n4. **API issues**: Verify environment variables are set correctly\n\n### Performance Tips\n\n- Use `client:load` only for interactive components\n- Optimize images with Astro's built-in image optimization\n- Leverage Astro's partial hydration for better performance\n\n## 📚 Documentation\n\n- [Astro Documentation](https://docs.astro.build)\n- [Shadcn/UI Components](https://ui.shadcn.com)\n- [Tailwind CSS](https://tailwindcss.com/docs)\n- [AI SDK Documentation](https://sdk.vercel.ai)\n- [Pandoc Manual](https://pandoc.org/MANUAL.html)\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n---\n\n**ONE Web** - Modern Astro application with AI chat and professional book generation capabilities.\n\nBuilt with ⚡ Astro, 🤖 AI SDK, 📚 Pandoc, and 🎨 Shadcn/UI","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-ie%2Fone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fone-ie%2Fone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-ie%2Fone/lists"}