LLM-driven system boundary and responsibility mapper
The system-mapper project is a web application that utilizes a Large Language Model (LLM) to dynamically map system boundaries and responsibilities. Built with FastAPI and Cytoscape.js, it provides an interactive interface for visualizing system architecture.
This repository accompanies a tutorial article available at: [INSERT_TUTORIAL_URL_HERE]
- Docker (version 20.10 or later)
- Kubernetes (version 1.18 or later)
- Python (version 3.11 or later)
- OpenAI API Key (create an account at OpenAI)
-
Clone the repository:
git clone https://github.com/yourusername/system-mapper.git cd system-mapper -
Build the Docker images:
docker build -t system-mapper-backend ./backend docker build -t system-mapper-frontend ./frontend
-
Deploy to Kubernetes:
kubectl apply -f kubernetes/
-
Set up the environment variable for the API key:
kubectl create secret generic relaxai-secret --from-literal=api-key=YOUR_API_KEY_HERE
-
Access the application:
- Get the external IP of the frontend service:
kubectl get services frontend-service
- Open your browser and navigate to
http://<FRONTEND-EXTERNAL-IP>.
.
├── .gitignore
├── backend
│ ├── Dockerfile
│ ├── app.py
│ └── requirements.txt
├── frontend
│ ├── Dockerfile
│ ├── index.html
│ └── app.js
└── kubernetes
├── backend-deployment.yaml
├── backend-service.yaml
├── frontend-deployment.yaml
├── frontend-service.yaml
└── relaxai-secret.yaml
- FastAPI: A modern web framework for building APIs with Python 3.6+ based on standard Python type hints.
- Cytoscape.js: A JavaScript library for visualizing complex networks and graphs.
- Kubernetes: An open-source system for automating the deployment, scaling, and management of containerized applications.
-
CORS Middleware in FastAPI: The backend uses CORS middleware to allow cross-origin requests, which is essential for frontend-backend communication.
app.add_middleware( CORSMiddleware, allow_origins=["*"], # For demo purposes; tighten for production )
-
Dynamic API URL in Frontend: The frontend dynamically sets the API URL based on the environment, allowing for easy local and production configurations.
const API_URL = window.location.hostname === 'localhost' ? 'http://localhost:8000' : 'http://<BACKEND-EXTERNAL-IP>:8000';
This project is licensed under the MIT License. See the LICENSE file for details.