d.viti 146f657bea
Some checks failed
Helm Chart Build / lint-only (push) Has been skipped
Build and Deploy / build-web (push) Failing after 7s
Helm Chart Build / build-helm (push) Successful in 8s
Build and Deploy / build-api (push) Successful in 42s
Enhance Swagger documentation and web UI navigation
Enhanced API Swagger documentation and improved web interface navigation
with dropdown menus and better organization.

API Changes (api/main.py):
==========================
- Enhanced FastAPI app description with architecture diagram
- Added detailed rate limiting information
- Added server configurations (production + local)
- Added contact and license information
- Enhanced all endpoint descriptions with:
  * Detailed parameter descriptions
  * Response descriptions
  * Error responses
  * Rate limit information
  * Usage examples
- Added Field descriptions to all Pydantic models
- Added schema examples for better Swagger UI
- Enhanced LLM endpoints with AI rate limiting details
- Added status codes (201, 404, 429, 500) to endpoints
- Improved startup message with docs URLs

Swagger UI Improvements:
- Better organized endpoint groups (Root, Health, Items, Users, LLM)
- Detailed request/response schemas
- Interactive examples for all endpoints
- Rate limiting documentation
- Architecture overview in description

Web Changes (web/templates/base.html):
======================================
- Added dropdown menu for API documentation with:
  * API Root (/)
  * Swagger UI (/docs)
  * ReDoc (/redoc)
  * OpenAPI JSON (/openapi.json)
- Added emoji icons to all menu items for better UX
- Added tooltips (title attributes) to all links
- Renamed "API Config" to "Settings" for clarity
- Added CSS for dropdown menu functionality
- Improved footer text
- Better visual hierarchy with icons

Navigation Menu:
- 🏠 Home
- 📦 Items
- 👥 Users
- 🤖 LLM Chat
- 📚 API Docs (dropdown with 4 options)
- ⚙️ Settings

All endpoints now have comprehensive documentation visible in Swagger UI
at https://commandware.it/api/docs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 17:20:34 +02:00

API7 Enterprise Demo

Complete production-ready deployment of API7 Enterprise API Gateway on Kubernetes.

Features

  • API7 Enterprise Gateway with advanced routing and plugins
  • Kubernetes Service Discovery for dynamic backend discovery
  • Automatic TLS with cert-manager and Let's Encrypt
  • Rate Limiting (standard + AI-based for LLM endpoints)
  • CORS policies for browser-based applications
  • Secure Secret Management with External Secrets Operator support
  • CI/CD integration with ArgoCD
  • Complete Documentation with MkDocs

Quick Start

Prerequisites

  • Kubernetes cluster (1.24+)
  • Helm 3.x
  • kubectl configured
  • cert-manager installed
  • NGINX Ingress Controller

Installation

  1. Clone the repository:

    git clone https://git.commandware.com/demos/api7-demo.git
    cd api7-demo
    
  2. Create API7 credentials secret:

    # Copy the template
    cp api7-credentials.yaml.template api7-credentials.yaml
    
    # Get the admin key from API7 installation
    kubectl get secret -n api7ee api7ee3-0-1759339083 \
      -o jsonpath='{.data.admin_key}' | base64 -d
    
    # Edit api7-credentials.yaml and fill in the actual admin key
    vim api7-credentials.yaml
    
    # Apply the secret
    kubectl apply -f api7-credentials.yaml -n api7ee
    
  3. Update values.yaml to use the secret:

    api7:
      gateway:
        existingSecret: "api7-credentials"
    
  4. Deploy with Helm:

    helm upgrade --install api7ee-demo helm/api7ee-demo-k8s \
      --namespace api7ee \
      --create-namespace \
      --values values.yaml
    
  5. Verify deployment:

    kubectl get all -n api7ee
    kubectl logs -n api7ee job/api7ee-demo-api7ee-demo-k8s-adc-sync
    curl https://commandware.it/api/health
    

Documentation

View comprehensive documentation at: web/docs/

Support

Description
Demo for API7 on kubernetes with MetaLLB and Nginx-Ingress (community)
Readme 415 KiB
Languages
Python 40%
HTML 32.5%
CSS 16.1%
JavaScript 6.2%
Smarty 3.5%
Other 1.7%