{"id":48101407,"url":"https://github.com/psd401/aistudio","last_synced_at":"2026-04-04T15:43:48.312Z","repository":{"id":272236325,"uuid":"915551071","full_name":"psd401/aistudio","owner":"psd401","description":"Democratize AI access in K-12 education with multi-model platform deployed on your infrastructure","archived":false,"fork":false,"pushed_at":"2026-03-31T15:14:15.000Z","size":92024,"stargazers_count":2,"open_issues_count":21,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T17:29:54.568Z","etag":null,"topics":["ai-platform","artificial-intelligence","aws","aws-cdk","claude","education-technology","gemini","k12-education","nextjs","openai","self-hosted"],"latest_commit_sha":null,"homepage":"https://psd401.ai/aistudio","language":"TypeScript","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/psd401.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2025-01-12T06:31:58.000Z","updated_at":"2026-03-10T23:38:36.000Z","dependencies_parsed_at":"2025-07-30T23:17:09.591Z","dependency_job_id":"280274e3-2db5-4cdb-979f-211d34fe74e8","html_url":"https://github.com/psd401/aistudio","commit_stats":null,"previous_names":["psd401/tools.psd401.ai","psd401/aistudio.psd401.ai","psd401/aistudio"],"tags_count":2,"template":false,"template_full_name":"psd401/psd-app-template","purl":"pkg:github/psd401/aistudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psd401%2Faistudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psd401%2Faistudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psd401%2Faistudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psd401%2Faistudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psd401","download_url":"https://codeload.github.com/psd401/aistudio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psd401%2Faistudio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":["ai-platform","artificial-intelligence","aws","aws-cdk","claude","education-technology","gemini","k12-education","nextjs","openai","self-hosted"],"created_at":"2026-04-04T15:43:47.610Z","updated_at":"2026-04-04T15:43:48.281Z","avatar_url":"https://github.com/psd401.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Studio\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Built with Next.js](https://img.shields.io/badge/Built%20with-Next.js%2016-black)](https://nextjs.org/)\n[![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)](https://github.com/psd401/aistudio/releases)\n\n\u003e **Bring frontier AI to K-12 education—securely, affordably, and responsibly.**\n\nAI Studio is an open-source platform that provides K-12 educators and students with access to cutting-edge generative AI models at **90% lower cost** than individual licenses. Built with privacy-first architecture and deployed within district infrastructure, it democratizes access to AI tools that were previously cost-prohibitive for schools.\n\n## 🎬 See It In Action\n\n**Learn more**: [https://psd401.ai/aistudio](https://psd401.ai/aistudio)\n\nAI Studio is a **self-hosted platform** deployed within your district infrastructure for security and compliance. Screenshots and feature overview available on our project page.\n\n**Ready to deploy?** See the complete [Deployment Guide](./docs/DEPLOYMENT.md)\n\n## 🎯 Why AI Studio?\n\n### The Problem\n- **Cost Barriers**: Individual AI subscriptions cost $20-200/month per user—unsustainable for districts\n- **Access Inequality**: Students lack exposure to frontier models used in higher education and industry\n- **Data Privacy**: Third-party AI services raise concerns about student data protection\n- **Content Safety**: Consumer AI tools lack appropriate safeguards for K-12 environments\n- **Complexity**: Creating custom AI assistants requires coding expertise\n\n### The Solution\nAI Studio eliminates these barriers by:\n- **90% Cost Reduction**: Secure API architecture replaces expensive per-seat licenses\n- **Multi-Model Access**: Real-time switching between GPT-5, Claude Opus, and Google Gemini\n- **District-Level Security**: All data processed within your secure servers—nothing leaves your environment\n- **K-12 Content Safety**: Automatic content filtering and PII protection across all AI interactions\n- **No-Code Customization**: Design custom AI assistants using visual prompt chains\n- **Open Source**: MIT-licensed, fully self-hostable on your infrastructure\n\n## ✨ Key Features\n\n### For Educators \u0026 Students\n\n- 🤖 **Nexus Chat** - Conversational AI with multiple frontier models\n  - Real-time streaming responses\n  - Conversation history and organization\n  - Model comparison side-by-side\n\n- 🏗️ **Assistant Architect** - No-code custom AI assistant builder\n  - Visual prompt chain designer\n  - Variable substitution between prompts\n  - Knowledge repository integration\n  - Scheduled execution\n\n- 📚 **Knowledge Repositories** - Upload and search documents\n  - PDF, DOCX, TXT support with OCR\n  - Vector embeddings for semantic search\n  - Context-aware AI responses\n\n- 📊 **Model Compare** - Side-by-side model evaluation\n  - Compare GPT-5, Claude Opus, Gemini responses\n  - Token usage and cost analysis\n  - Performance metrics\n\n### For Administrators\n\n- 🔒 **Enterprise Security**\n  - AWS Cognito authentication with Google SSO\n  - Role-based access control (RBAC)\n  - Tool-level permissions\n  - Audit logging\n\n- 🛡️ **K-12 Content Safety** - Purpose-built for educational environments\n  - **Content Filtering**: Blocks inappropriate content (violence, hate speech, sexual content) in both inputs and AI responses using Amazon Bedrock Guardrails\n  - **PII Protection**: Automatically detects and tokenizes student personal information (names, emails, phone numbers) before sending to AI providers\n  - **Compliance Ready**: Helps meet COPPA, FERPA, and CIPA requirements\n  - **Real-time Alerts**: SNS notifications for safety violations\n  - **Zero Configuration**: Works automatically across all AI providers\n  - See [K-12 Content Safety Documentation](./docs/features/k12-content-safety.md) for details\n\n- 💰 **Cost Control**\n  - Transparent usage tracking\n  - Per-user quotas and rate limiting\n  - Provider cost comparison\n  - Auto-pause dev environments\n\n- 📈 **Monitoring \u0026 Observability**\n  - CloudWatch dashboards\n  - OpenTelemetry tracing\n  - Circuit breaker for AI provider failures\n  - Performance metrics\n\n### Integration Platform\n\n- 🔌 **API v1** - REST API for external integrations\n  - Authenticated endpoints for assistants, decisions, and chat\n  - API key management (`sk-` prefix tokens)\n  - Rate limiting (60 req/min default)\n  - OpenAPI specification at `docs/API/v1/openapi.yaml`\n\n- 🔐 **OAuth2/OIDC Provider** - JWT-based auth for external apps\n  - Authorization Code Flow with PKCE\n  - Access tokens (15min), refresh tokens (24hr), ID tokens\n  - Granular scopes for API, MCP, and OIDC\n  - Admin UI for client registration at `/admin/oauth-clients`\n\n- 🤖 **MCP Server** - Model Context Protocol for AI tool integrations\n  - 5 tools: search decisions, capture decisions, list assistants, execute assistants, get context\n  - Works with Claude Code, Cursor, and custom MCP clients\n  - Authenticated via API key or OAuth token\n\n- 🧭 **Decision Framework** - Structured decision capture \u0026 graph\n  - Capture decisions with context, alternatives, and outcomes\n  - Graph-based decision relationships\n  - Search and retrieve past decisions for organizational knowledge\n\n## 🏗️ Architecture\n\nBuilt on AWS with production-ready infrastructure:\n\n- **Frontend**: Next.js 16 (App Router) with React 19 Server Components\n- **Backend**: ECS Fargate containers with Application Load Balancer\n- **Database**: Aurora Serverless v2 (PostgreSQL) with Drizzle ORM and postgres.js driver\n- **Authentication**: AWS Cognito + NextAuth v5\n- **AI Providers**: OpenAI (GPT-5), Anthropic (Claude), Google (Gemini), AWS Bedrock via AI SDK v6\n- **Infrastructure**: AWS CDK (TypeScript) following Well-Architected Framework\n- **Streaming**: Server-Sent Events (SSE) over HTTP/2 for real-time responses\n\nSee [Architecture Diagrams](./docs/diagrams/README.md) for detailed visualizations.\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 20.x and npm\n- AWS CLI configured with appropriate credentials\n- AWS CDK CLI (`npm install -g aws-cdk`)\n- Docker installed (for building container images)\n\n### Local Development\n\n```bash\n# Clone repository\ngit clone https://github.com/psd401/aistudio.git\ncd aistudio\n\n# Install dependencies\nnpm install\n\n# Copy environment variables\ncp .env.example .env.local\n# Edit .env.local with your configuration\n\n# Start local PostgreSQL and dev server\nnpm run db:up              # Start PostgreSQL via Docker\nnpm run db:seed            # Create test users (first time)\nnpm run dev:local          # Start Next.js with local database\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to see the application.\n\n### Deployment to AWS\n\n```bash\n# Bootstrap CDK (one-time)\ncd infra\nnpx cdk bootstrap aws://ACCOUNT-ID/REGION\n\n# Deploy infrastructure stacks\nnpx cdk deploy AIStudio-DatabaseStack-Dev\nnpx cdk deploy AIStudio-AuthStack-Dev\nnpx cdk deploy AIStudio-StorageStack-Dev\nnpx cdk deploy AIStudio-DocumentProcessingStack-Dev\nnpx cdk deploy AIStudio-GuardrailsStack-Dev\nnpx cdk deploy AIStudio-FrontendStack-Dev\n\n# Or deploy all at once\nnpx cdk deploy --all\n```\n\nSee [Deployment Guide](./docs/DEPLOYMENT.md) for detailed instructions.\n\n## 📊 Cost Comparison\n\n### Traditional Approach (Per-Seat Licenses)\n```\n100 users × $20/month (ChatGPT Plus) = $2,000/month = $24,000/year\n```\n\n### AI Studio (API-Based)\n```\n100 users × average 50,000 tokens/day\n= 1.5M tokens/day × 30 days = 45M tokens/month\n= $450/month (GPT-5) + $200 infrastructure = $650/month = $7,800/year\n\nSavings: $16,200/year (67% reduction)\n```\n\nWith mixed usage (Gemini + GPT-4 mini), costs drop to ~$200/month (**90% savings**).\n\n## 🛠️ Tech Stack\n\n### Frontend\n- Next.js 16 with App Router\n- React 19 with Server Components\n- Shadcn UI component library\n- Tailwind CSS for styling\n- Vercel AI SDK v6 for streaming\n\n### Backend\n- ECS Fargate for container hosting\n- Aurora Serverless v2 (PostgreSQL)\n- Drizzle ORM with postgres.js driver\n- AWS Lambda for async processing\n- S3 for document storage\n- AWS Textract for OCR\n\n### Infrastructure\n- AWS CDK for Infrastructure as Code\n- VPC with multi-AZ subnets\n- Application Load Balancer with HTTP/2\n- CloudWatch + ADOT for observability\n- Secrets Manager for credentials\n- Cognito for authentication\n\n## 📚 Documentation\n\n### Core Documentation\n- [Architecture Overview](./docs/ARCHITECTURE.md) - Complete system architecture\n- [Deployment Guide](./docs/DEPLOYMENT.md) - Step-by-step deployment\n- [API Reference](./docs/API_REFERENCE.md) - REST endpoints and server actions\n- [Error Reference](./docs/ERROR_REFERENCE.md) - Error codes and debugging\n- [Troubleshooting](./docs/TROUBLESHOOTING.md) - Common issues and solutions\n\n### Infrastructure\n- [CDK Infrastructure](./infra/README.md) - AWS CDK stack details\n- [VPC Network Topology](./docs/diagrams/02-vpc-network-topology.md)\n- [AWS Service Architecture](./docs/diagrams/03-aws-service-architecture.md)\n\n### Visual Architecture\n- [All Diagrams (9 total)](./docs/diagrams/README.md) - 10,000+ lines of visual documentation\n- [Database ERD](./docs/diagrams/04-database-erd.md) - 54 PostgreSQL tables\n- [Authentication Flow](./docs/diagrams/05-authentication-flow.md) - OAuth 2.0 flow\n- [Streaming Architecture](./docs/diagrams/09-streaming-architecture.md) - SSE implementation\n\n### Integration\n- [API v1 Quickstart](./docs/guides/api-quickstart.md) - Getting started with the REST API\n- [OAuth2 Integration](./docs/guides/oauth-integration.md) - Authenticating external apps\n- [MCP Integration](./docs/guides/mcp-integration.md) - Connecting AI tools via MCP\n\n### Development\n- [Developer Guide](./DEVELOPER_GUIDE.md) - Development setup and workflow\n- [Library Documentation](./lib/README.md) - Core utilities and patterns\n- [CLAUDE.md](./CLAUDE.md) - AI assistant development guidelines\n\n## 🧪 Testing\n\n```bash\n# Run test suite\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Run linting\nnpm run lint\n\n# Run type checking\nnpm run typecheck\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.\n\n## 📄 License\n\nMIT License - see [LICENSE](./LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\nAI Studio was developed by Peninsula School District (PSD401) to bring world-class AI tools to K-12 education. Built with:\n\n- [Next.js](https://nextjs.org/) - React framework\n- [Vercel AI SDK](https://sdk.vercel.ai/) - AI streaming infrastructure\n- [AWS CDK](https://aws.amazon.com/cdk/) - Infrastructure as Code\n- [Shadcn UI](https://ui.shadcn.com/) - UI component library\n\n## 🔗 Links\n\n- **Website**: [psd401.ai/aistudio](https://psd401.ai/aistudio)\n- **Documentation**: [docs/](./docs/)\n- **Issues**: [GitHub Issues](https://github.com/psd401/aistudio/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/psd401/aistudio/discussions)\n\n---\n\n**Built with ❤️ for K-12 education**\n\n*Making frontier AI accessible, secure, and affordable for every student.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsd401%2Faistudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsd401%2Faistudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsd401%2Faistudio/lists"}