{"id":50664800,"url":"https://github.com/ghwmelite-dotcom/ask-ozzy","last_synced_at":"2026-06-08T05:03:59.432Z","repository":{"id":337758449,"uuid":"1155075678","full_name":"ghwmelite-dotcom/ask-ozzy","owner":"ghwmelite-dotcom","description":"AI-powered productivity platform for Government of Ghana operations. Multi-model chat, deep research, document drafting, data analysis, RAG knowledge base, and multi-channel access (web, WhatsApp, SMS, USSD). Built on Cloudflare Workers.","archived":false,"fork":false,"pushed_at":"2026-05-02T18:50:09.000Z","size":7435,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T20:24:20.349Z","etag":null,"topics":["ai","chatbot","cloudflare-workers","d1","edge-computing","ghana","government","hono","llm","offline-first","productivity","pwa","rag","serverless","typescript","ussd","whatsapp-bot","workers-ai"],"latest_commit_sha":null,"homepage":"https://askozzy.ghwmelite.workers.dev","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/ghwmelite-dotcom.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-11T05:05:28.000Z","updated_at":"2026-05-02T18:50:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ghwmelite-dotcom/ask-ozzy","commit_stats":null,"previous_names":["ghwmelite-dotcom/ask-ozzy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghwmelite-dotcom/ask-ozzy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghwmelite-dotcom%2Fask-ozzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghwmelite-dotcom%2Fask-ozzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghwmelite-dotcom%2Fask-ozzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghwmelite-dotcom%2Fask-ozzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghwmelite-dotcom","download_url":"https://codeload.github.com/ghwmelite-dotcom/ask-ozzy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghwmelite-dotcom%2Fask-ozzy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34048707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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","chatbot","cloudflare-workers","d1","edge-computing","ghana","government","hono","llm","offline-first","productivity","pwa","rag","serverless","typescript","ussd","whatsapp-bot","workers-ai"],"created_at":"2026-06-08T05:03:59.365Z","updated_at":"2026-06-08T05:03:59.427Z","avatar_url":"https://github.com/ghwmelite-dotcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/icons/icon-192.png\" alt=\"AskOzzy Logo\" width=\"100\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAskOzzy\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eAI-Powered Productivity Platform for Government of Ghana Operations\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://askozzy.ghwmelite.workers.dev\"\u003eLive App\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://askozzy.ghwmelite.workers.dev/admin\"\u003eAdmin Portal\u003c/a\u003e \u0026middot;\n  \u003ca href=\"docs/README.md\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/runtime-Cloudflare%20Workers-F38020?logo=cloudflare\u0026logoColor=white\" alt=\"Cloudflare Workers\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/framework-Hono%204.6-E36002?logo=hono\u0026logoColor=white\" alt=\"Hono\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/language-TypeScript%205.7-3178C6?logo=typescript\u0026logoColor=white\" alt=\"TypeScript\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/database-Cloudflare%20D1-F38020?logo=cloudflare\u0026logoColor=white\" alt=\"D1\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/AI-Workers%20AI-F38020?logo=cloudflare\u0026logoColor=white\" alt=\"Workers AI\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/version-1.0.0-green\" alt=\"Version\" /\u003e\n\u003c/p\u003e\n\n---\n\n**AskOzzy** is a full-stack AI assistant built exclusively for Ghana's civil service. It gives civil servants, students, and the general public access to intelligent document drafting, deep research, data analysis, and multilingual communication — all running on Cloudflare's global edge network for speed, security, and data sovereignty.\n\n## Highlights\n\n- **10 AI Models** — GPT-OSS 120B, Llama 4 Scout, Llama 3.3 70B, QwQ 32B, Qwen3 30B, Mistral Small, Gemma 3, Granite 4.0, and more\n- **139+ API Endpoints** — Single Hono/TypeScript Worker powering the entire backend\n- **32 Database Tables** — Comprehensive relational schema across 9 migration files\n- **45 Prompt Templates** — GoG memos, cabinet briefs, policy drafts, student essays, IT specs\n- **Offline-First PWA** — Works without internet; queues and syncs automatically\n- **Multi-Channel Access** — Browser, WhatsApp, SMS, and USSD (`*713*OZZY#`)\n\n## Features\n\n### Core AI\n| Feature | Description |\n|---------|-------------|\n| Multi-Model Chat | Real-time SSE streaming across 10 LLMs |\n| Deep Research | 5-step pipeline with DuckDuckGo web search |\n| Data Analysis | CSV/Excel processing with Chart.js visualizations |\n| Vision AI | Image description, OCR, form extraction, receipt scanning |\n| RAG Knowledge Base | Document ingestion, vector embeddings, semantic retrieval |\n| AI Memory | Auto-extracts preferences for personalized responses |\n| Translation | m2m100 multilingual translation |\n| Transcription | Whisper audio-to-text |\n\n### Productivity\n| Feature | Description |\n|---------|-------------|\n| 45 Templates | GoG-specific and student-specific prompt templates |\n| Custom Agents | 25 pre-seeded + admin-managed AI agents |\n| Workflow Automation | Multi-step document generation pipelines |\n| Meeting Assistant | Upload recordings, get AI-generated minutes |\n| Collaborative Spaces | Team workspaces with shared conversations |\n| Voice I/O | 7 languages — English, Twi, Ga, Ewe, Hausa, Dagbani, French |\n\n### Platform\n| Feature | Description |\n|---------|-------------|\n| Admin Portal | 16 management tabs for users, analytics, content, settings |\n| Affiliate Program | 2-level commissions (30% L1, 5% L2) with milestone bonuses |\n| Payments | Paystack — MTN MoMo, Vodafone, AirtelTigo, Visa, Mastercard |\n| Student Mode | Discounted pricing with 16 academic templates |\n| Citizen Bot | Public-facing AI chat — no login required |\n| Push Notifications | VAPID-based web push |\n| Gamification | Streaks, badges, and milestones |\n\n## Tech Stack\n\n```\nRuntime          Cloudflare Workers (0ms cold start)\nFramework        Hono 4.6 (TypeScript)\nDatabase         Cloudflare D1 (SQLite) — 32 tables\nSession Store    Cloudflare KV (7-day TTL)\nVector DB        Cloudflare Vectorize (768-dim, cosine)\nAI Inference     Cloudflare Workers AI (10 models)\nPayments         Paystack (GHS)\nFrontend         Vanilla JS PWA with Service Worker v2\n```\n\n## Architecture\n\n```\nClient ──► Cloudflare Edge\n              │\n              ├── CORS \u0026 Auth Middleware\n              ├── Rate Limiting (KV-backed)\n              ├── Route Handler (Hono)\n              │     ├── D1 queries\n              │     ├── Workers AI inference (SSE stream)\n              │     ├── Vectorize similarity search\n              │     └── KV session ops\n              └── Response (JSON / SSE stream)\n```\n\n**RAG Pipeline:** Upload → Parse → Chunk (500 chars, 50 overlap) → Embed (bge-base-en-v1.5) → Store in Vectorize → Query via cosine similarity → Inject context → AI response\n\n## Quick Start\n\n```bash\n# Clone\ngit clone https://github.com/ghwmelite-dotcom/ask-ozzy.git\ncd ask-ozzy\n\n# Install\nnpm install\n\n# Local dev\nnpx wrangler dev\n# → http://localhost:8787\n```\n\n### First Deployment\n\n```bash\n# 1. Create infrastructure\nnpx wrangler d1 create ghana-civil-ai-db\nnpx wrangler kv namespace create SESSIONS\nnpx wrangler vectorize create askozzy-knowledge --dimensions=768 --metric=cosine\n\n# 2. Run migrations (in order)\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-kb.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-phase1.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-phase2.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-phase4.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-phase5.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-phase5b.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-ussd.sql\nnpx wrangler d1 execute ghana-civil-ai-db --remote --file=schema-affiliate.sql\n\n# 3. Set secrets\nnpx wrangler secret put JWT_SECRET\nnpx wrangler secret put VAPID_PUBLIC_KEY\n\n# 4. Deploy\nnpx wrangler deploy\n\n# 5. Bootstrap admin\ncurl -X POST https://askozzy.ghwmelite.workers.dev/api/admin/bootstrap\n```\n\n## Subscription Tiers\n\n| Tier | Price (GHS/mo) | Student | Messages/day | Models |\n|------|:--------------:|:-------:|:------------:|:------:|\n| Free | 0 | 0 | 10 | 3 |\n| Professional | 60 | 25 | 200 | All 10 |\n| Enterprise | 100 | 45 | Unlimited | All 10 |\n\n## Security\n\n- **Authentication** — Access codes, WebAuthn passkeys, TOTP 2FA, recovery codes\n- **Authorization** — Role-based access control (user, dept_admin, super_admin)\n- **Rate Limiting** — KV-backed per-category limits (auth: 10/5min, chat: 30/min, API: 100/min)\n- **Webhook Verification** — HMAC-SHA512 signature validation (Paystack)\n- **Content Security Policy** — Strict CSP headers\n- **Audit Trail** — Full logging of all AI operations and admin actions\n- **Content Moderation** — Flag and review system\n\n## Project Structure\n\n```\nask-ozzy/\n├── src/\n│   ├── index.ts              # Backend — 161 route handlers\n│   └── lib/\n│       ├── middleware.ts      # Auth, rate limiting, RBAC\n│       ├── utils.ts           # Crypto, tokens, ID generation\n│       └── types.ts           # TypeScript interfaces\n├── public/\n│   ├── index.html             # Main app UI\n│   ├── admin.html             # Admin portal\n│   ├── sw.js                  # Service Worker v2\n│   ├── manifest.json          # PWA manifest\n│   ├── css/                   # Stylesheets\n│   ├── js/\n│   │   ├── app.js             # Frontend logic\n│   │   ├── admin.js           # Admin logic\n│   │   └── templates.js       # 45 prompt templates\n│   └── icons/                 # PWA icons\n├── schema*.sql                # 9 database migration files\n├── docs/                      # 14 documentation guides\n├── wrangler.jsonc             # Cloudflare Worker config\n├── package.json\n└── tsconfig.json\n```\n\n## Documentation\n\nFull documentation lives in [`docs/`](docs/README.md) — 14 comprehensive guides covering architecture, API reference (139+ endpoints), database schema, frontend, admin portal, AI features, payments, security, PWA/offline, deployment, and a complete user guide.\n\n## License\n\nProprietary. All rights reserved.\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built for the Government of Ghana by \u003cstrong\u003eOsborn Hodges\u003c/strong\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghwmelite-dotcom%2Fask-ozzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghwmelite-dotcom%2Fask-ozzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghwmelite-dotcom%2Fask-ozzy/lists"}