# agentmiddleware **Repository Path**: mastwet/agentmiddleware ## Basic Information - **Project Name**: agentmiddleware - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-08 - **Last Updated**: 2026-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Agent Middleware AI Agent middleware platform with dynamic multi-datasource switching, SQL-based endpoint configuration, JWT authentication, and rate-limited data APIs. ## Tech Stack ### Backend - **Java 25** / **Spring Boot 4.0.5** - **MyBatis-Plus** — ORM with logical delete, auto-fill - **Dynamic Datasource** — Runtime switching between MySQL, Oracle, MSSQL - **HikariCP** — High-performance connection pooling - **Redis** — Embedded (dev) / standalone (prod) caching - **JWT** (jjwt 0.12) — Stateless authentication - **Knife4j** (Swagger) — API documentation at `/swagger-ui.html` - **JSQLParser** — SQL safety validation for agent queries ### Frontend - **Vue 3** (Composition API) / **Vite 8** - **Element Plus** — UI component library - **Pinia** — State management - **Vue Router 4** — Client-side routing - **Axios** — HTTP client ## Project Structure ``` agentmiddleware/ ├── src/main/java/pro/robomaster/aimiddleware/ │ ├── AgentmiddlewareApplication.java # Entry point │ ├── bootstrap/ # Startup error handling │ ├── common/ # Result, exceptions, page helpers │ ├── config/ # Security, Redis, MyBatis, Web config │ ├── controller/ # REST controllers │ │ ├── AuthController # Login, token refresh │ │ ├── AgentDataController # Public agent query API (/api/v1) │ │ ├── DatasourceController # Datasource CRUD │ │ ├── EndpointController # Endpoint CRUD │ │ └── DashboardController # Dashboard statistics │ ├── dto/ # Data transfer objects │ ├── entity/ # MyBatis-Plus entities │ ├── mapper/ # MyBatis-Plus mappers │ ├── safety/ # SQL safety parsing │ ├── security/ # JWT filter │ ├── service/ # Business logic │ ├── sync/ # Scheduled sync engine │ └── util/ # JWT, rate limiter ├── frontend/ # Vue 3 + Vite frontend │ └── src/ │ ├── api/ # Axios request modules │ ├── layout/ # Main layout & sidebar │ ├── router/ # Vue Router config │ ├── store/ # Pinia stores │ └── views/ # Page components ├── sql/init.sql # Database schema & seed data ├── build.gradle # Gradle build config └── .github/workflows/ci.yml # GitHub Actions CI ``` ## Prerequisites - **JDK 25** (Temurin recommended) - **Gradle 9.4+** (wrapper included) - **MySQL 8.0+** (XAMPP or standalone) - **Node.js 22+** and **npm** (for frontend) - **Redis** (embedded in dev, optional external for prod) - (Optional) Oracle 21c+ / SQL Server 2022+ ## Quick Start ### 1. Initialize Database Execute `sql/init.sql` using MySQL Workbench, phpMyAdmin, DBeaver, or any database tool: ```bash mysql -u root < sql/init.sql ``` Default admin account: `admin` / `admin` ### 2. Configure Application Edit `src/main/resources/application.yml` to set your MySQL credentials: ```yaml spring: datasource: dynamic: datasource: mysql: url: jdbc:mysql://localhost:3306/agent_middleware?... username: root password: your_password ``` ### 3. Start Backend ```bash ./gradlew bootRun # macOS / Linux gradlew.bat bootRun # Windows ``` API documentation available at: http://localhost:8080/swagger-ui.html ### 4. Start Frontend ```bash cd frontend npm install npm run dev ``` Frontend dev server at: http://localhost:5173 ## API Overview | Endpoint | Method | Description | |---|---|---| | `/api/auth/login` | POST | JWT login | | `/api/v1/{endpointCode}` | GET | Agent data query (public) | | `/api/datasource/*` | CRUD | Datasource management | | `/api/endpoint/*` | CRUD | Endpoint configuration | | `/api/dashboard/*` | GET | Dashboard statistics | | `/actuator/health` | GET | Health check | ## License Proprietary. All rights reserved. --- **Author**: mastwet@undifine foundation