Skip to content

subbaraogoparaju/myarchitect

Repository files navigation

Software Architect Agent

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.

Architecture Overview

Browser (React + Vite)
        │  SSE / REST
        ▼
Spring Boot Backend  :8080
        │  MCP (SSE)
        ├──► Weather MCP Server     :8081  (wttr.in)
        └──► ServiceNow MCP Server  :8082  (mocked CMDB)

Prerequisites

Tool Version
Java 21+
Maven included via mvnw
Node.js 18+
npm 9+
OpenAI API Key required

Projects

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

Quick Start

1. Configure API Key

Edit src/main/resources/application.properties:

spring.ai.openai.api-key=YOUR_OPENAI_API_KEY_HERE

Or set the environment variable:

export SPRING_AI_OPENAI_API_KEY=sk-...

2. Start Services (in order)

Terminal 1 — Weather MCP Server

cd weather-mcp-server
../mvnw spring-boot:run
# Ready when you see: Tomcat started on port 8081

Terminal 2 — ServiceNow CMDB MCP Server

cd servicenow-mcp-server
../mvnw spring-boot:run
# Ready when you see: Tomcat started on port 8082

Terminal 3 — Backend

./mvnw spring-boot:run
# Ready when you see: Started FirstclaudeautoApplication

Terminal 4 — Frontend

cd frontend
npm install
npm run dev
# Open http://localhost:5173

Order matters: The backend connects to both MCP servers at startup. Start weather and ServiceNow servers before the backend.

API Endpoints

Architect Agent

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}

Weather

Method Path Description
POST /api/weather/ask Ask a weather question via MCP

Request body:

{ "question": "What is the weather in London?" }

Configuration

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

Features

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors