Initial commit: CODEX_ADK (Svrnty Console) MVP v1.0.0

This is the initial commit for the CODEX_ADK project, a full-stack AI agent
management platform featuring:

BACKEND (ASP.NET Core 8.0):
- CQRS architecture with 6 commands and 7 queries
- 16 API endpoints (all working and tested)
- PostgreSQL database with 5 entities
- AES-256 encryption for API keys
- FluentValidation on all commands
- Rate limiting and CORS configured
- OpenAPI/Swagger documentation
- Docker Compose setup (PostgreSQL + Ollama)

FRONTEND (Flutter 3.x):
- Dark theme with Svrnty branding
- Collapsible sidebar navigation
- CQRS API client with Result<T> error handling
- Type-safe endpoints from OpenAPI schema
- Multi-platform support (Web, iOS, Android, macOS, Linux, Windows)

DOCUMENTATION:
- Comprehensive API reference
- Architecture documentation
- Development guidelines for Claude Code
- API integration guides
- context-claude.md project overview

Status: Backend ready (Grade A-), Frontend integration pending

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-26 18:32:38 -04:00
commit 3fae2fcbe1
248 changed files with 19504 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
#!/bin/bash
# Update API Client from OpenAPI Specification
#
# This script regenerates Dart API client code from the OpenAPI contract.
# Run this after the backend team updates docs/openapi.json
set -e # Exit on error
echo "🔄 Updating API Client from OpenAPI Specification..."
echo ""
# Check if api-schema.json exists
if [ ! -f "api-schema.json" ]; then
echo "❌ Error: api-schema.json not found"
echo ""
echo "Please copy the OpenAPI spec from backend:"
echo " cp ../backend/docs/openapi.json ./api-schema.json"
echo ""
exit 1
fi
# Show schema info
SCHEMA_SIZE=$(wc -c < api-schema.json | tr -d ' ')
echo "📄 OpenAPI Schema: api-schema.json (${SCHEMA_SIZE} bytes)"
echo ""
# Check if backend CHANGELOG exists and show recent changes
if [ -f "../backend/docs/CHANGELOG.md" ]; then
echo "📋 Recent Backend Changes:"
echo "────────────────────────────"
head -n 20 ../backend/docs/CHANGELOG.md | grep -v "^#" | grep -v "^$" || echo "No recent changes"
echo "────────────────────────────"
echo ""
fi
# Run build_runner to generate code
echo "🏗️ Running code generation..."
echo ""
flutter pub run build_runner build --delete-conflicting-outputs
if [ $? -eq 0 ]; then
echo ""
echo "✅ API client updated successfully!"
echo ""
echo "Next steps:"
echo " 1. Review generated types in lib/api/generated/"
echo " 2. Update endpoint extensions if needed"
echo " 3. Run tests: flutter test"
echo " 4. Commit changes: git add . && git commit -m 'chore: Update API client'"
echo ""
else
echo ""
echo "❌ Code generation failed"
echo ""
echo "Troubleshooting:"
echo " 1. Check api-schema.json is valid OpenAPI 3.x"
echo " 2. Run: flutter clean && flutter pub get"
echo " 3. Check build errors above"
echo ""
exit 1
fi
+90
View File
@@ -0,0 +1,90 @@
#!/bin/bash
# Verify API Type Safety
#
# This script validates that all API code follows strict typing standards.
# No dynamic types, all explicit types, compile-time safety.
set -e
echo "🔍 Verifying API Type Safety..."
echo ""
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
ERRORS=0
# Check for dynamic types
echo "1. Checking for forbidden 'dynamic' types..."
if grep -rn "\bdynamic\b" lib/api --include="*.dart" 2>/dev/null | grep -v "// " | grep -v "/// "; then
echo -e "${RED}❌ Found forbidden 'dynamic' types${NC}"
ERRORS=$((ERRORS + 1))
else
echo -e "${GREEN}✅ No 'dynamic' types found${NC}"
fi
echo ""
# Check for untyped var
echo "2. Checking for untyped 'var' declarations..."
if grep -rn "\bvar\s" lib/api --include="*.dart" 2>/dev/null | grep -v "// " | grep -v "/// " | grep -v "for (var"; then
echo -e "${YELLOW}⚠️ Found 'var' declarations (verify they have type inference)${NC}"
else
echo -e "${GREEN}✅ No problematic 'var' declarations${NC}"
fi
echo ""
# Run static analysis
echo "3. Running static analysis..."
flutter analyze lib/api 2>&1 | tee /tmp/analyze_output.txt
if grep -q "error •" /tmp/analyze_output.txt; then
echo -e "${RED}❌ Static analysis found errors${NC}"
ERRORS=$((ERRORS + 1))
else
echo -e "${GREEN}✅ Static analysis passed${NC}"
fi
echo ""
# Check for proper Serializable implementation
echo "4. Checking Serializable implementations..."
CLASSES=$(grep -rn "class.*implements Serializable" lib/api --include="*.dart" | wc -l | tr -d ' ')
echo " Found ${CLASSES} Serializable classes"
if [ "$CLASSES" -eq 0 ]; then
echo -e "${YELLOW}⚠️ No Serializable classes found (add queries/commands/DTOs)${NC}"
else
echo -e "${GREEN}✅ Serializable implementations found${NC}"
fi
echo ""
# Check for Result type usage
echo "5. Checking Result<T> usage in endpoints..."
if grep -rn "Future<Result<" lib/api/endpoints --include="*.dart" 2>/dev/null; then
echo -e "${GREEN}✅ Endpoints use Result<T> pattern${NC}"
else
echo -e "${YELLOW}⚠️ No endpoints found or not using Result<T>${NC}"
fi
echo ""
# Summary
echo "════════════════════════════════════════"
if [ $ERRORS -eq 0 ]; then
echo -e "${GREEN}✅ All type safety checks passed!${NC}"
echo ""
echo "Your API code follows strict typing standards:"
echo " • No dynamic types"
echo " • Explicit type annotations"
echo " • Serializable interface enforced"
echo " • Result<T> for error handling"
echo ""
exit 0
else
echo -e "${RED}❌ Type safety verification failed with ${ERRORS} error(s)${NC}"
echo ""
echo "Please fix the issues above and run again."
echo ""
exit 1
fi