Siamese is a secure incident-analysis app that turns uploaded logs into a structured incident report using Gemini.
- Browser-first UX for rapid incident triage.
- Structured JSON outputs: summary, timeline, root causes, evidence, mitigations, follow-ups, confidence.
- Containerized architecture that runs locally and mirrors Cloud Run deployment behavior.
- React 19 + TypeScript + Vite
- Google GenAI SDK (
@google/genai) - Nginx runtime container
- GitHub Actions for CI/CD
flowchart TB
subgraph Client[Client: Siamese local-first]
A[Artifacts: logs • metrics • configs • diagrams] --> B[Local parser + normalizer]
B --> C[Context compaction + evidence references]
B --> D[Local retrieval index]
Q[Question] --> E[Evidence retrieval]
D --> E
E --> F[Prompt builder text-only]
F --> G[JSON validator + repair]
G --> H[Report UI + Export]
end
F -->|Bedrock/Gemini call text-only| M[(LLM)]
M -->|Structured JSON| G
The app reads API key values in this order:
window.__SIAMESE_CONFIG__.geminiApiKeyfromenv-config.js(runtime-injected in container)VITE_GEMINI_API_KEYVITE_API_KEY
npm installcp .env.example .env.local- Set
VITE_GEMINI_API_KEY npm run dev
cp .env.example .env- Set
VITE_GEMINI_API_KEY npm run container:up- Open
http://localhost:8080 - Use
npm run container:logsto inspect startup logs
Container helper commands:
npm run container:statusto check running servicesnpm run container:restartto rebuild and restartnpm run container:downto stop and remove containersnpm run container:helpto print all supported container commands
- Run
npm run sanitizebefore opening a PR. - The sanitize script verifies
.envis not tracked and checks tracked files for obvious key material. - Full docs index:
docs/README.md
- Run all automated tests:
npm test - Watch mode while developing:
npm run test:watch - Run browser smoke tests:
npm run test:e2e - Current suite covers:
- API key resolution precedence in
config.ts - Gemini service request/response handling in
services/geminiService.ts - App flow checks in
App.tsx(validation, successful analysis rendering, service error handling) - End-to-end smoke flow (landing -> workspace -> validation error path) in
e2e/smoke.spec.ts
- API key resolution precedence in
- CI workflow:
.github/workflows/ci.ymlnpm testnpm run test:e2enpm run typechecknpm run builddocker build
- CD workflow:
.github/workflows/deploy-cloud-run.yml- Optional Cloud Run deploy path through GitHub Actions
- Auto-skips if required GCP/GitHub secrets are not configured
- Manual/external deployment (for example AI Studio) remains supported
- Multi-stage Docker build (
node:20-alpine->nginx:alpine) - Nginx serves SPA and injects runtime config via
docker/nginx/entrypoint.sh - Same image behavior locally and on Cloud Run (
PORT 8080)
Detailed design: docs/architecture.md
- Contributing:
CONTRIBUTING.md - Security policy:
SECURITY.md - Code of conduct:
CODE_OF_CONDUCT.md - Changelog:
CHANGELOG.md - Issue templates and PR template in
.github/
docs/wiki/Home.mddocs/wiki/Architecture.mddocs/wiki/Local-Development.mddocs/wiki/Cloud-Run-Deployment.mddocs/wiki/SDLC.mddocs/wiki/Roadmap.md
Planned backlog: docs/roadmap-issues.md


