You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star1 (1)You must be signed in to star a repository
About
An AI-native monorepo combining a software requirements management SaaS platform with an agentic Google Calendar integration system. Features Gemini-powered spec generation and MCP-based scheduling.
A polyglot, AI-native monorepo that combines a software requirements management SaaS platform (Blueprint Hub) with an agentic Google Calendar integration system — built as an academic R&D sandbox for exploring agentic software architecture.
sequenceDiagram
actor User
participant FE as Next.js Frontend
participant BE as FastAPI Backend
participant LLM as Gemini 2.5 Flash
participant DB as DualRepository
User->>FE: Enter project idea (raw text)
FE->>BE: POST /api/generate { prompt, userId }
BE->>LLM: System prompt + user input
LLM-->>BE: JSON spec (9 fields incl. processDescription)
BE->>DB: save_spec(data, userId)
DB-->>BE: filename/ID
BE-->>FE: { data, filename, isMock }
FE->>BE: POST /api/visualize-spec { specId, userId }
BE->>BE: parse_process_steps → process_description_to_excalidraw
BE->>DB: save visualization JSON
BE-->>FE: { excalidrawJson, elementCount }
FE-->>User: Rendered Artifact (Mermaid / Excalidraw)
Loading
3.3 Calendar Agent Data Flow
sequenceDiagram
actor User
participant NL as NL Agent (nl_agent.py)
participant Agent as CalendarAgent (main.py)
participant MCP as MCP Client (mcp_client.py)
participant Server as MCP Server (server.js)
participant GCal as Google Calendar API
User->>NL: Natural-language command (Thai/EN)
NL->>NL: _parse_with_gemini() → fallback _parse_with_rules()
NL-->>Agent: Normalized intent { type, start, end, duration_weeks }
Agent->>Agent: expand_recurring_events()
Agent->>MCP: list_events(timeMin, timeMax)
MCP->>Server: JSON-RPC tools/call
Server->>GCal: calendar.events.list()
GCal-->>Server: Event list
Server-->>MCP: { events }
MCP-->>Agent: existing events
Agent->>Agent: check_conflict() → find_available_slots()
Agent->>Agent: calculate_time_slot_score() → rank_suggestions()
Agent-->>User: Conflict report + ranked alternatives
User->>Agent: Choice (skip / overwrite / use suggestion / cancel)
Agent->>MCP: create_event(summary, start, end)
MCP->>Server: JSON-RPC tools/call
Server->>GCal: calendar.events.insert()
GCal-->>Server: Created event
Server-->>Agent: { success, eventId }
Agent-->>User: ✅ Confirmation
Loading
3.4 Entity–Relationship Diagram
erDiagram
User {
string id PK
string email UK
string name
string role
string provider
string bio
datetime joinedDate
}
Account {
string id PK
string userId FK
string provider
string providerAccountId
string access_token
}
Session {
string id PK
string sessionToken UK
string userId FK
datetime expires
}
Project {
string id PK
string title
text summary
string authorId FK
boolean isPublished
string[] tags
}
Version {
string id PK
string versionNumber
string label
text description
string projectId FK
}
Artifact {
string id PK
string type
string title
text content
string contentFormat
string versionId FK
}
ProjectSpec {
string id PK
string userId FK
string artifactId FK
string projectName
text problemStatement
text solutionOverview
string[] functionalRequirements
string[] nonFunctionalRequirements
string[] techStackRecommendation
string status
boolean isPublished
json visualizationProcess
string specHash
}
DiagramGenerationLog {
string id PK
string userId FK
string specId
string diagramType
datetime generatedAt
}
Implementation {
string id PK
string language
string repoUrl
string versionId FK
}
Reference {
string id PK
string title
string url
string projectId FK
}
Contribution {
string id PK
string userId FK
string projectTitle
string action
string type
}
User ||--o{ Account : "has"
User ||--o{ Session : "maintains"
User ||--o{ Project : "authors"
User ||--o{ ProjectSpec : "owns"
User ||--o{ DiagramGenerationLog : "generates"
User ||--o{ Contribution : "makes"
Project ||--o{ Version : "has"
Project ||--o{ Reference : "cites"
Version ||--o{ Artifact : "contains"
Version ||--o{ Implementation : "implements"
Artifact ||--o| ProjectSpec : "links"
NL Intent Parser (nl_agent.py) — Gemini-first with regex rule-based fallback supporting Thai and English date formats
CalendarAgent Scoring (main.py) — calculate_time_slot_score() ranks alternative slots 0–100 based on time-of-day preferences, lunch avoidance, and proximity to ideal start time
MCP Server (python/mcp-server/server.js) — Implements list_events, create_event, update_event, delete_event, check_availability over JSON-RPC stdio transport
5. Testing
5.1 Coverage Summary
Layer
Framework
Tests
Coverage
Frontend Unit
Vitest + Testing Library
44 passing
74.3% lines
API Routes
Vitest
25 passing
100% core routes
Backend
pytest
20 passing
~35% overall
E2E
Playwright
1/1 critical path
generate + save verified
Configured thresholds (CI fails if not met): Lines/Statements ≥ 50%, Functions/Branches ≥ 20%.
5.2 Test Commands
# Frontend unit testscd frontend && bun run test:unit
# Frontend E2E testscd frontend && bun run test:e2e
# Backend testscd backend && uv run pytest
# Backend with coveragecd backend && uv run pytest --cov=. --cov-report=html
Version: 0.1.0 (Prototype MVP) | Last Updated: April 2026 | Author: CS Student R&D Project
About
An AI-native monorepo combining a software requirements management SaaS platform with an agentic Google Calendar integration system. Features Gemini-powered spec generation and MCP-based scheduling.