A production-ready multipage application store for managing Cloudflare Workers and Pages apps with health monitoring, AI-powered insights, and automated deployment workflows.
- Unified App Inventory: Manage all your Cloudflare Workers and Pages projects in one place
- Health Monitoring: Automatic health scoring (0-100) based on deployments, activity, and errors
- AI-Powered Insights: Automated categorization, tagging, log analysis, and error detection
- GitHub Integration: Automatic repository linking and inference from deployment metadata
- Smart Search & Filters: Powerful filtering by type, category, health status, and more
- Real-time Updates: Cron-based background refresh every 15 minutes
- AI-Assisted Creation: Create new apps with AI-generated architecture plans and scaffolding
Apps are continuously monitored and scored based on:
- Deployment frequency and recency
- Log activity and errors
- Deployment success rate
- Uptime and availability
Status indicators:
- β Working (score β₯ 70): Healthy and active
β οΈ Unknown (score 40-69): Limited data or moderate issues- β Broken (score < 40): Critical issues detected
Categorization:
- Automatically categorizes apps: prod, tooling, personal, infra, experiments
- Generates descriptive tags based on name, description, and repository
- Creates one-sentence summaries
Log Insights:
- Analyzes recent logs to identify top errors
- Suggests likely causes and remediation actions
- Severity classification (low, medium, high, critical)
App Planning:
- Generates implementation plans for new apps
- Recommends module architecture and bindings
- Suggests reusable components from existing apps
Backend (Cloudflare Worker):
- Framework: Hono (lightweight, fast routing)
- Database: D1 (SQLite)
- Cache: KV
- AI: Worker AI (Llama 3.1 8B)
- GitHub: Octokit REST API
- Type Safety: Zod schemas
Frontend (React SPA):
- Framework: React 18 + Vite
- UI: shadcn/ui + Tailwind CSS
- State: TanStack Query
- Routing: React Router v7
- Accessibility: Full WCAG 2.1 AA compliance
Shared:
- TypeScript 5
- Zod for runtime type validation
- Monorepo structure
core-app-store/
βββ src/ # Backend (Cloudflare Worker)
β βββ index.ts # Worker entry point
β βββ routes/ # API routes (Hono)
β βββ modules/ # Core services
β β βββ cloudflare-api.ts # Cloudflare API client
β β βββ github.ts # GitHub/Octokit client
β β βββ database.ts # D1 service layer
β β βββ ai-service.ts # Worker AI operations
β βββ workflows/ # Background jobs & cron
βββ frontend/ # React frontend
β βββ src/
β βββ pages/ # Page components
β βββ components/ # Reusable UI components
β βββ lib/ # API client & utilities
βββ shared/ # Shared TypeScript types & Zod schemas
βββ migrations/ # D1 database migrations
βββ wrangler.toml # Cloudflare configuration
- Node.js 18 or higher
- Cloudflare account with Workers/Pages enabled
- GitHub Personal Access Token (for repository operations)
- Wrangler CLI
npm install -g wrangler- Clone the repository
git clone https://github.com/yourusername/core-app-store.git
cd core-app-store- Install dependencies
npm install- Create Cloudflare D1 database
wrangler d1 create core-app-store-dbCopy the database ID from the output and update wrangler.toml:
[[d1_databases]]
binding = "DB"
database_name = "core-app-store-db"
database_id = "YOUR_DATABASE_ID_HERE"- Create KV namespace
wrangler kv:namespace create CACHEUpdate wrangler.toml with the KV namespace ID.
- Run database migrations
npm run db:migrate- Configure environment variables
Create a .env file in the root directory:
cp .env.example .envEdit .env with your credentials:
# Cloudflare API credentials
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
CLOUDFLARE_ACCOUNT_ID=your_account_id
# GitHub credentials
GITHUB_TOKEN=your_github_personal_access_token
# Worker API security
WORKER_API_KEY=your_secure_api_key
# Development mode (uses mocked API responses)
DEV_MODE=true
MOCK_CLOUDFLARE_API=trueGetting your tokens:
- Cloudflare API Token: Go to Cloudflare Dashboard β API Tokens β Create Token (with Workers and Pages permissions)
- Account ID: Found in Cloudflare Dashboard β Workers & Pages β Overview
- GitHub Token: Go to GitHub Settings β Personal Access Tokens β Generate new token (with
reposcope)
- Set Wrangler secrets (for production)
wrangler secret put WORKER_API_KEY
wrangler secret put CLOUDFLARE_API_TOKEN
wrangler secret put CLOUDFLARE_ACCOUNT_ID
wrangler secret put GITHUB_TOKENStart the development servers:
# Start both backend and frontend
npm run dev
# Or start them separately:
npm run dev:backend # Backend on http://localhost:8787
npm run dev:frontend # Frontend on http://localhost:3000The frontend will proxy API requests to the backend automatically.
For faster development without hitting real APIs, enable mock mode in .env:
DEV_MODE=true
MOCK_CLOUDFLARE_API=trueThis will use mock data for Cloudflare API calls and GitHub operations.
The landing page (/) shows:
- Overview statistics (total apps, health distribution)
- Starred apps
- Recently active apps
- Broken apps that need attention
Navigate to /apps to:
- Search apps by name or description
- Filter by type (Worker/Pages), category, health status, starred, has repo
- Sort by updated date, deployment date, health score, or name
- View detailed information for each app
Click on any app to view:
- Health status and score
- AI-generated summary and tags
- Recent deployments
- Log insights (errors, suggested actions)
- Linked GitHub repositories
- Activity timestamps
Use the /new wizard to:
- Provide basic info: Name, type (Worker/Pages), description
- Review AI plan: Modules, endpoints, bindings recommended by AI
- Create repository: Automatically create a GitHub repo
- Bootstrap: Generate scaffold files (wrangler.toml, package.json, AGENTS.md, etc.)
- Deploy: Get instructions for deploying to Cloudflare
All endpoints require Bearer token authentication:
Authorization: Bearer YOUR_API_KEYGET /api/apps- List apps (supports filtering, sorting, pagination)GET /api/apps/starred- Get starred apps and dashboard dataGET /api/apps/:id- Get app detailsPOST /api/apps/:id/star- Toggle starred statusPOST /api/apps/:id/refresh- Refresh single app dataGET /api/apps/:id/deployments- Get deployment historyGET /api/apps/:id/logs/insights- Get AI-generated log insightsPOST /api/apps/:id/repo/link- Link a GitHub repository
GET /api/meta- Get system metadata and statisticsPOST /api/refresh- Trigger full inventory refreshPOST /api/visit- Record app visit (for analytics)
POST /api/new/plan- Generate AI implementation planPOST /api/new/create-repo- Create GitHub repositoryPOST /api/new/bootstrap- Bootstrap repository with filesPOST /api/new/create-cloudflare- Create Cloudflare app
cd src
wrangler deployBuild the frontend:
cd frontend
npm run buildDeploy to Cloudflare Pages:
wrangler pages deploy distOr serve via the Worker by configuring static asset handling.
- Run migrations on production D1:
wrangler d1 migrations apply core-app-store-db --remote- Trigger initial inventory refresh:
curl -X POST https://your-worker.workers.dev/api/refresh \
-H "Authorization: Bearer YOUR_API_KEY"- Verify cron triggers are active:
Check your Worker's settings in the Cloudflare dashboard to ensure cron triggers are enabled.
The app runs three background jobs:
- Every 15 minutes: Lightweight health score updates
- Hourly: Log insights generation for broken/active apps
- Daily at 2 AM: Full inventory reconciliation (syncs all Workers and Pages)
Key tables:
apps: Main app registrydeployments: Deployment historylog_events: Sampled log entrieslog_insights: AI-generated insightsgithub_repos: Linked repositoriesapp_repo_links: App-to-repo mappingsrefresh_jobs: Background job trackingapp_visits: User interaction analytics
See migrations/0001_initial_schema.sql for full schema.
Edit wrangler.toml to configure:
- D1 database binding
- KV namespace binding
- Worker AI binding
- Cron triggers
- Environment variables
Edit frontend/vite.config.ts to configure:
- API proxy settings
- Build options
- Path aliases
Use the included .env file with DEV_MODE=true to test with mock data:
curl http://localhost:8787/api/apps \
-H "Authorization: Bearer dev-key"- Backend: Add route in
src/routes/api.ts - Database: Create migration in
migrations/ - Schemas: Define types in
shared/src/schemas/ - Frontend: Add API call in
frontend/src/lib/api.ts - UI: Create component in
frontend/src/components/
- Backend logs:
wrangler tail(in production) or check console in dev - Frontend: React DevTools + Network tab
- Database:
wrangler d1 execute core-app-store-db --command "SELECT * FROM apps"
This app is built with accessibility in mind:
- Full keyboard navigation support
- ARIA labels on all interactive elements
- Focus rings with proper contrast
- Reduced motion support (
prefers-reduced-motion) - Semantic HTML
- Screen reader compatible
- Bearer token authentication on all API endpoints
- Input validation with Zod schemas
- SQL injection protection (parameterized queries)
- Rate limiting ready (configure as needed)
- Audit logging for sensitive operations
- CORS configured for production domains
- No blocking API calls on UI render (all data from D1)
- KV caching for Cloudflare API responses
- TanStack Query for client-side caching
- Debounced search inputs
- Virtualized lists for large datasets
- Optimized indexes on D1 tables
- Reduced bundle size with tree-shaking
- Verify
WORKER_API_KEYis set correctly in.envand Wrangler secrets - Check the
Authorizationheader format:Bearer YOUR_KEY
- Ensure migrations have been run:
npm run db:migrate - Check D1 database exists:
wrangler d1 list - Verify database ID in
wrangler.tomlmatches your D1 instance
- Check proxy configuration in
vite.config.ts - Ensure backend is running on port 8787
- Verify API_KEY in frontend
.envfile
- Cron triggers only work in production, not in
wrangler dev - Deploy to Workers and check logs:
wrangler tail
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
- Real-time log streaming
- Custom dashboards and widgets
- Slack/Discord notifications for broken apps
- Multi-account support
- Advanced analytics and insights
- Cost tracking and optimization
- Automated rollback on deployment failures
- Integration with other cloud providers
MIT License - see LICENSE file for details.
- π Documentation
- π Issue Tracker
- π¬ Discussions
- Built with Cloudflare Workers
- UI components from shadcn/ui
- Powered by Hono and React
- AI by Cloudflare Workers AI
Made with β€οΈ for the Cloudflare community