A comprehensive starter template for building conversational and agent-based applications with modern web technologies.
- Frontend: Astro ~5.11 with React ~19.1 islands
- Styling: TailwindCSS ~3.4
- Backend: Convex (Coming Soon)
- Language: TypeScript ~5.8 in strict mode
- Runtime: Bun
- Deployment: Cloudflare Pages
- Monorepo: Turborepo
- CI/CD: GitHub Actions
- Authentication: BetterAuth with OAuth providers
- Database: Convex real-time database (in development)
ai-starter-template/
├── apps/
│ └── web/ # Astro frontend application
├── packages/
│ ├── config/ # Shared configurations (ESLint, TSConfig)
│ ├── lib/ # Shared utilities & types
│ └── ui/ # Shared React UI components
├── convex/ # Convex backend (placeholder)
├── .github/workflows/ # GitHub Actions CI/CD
└── docs/ # Project documentation
- Bun (latest version)
- Node.js 18+ (for fallback compatibility)
-
Clone and install dependencies:
git clone <repository-url> cd ai-starter-template bun install
-
Start development servers:
bun dev
This will start the Astro development server at
http://localhost:4321
-
Build for production:
bun run build
-
Preview production build:
cd apps/web && bun run preview
bun dev
- Start all development serversbun run build
- Build all packages for productionbun run lint
- Run linting across all packagesbun run test
- Run tests across all packagesbun run clean
- Clean build artifacts
The project is configured to automatically deploy to Cloudflare Pages via GitHub Actions.
Required Secrets:
CLOUDFLARE_API_TOKEN
- Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID
- Your Cloudflare account ID
Deployment Process:
- Push to
main
branch - GitHub Actions runs build process
- Deploys to Cloudflare Pages automatically
# Install Wrangler globally (if not already installed)
bun add -g wrangler
# Login to Cloudflare
bunx wrangler login
# Deploy
bunx wrangler pages deploy apps/web/dist --project-name ai-starter-template
Shared configuration files (ESLint, TypeScript)
Shared utilities and types
- User types
- Date formatting utilities
- ID generation helpers
Shared React UI components
- Button component with variants
- Card component
- Styled with TailwindCSS
# Run all tests
bun run test
# Run tests in specific package
cd packages/lib && bun test
The application features a comprehensive chat interface for AI conversations:
- Real-time messaging with AI assistants
- Multiple chat sessions with persistent history
- Dark mode support that follows system preferences
- Responsive design for desktop and mobile
- Search functionality across chat history
- Authentication required for secure access
- Navigate to
/chat
after logging in - Click "Create your first chat" or the "+" button
- Enter a chat title and start messaging
- Switch between chats using the sidebar
For detailed instructions on using the chat interface, see the Chat Interface User Guide.
- Frontend: React components with Astro pages
- State Management: React hooks with local storage
- Styling: TailwindCSS with dark mode support
- Testing: Comprehensive unit and E2E tests
- Accessibility: Full keyboard navigation and screen reader support
- BMAD Method - AI-driven development framework
- Architecture - Detailed system design
- Project Brief - Project overview and goals
- Chat Interface User Guide - Complete chat feature guide
This project uses the BMAD (Build Me An App, Dave) method for AI-driven development. See CLAUDE.md for development guidelines.
MIT License - see LICENSE file for details.