Skip to content

Commit ce52d38

Browse files
Add platform standardization demo scenario (api-server module)
eat: add api-server module for platform standardization demo - New educational risk scenario: c5.large → t3.large instance swap - Demonstrates how compliance-driven changes can introduce hidden risks - Includes demo-app (React) with compliance dashboard UI - "Open in Editor" links to github.dev for seamless demo flow - Infrastructure: EC2, ALB, IAM, CloudWatch alarms, security groups The scenario shows Overmind catching CPU credit risks that traditional tools miss when instance specs look identical.
1 parent dd21daf commit ce52d38

File tree

119 files changed

+14080
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+14080
-177
lines changed

main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,3 +384,17 @@ module "heritage" {
384384
message_size_breach_lambda_memory = var.message_size_breach_lambda_memory
385385
message_size_breach_retention_days = var.message_size_breach_retention_days
386386
}
387+
388+
# API Server
389+
module "api_server" {
390+
source = "./modules/api-server"
391+
392+
enabled = true
393+
instance_type = "c5.large"
394+
395+
vpc_id = module.baseline.vpc_id
396+
public_subnets = module.baseline.public_subnets
397+
ami_id = module.baseline.ami_id
398+
399+
name_prefix = "api"
400+
}

modules/api-server/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# API Server Module - Platform Standardization Demo
2+
3+
> Learn how standardizing on a single instance family can introduce hidden risks when workload characteristics aren't considered.
4+
5+
## 🎬 Demo Flow
6+
7+
### 1. Open Compliance Dashboard
8+
Launch the demo app at your Vercel URL or run locally:
9+
```bash
10+
cd demo-app && npm install && npm run dev
11+
```
12+
13+
### 2. View the Auto-Created Ticket
14+
- Dashboard shows 97.9% compliance, 1 non-compliant instance
15+
- Click **"View Ticket"** → Opens ticket INFRA-4721
16+
- Notice: "Standard Change - no CAB approval required"
17+
18+
### 3. Click "Open in Editor"
19+
- In **Related Resources**, click **"Open in Editor"**
20+
- Opens github.dev directly at line 389 of `main.tf`
21+
22+
### 4. Make the Change
23+
Change the instance type:
24+
```diff
25+
- instance_type = "c5.large"
26+
+ instance_type = "t3.large"
27+
```
28+
29+
### 5. Create PR & Watch Overmind
30+
```bash
31+
git checkout -b align-platform-standards
32+
git commit -am "Align API server with t3 platform standards"
33+
git push origin align-platform-standards
34+
```
35+
Overmind analyzes the PR and catches the hidden risk.
36+
37+
## 🎯 The Scenario
38+
39+
| What the Engineer Sees | What Actually Happens |
40+
|------------------------|----------------------|
41+
| c5.large → t3.large | Compute-optimized → Burstable |
42+
| Same specs (2 vCPU, 4GB) | Different CPU models |
43+
| "Standard change" | Performance drops to 30% after ~1 hour |
44+
45+
**The trap**: Both instances look identical on paper, but t3 uses CPU credits. At 70% sustained CPU, credits exhaust and performance collapses.
46+
47+
## 🔍 What Overmind Catches
48+
49+
1. **Blast Radius** - ALB, target groups, alarms, security groups
50+
2. **Educational Risk** - Explains CPU credit behavior
51+
3. **Impact Analysis** - Predicts performance degradation
52+
53+
## 💰 Cost Management
54+
55+
| State | Cost |
56+
|-------|------|
57+
| Running | ~$79/month |
58+
| Stopped | ~$0.60/month (EBS only) |
59+
60+
```bash
61+
# Stop between demos
62+
aws ec2 stop-instances --instance-ids $(terraform output -raw api_server_instance_id)
63+
64+
# Destroy when done
65+
terraform destroy -target=module.api_server
66+
```
67+
68+
## 📖 Learn More
69+
70+
- [T3 CPU Credits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html)
71+
- [C5 vs T3 Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compute-optimized-instances.html)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Welcome to your Lovable project
2+
3+
## Project info
4+
5+
**URL**: https://lovable.dev/projects/REPLACE_WITH_PROJECT_ID
6+
7+
## How can I edit this code?
8+
9+
There are several ways of editing your application.
10+
11+
**Use Lovable**
12+
13+
Simply visit the [Lovable Project](https://lovable.dev/projects/REPLACE_WITH_PROJECT_ID) and start prompting.
14+
15+
Changes made via Lovable will be committed automatically to this repo.
16+
17+
**Use your preferred IDE**
18+
19+
If you want to work locally using your own IDE, you can clone this repo and push changes. Pushed changes will also be reflected in Lovable.
20+
21+
The only requirement is having Node.js & npm installed - [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
22+
23+
Follow these steps:
24+
25+
```sh
26+
# Step 1: Clone the repository using the project's Git URL.
27+
git clone <YOUR_GIT_URL>
28+
29+
# Step 2: Navigate to the project directory.
30+
cd <YOUR_PROJECT_NAME>
31+
32+
# Step 3: Install the necessary dependencies.
33+
npm i
34+
35+
# Step 4: Start the development server with auto-reloading and an instant preview.
36+
npm run dev
37+
```
38+
39+
**Edit a file directly in GitHub**
40+
41+
- Navigate to the desired file(s).
42+
- Click the "Edit" button (pencil icon) at the top right of the file view.
43+
- Make your changes and commit the changes.
44+
45+
**Use GitHub Codespaces**
46+
47+
- Navigate to the main page of your repository.
48+
- Click on the "Code" button (green button) near the top right.
49+
- Select the "Codespaces" tab.
50+
- Click on "New codespace" to launch a new Codespace environment.
51+
- Edit files directly within the Codespace and commit and push your changes once you're done.
52+
53+
## What technologies are used for this project?
54+
55+
This project is built with:
56+
57+
- Vite
58+
- TypeScript
59+
- React
60+
- shadcn-ui
61+
- Tailwind CSS
62+
63+
## How can I deploy this project?
64+
65+
Simply open [Lovable](https://lovable.dev/projects/REPLACE_WITH_PROJECT_ID) and click on Share -> Publish.
66+
67+
## Can I connect a custom domain to my Lovable project?
68+
69+
Yes, you can!
70+
71+
To connect a domain, navigate to Project > Settings > Domains and click Connect Domain.
72+
73+
Read more here: [Setting up a custom domain](https://docs.lovable.dev/features/custom-domain#custom-domain)
194 KB
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "src/index.css",
9+
"baseColor": "slate",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
}
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
7+
export default tseslint.config(
8+
{ ignores: ["dist"] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ["**/*.{ts,tsx}"],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
23+
"@typescript-eslint/no-unused-vars": "off",
24+
},
25+
},
26+
);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Stratum - Infrastructure Compliance</title>
7+
<meta name="description" content="Enterprise infrastructure compliance monitoring and management platform" />
8+
<meta name="author" content="Stratum Technologies" />
9+
10+
<meta property="og:title" content="Stratum - Infrastructure Compliance" />
11+
<meta property="og:description" content="Real-time infrastructure compliance monitoring across all environments" />
12+
<meta property="og:type" content="website" />
13+
<meta property="og:image" content="https://lovable.dev/opengraph-image-p98pqg.png" />
14+
15+
<meta name="twitter:card" content="summary_large_image" />
16+
<meta name="twitter:site" content="@CloudOps" />
17+
<meta name="twitter:image" content="https://lovable.dev/opengraph-image-p98pqg.png" />
18+
19+
<link rel="preconnect" href="https://fonts.googleapis.com">
20+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
21+
</head>
22+
23+
<body>
24+
<div id="root"></div>
25+
<script type="module" src="/src/main.tsx"></script>
26+
</body>
27+
</html>

0 commit comments

Comments
 (0)