An AI-powered software architecture assistant built with Spring Boot 3.4.3, Spring AI 1.0.0 GA, and a React 18 frontend. The agent generates detailed architecture documents in real-time via Server-Sent Events (SSE) and has access to live weather data and a mocked ServiceNow CMDB through MCP (Model Context Protocol) servers.
Browser (React + Vite)
│ SSE / REST
▼
Spring Boot Backend :8080
│ MCP (SSE)
├──► Weather MCP Server :8081 (wttr.in)
└──► ServiceNow MCP Server :8082 (mocked CMDB)
| Tool | Version |
|---|---|
| Java | 21+ |
| Maven | included via mvnw |
| Node.js | 18+ |
| npm | 9+ |
| OpenAI API Key | required |
| Folder | Description | Port |
|---|---|---|
/ |
Main Spring Boot backend | 8080 |
weather-mcp-server/ |
Weather MCP server | 8081 |
servicenow-mcp-server/ |
ServiceNow CMDB MCP server | 8082 |
frontend/ |
React + Vite UI | 5173 |
Edit src/main/resources/application.properties:
spring.ai.openai.api-key=YOUR_OPENAI_API_KEY_HEREOr set the environment variable:
export SPRING_AI_OPENAI_API_KEY=sk-...Terminal 1 — Weather MCP Server
cd weather-mcp-server
../mvnw spring-boot:run
# Ready when you see: Tomcat started on port 8081Terminal 2 — ServiceNow CMDB MCP Server
cd servicenow-mcp-server
../mvnw spring-boot:run
# Ready when you see: Tomcat started on port 8082Terminal 3 — Backend
./mvnw spring-boot:run
# Ready when you see: Started FirstclaudeautoApplicationTerminal 4 — Frontend
cd frontend
npm install
npm run dev
# Open http://localhost:5173Order matters: The backend connects to both MCP servers at startup. Start weather and ServiceNow servers before the backend.
| Method | Path | Description |
|---|---|---|
POST |
/api/architect/stream |
Stream architecture design (SSE) |
Request body:
{ "prompt": "Design a real-time chat application" }Response: text/event-stream — tokens as {"token":"..."}, ends with {"done":true}
| Method | Path | Description |
|---|---|---|
POST |
/api/weather/ask |
Ask a weather question via MCP |
Request body:
{ "question": "What is the weather in London?" }src/main/resources/application.properties
spring.ai.openai.api-key=YOUR_KEY
spring.ai.openai.chat.options.model=gpt-4o-mini
spring.mvc.async.request-timeout=120000
server.port=8080
spring.ai.mcp.client.sse.connections.weather.url=http://localhost:8081
spring.ai.mcp.client.sse.connections.servicenow.url=http://localhost:8082- Real-time SSE streaming of AI-generated architecture documents
- Markdown rendering with syntax highlighting
- Download generated design as PDF
- Weather queries via MCP tool calling
- ServiceNow CMDB queries (mocked) via MCP tool calling
- Example prompts for quick start