Feat is a high-performance Java web framework designed with the F.E.A.T. value proposition at its core: Free, Elastic, Advanced, and Tiny. It delivers performance comparable to Vert.x while providing a Spring Boot-like development experience, all while maintaining minimal resource footprint and supporting AI-native capabilities.
| Value | Description |
|---|---|
| 🆓 Free | Open source under AGPL-3.0; commercial licensing available for proprietary use |
| 🚀 Elastic | Handles massive concurrency with flexible scaling to meet traffic peaks |
| 🌟 Advanced | Supports modern web protocols (HTTP/1.0, HTTP/1.1, HTTP/2, WebSocket, SSE) and cloud-native architecture |
| 💎 Tiny | Lightweight design with minimal system overhead: 8ms startup time, 6MB memory footprint in native mode |
The framework provides three distinct layers: Feat Core (lightweight HTTP foundation built on smart-socket), Feat Cloud (enterprise development framework with annotation-based routing), and Feat AI (AI integration including autonomous agents and Model Context Protocol support).
This page provides a high-level introduction to Feat's architecture, positioning against competing frameworks, module organization, and deployment options. For detailed information about specific subsystems, see Getting Started, Feat Core: HTTP Server, Feat Cloud: Controllers and Routing, and Feat AI: Autonomous Agents.
Sources: README_zh.md13-21 README.md13-21 pages/src/content/docs/index.mdx22-37
Feat is designed to combine the performance characteristics of Vert.x with the developer experience of Spring Boot, while introducing AI-native capabilities and cloud-native deployment optimizations.
| Metric | Feat (Native) | Feat (JVM) | Spring Boot | Vert.x |
|---|---|---|---|---|
| Startup Time | 8ms | 60ms | ~700ms | ~500ms |
| Memory Usage | 6MB (fixed) | 4-65MB (GC fluctuation) | 25-144MB (GC fluctuation) | Medium |
| Throughput | High | High | Medium | High |
| Response Latency | Extremely Low | Low | Medium | Low |
Key Differentiators:
@Controller, @RequestMapping) similar to Spring BootReActAgent with reasoning loops and Model Context Protocol (MCP) server supportSources: README_zh.md71-81 README.md73-83 pages/src/assets/performance.svg1-196 pages/src/content/docs/index.mdx6-7
Feat employs a three-tier layered architecture where each layer builds upon the previous one. Developers can choose to use only the layers they need, from low-level HTTP handlers (comparable to Vert.x) to high-level annotation-based controllers (comparable to Spring Boot) to AI-powered autonomous agents.
Three-Layer Architecture
Module Responsibilities:
| Layer | Core Classes | Purpose |
|---|---|---|
| Feat Core | Feat, HttpServer, HttpClient, HttpRequestProtocol, ServerOptions, ByteTree, WafOptions | HTTP protocol implementation (HTTP/1.x, HTTP/2, WebSocket, SSE), request/response processing, static file serving, WAF |
| Feat Cloud | ApplicationContext, @Controller, @RequestMapping, Session, Router, FeatAnnotationProcessor | Spring Boot-like annotations, component scanning, dependency injection, session management, MyBatis integration, AOT compilation |
| Feat AI | ReActAgent, ChatModel, EmbeddingModel, AgentTool, @McpEndpoint, McpClient | LLM integration (Gitee AI, Ollama, OpenAI), autonomous agents with ReAct paradigm, MCP protocol client/server |
Sources: pom.xml11-13 pom.xml15-65 pom.xml260-268 feat-core/pom.xml24-34 feat-cloud/pom.xml29-46 feat-cloud-aot/pom.xml28-57 feat-ai/pom.xml24-34
Feat is organized as a multi-module Maven project. The parent POM pom.xml1-269 defines version management and build configuration for all modules.
| Module | Artifact ID | Dependencies | Purpose |
|---|---|---|---|
| Core | feat-core | smart-socket 1.8.4, fastjson2 2.0.57 | HTTP/1.x, HTTP/2, WebSocket, SSE protocol support |
| AI | feat-ai | feat-core | Chat model integration, ReAct agents, MCP server |
| Cloud | feat-cloud | feat-ai, mybatis (optional), redisun (optional), snakeyaml (optional) | Annotation-based development, DI, session management |
| Cloud AOT | feat-cloud-aot | feat-cloud, mybatis 3.5.11, snakeyaml 2.3, redisun 1.2.0 | AOT code generation for native images with full dependencies |
| Cloud AOT VM | feat-cloud-aot-vm | feat-cloud, mybatis 3.5.11, snakeyaml 2.3 | AOT code generation for JVM mode without Redis |
| Cloud Starter | feat-cloud-starter | feat-cloud-aot, feat-cloud | Entry point with default AOT configuration |
| Test | feat-test | feat-cloud-starter, spring-boot-starter-web 2.7.18, vertx-web 4.5.11, h2 2.0.202 | Integration tests and benchmark comparisons |
Version: All modules use version 1.5.1 as defined in pom.xml8 and Feat.java45
Sources: pom.xml15-65 feat-core/pom.xml1-36 feat-ai/pom.xml1-35 feat-cloud/pom.xml1-48 feat-cloud-aot/pom.xml1-58 feat-cloud-aot-vm/pom.xml1-42 feat-cloud-starter/pom.xml1-40 feat-test/pom.xml1-75
The feat-core module provides the foundational HTTP capabilities built directly on smart-socket. The primary entry point is the Feat class Feat.java41-176 which provides factory methods for creating servers and clients.
The ServerOptions class ServerOptions.java49-558 exposes over 20 configuration parameters including:
port(), host(), threadNum(), idleTimeout()readBufferSize(), writeBufferSize()WafOptions, addPlugin() for SSLByteTree caching for URIs and headersSources: Feat.java41-176 ServerOptions.java26-558 feat-core/pom.xml24-34
The feat-cloud module provides Spring Boot-style annotation-based development. Applications extend the ApplicationContext lifecycle which performs component scanning, bean registration, dependency injection, and routing configuration.
The AOT compilation system feat-cloud-aot/pom.xml1-58 generates code at compile time to eliminate reflection and enable GraalVM native image compilation. The feat-cloud-aot-vm variant feat-cloud-aot-vm/pom.xml1-42 excludes Redis dependencies for faster JVM development cycles.
Sources: feat-cloud/pom.xml29-46 feat-cloud-aot/pom.xml28-57 feat-cloud-aot-vm/pom.xml24-41
The feat-ai module feat-ai/pom.xml1-35 provides AI integration capabilities including chat model interfaces, autonomous agents, and Model Context Protocol (MCP) server implementation.
The ReActAgent class implements the Reasoning + Acting paradigm, executing tasks through iterative thought-action-observation loops. It integrates with the Feat Cloud layer via @McpEndpoint annotations for exposing AI tools over HTTP.
Sources: feat-ai/pom.xml24-34 pages/src/content/docs/ai/agent.mdx1-488
Feat supports three distinct development models depending on the abstraction level required. Each model is appropriate for different use cases, from low-level protocol control to high-level AI-driven applications.
Use Case: Maximum performance control, custom protocol handling, minimal dependencies
Example Code:
This model provides direct access to HttpServer via Feat.httpServer() Feat.java53-77 Manual request routing and handler registration required. Programming style comparable to Vert.x with explicit control over request processing pipeline.
Key Classes: HttpServer, HttpHandler, HttpRequestProtocol, ServerOptions, HttpOutputStream
Use Case: Enterprise applications, RESTful APIs, annotation-based development
Example Code:
This model uses ApplicationContext to discover @Controller classes via package scanning ApplicationContext.java1-500 Automatic routing generation from @RequestMapping annotations. Dependency injection with @Autowired, configuration with @Value, session management with Session interface.
Key Classes: ApplicationContext, @Controller, @RequestMapping, Router, Session, CloudOptions
Use Case: AI-driven task execution, autonomous reasoning, tool-based problem solving
Example Code:
This model enables AI-driven task execution using ReActAgent which implements the Reasoning + Acting paradigm ReActAgent.java40-122 Iterative thought-action-observation loops with built-in tools: FileOperationTool, SearchTool, WebPageReaderTool, SubAgentTool. Maximum 20 iterations by default to prevent infinite loops.
Key Classes: ReActAgent, ChatModel, AgentTool, AgentOptions, ChatModelVendor
Sources: Feat.java53-175 pages/src/content/docs/index.mdx136-148 pages/src/content/docs/ai/agent.mdx17-83
Feat applications support three deployment modes with dramatically different performance profiles. The choice depends on deployment environment constraints (cloud-native, edge, traditional server) and development workflow requirements.
| Deployment Mode | Startup Time | Memory Usage | Build Command | Container Base | Use Case |
|---|---|---|---|---|---|
| JVM Standard | ~60ms | 4-65MB (heap fluctuates) | mvn package | eclipse-temurin:21-jre | Development, testing |
| JVM with feat-cloud-aot-vm | ~60ms | 4-65MB (heap fluctuates) | mvn package -Pfeat-aot-vm | eclipse-temurin:21-jre | Development with AOT benefits |
| Native Image | ~8ms | 6MB (fixed) | GraalVM native-image | ubuntu:18.04 | Production, edge, serverless, cloud-native |
The native image build requires the feat-cloud-aot module which includes code generators for reflection-free operation:
Both modules perform compile-time code generation via AbstractSerializer implementations:
ControllerSerializer: Generates routing code from @Controller and @RequestMappingBeanSerializer: Generates dependency injection code from @Autowired and @BeanMapperSerializer: Generates MyBatis mapper implementations from @MapperMcpEndpointSerializer: Generates MCP protocol handlers from @McpEndpointVersion synchronization across all modules is managed by the root Makefile Makefile1-12 which updates:
feat-parent, feat-core, feat-ai, feat-cloud, feat-cloud-aot, feat-cloud-aot-vm, feat-cloud-starter, feat-testFeat.VERSION constant Feat.java45 for runtime version reportingCurrent version: 1.5.1 pom.xml8
Native Image Container (Recommended for Production):
JVM Container (Development/Testing):
Sources: pom.xml260-268 feat-cloud-aot/pom.xml1-58 feat-cloud-aot-vm/pom.xml1-42 Makefile1-12 pages/src/content/docs/cloud/deployment.mdx14-108 pages/src/content/docs/cloud/native-image.mdx129-136
Feat is licensed under AGPL-3.0 pom.xml68-73 Enterprise users must obtain commercial licensing for proprietary use. The framework is distributed via Maven Central with GPG signing enforced by the build pipeline pom.xml171-191
Repository Structure:
https://github.com/smartboot/feat pom.xml94-99https://oss.sonatype.org/service/local/staging/deploy/maven2/ pom.xml108tech.smartboot.feat pom.xml61.5.1 pom.xml8Sources: pom.xml66-110 README_zh.md108-110
Refresh this wiki