How felipemarcianodev/rastro-ai works
Rastro AI is a local codebase-analysis and change-planning product. A user registers a repository, requests a survey, and explores extracted feature flows and related architecture; they can also inspect database schemas and queries, ask optional AI for suggestions, edit a flow, and validate a proposed change. The map preserves those distinct capabilities. Some subsystems are documented but unsampled, so their internal links are omitted or marked unverified rather than inferred from names.
Main entry points: SurveysController.cs Survey endpoints · Program.cs HTTP API · rastro-api.service.ts API client · database.page.ts Database views
Components 24
User experience
- Angular UI
frontend/src/app/app.ts - API client
frontend/src/app/core/rastro-api.service.ts - Survey views
frontend/src/app/pages/survey/survey.page.ts - Database views
frontend/src/app/pages/database/database.page.ts
Code analysis
- Flow extractor
backend/src/Rastro.Extractor/FlowExtractor.cs - Angular extractor
extractor-ts/lib/walker.mjs - Architecture export
backend/src/Rastro.Core/Architecture/C4WorkspaceBuilder.cs
Flow and change
- Survey endpoints
backend/src/Rastro.Api/Controllers/SurveysController.cs - Survey workers
backend/src/Rastro.Api/Analysis/SurveyWorker.cs - Flow graph
backend/src/Rastro.Core/Graph/FlowGraph.cs - Survey model
backend/src/Rastro.Core/Surveys/Survey.cs - Change proposals
backend/src/Rastro.Infrastructure/Proposals/ProposalService.cs - Change validation
backend/src/Rastro.Infrastructure/Validation/ChangeValidationService.cs - Rastro database
backend/src/Rastro.Infrastructure/RastroDbContext.cs
Database insight
- Schema extraction
backend/src/Rastro.Extractor/Database/DbSchemaExtractor.cs - SQL analysis
backend/src/Rastro.Extractor/Database/TSqlQueryAnalyzer.cs - Query services
backend/src/Rastro.Infrastructure/Database/QueryAnalysisService.cs - Query presentation
frontend/src/app/core/database/query-analysis.ts - Schema presentation
frontend/src/app/core/database/db-schema.ts
AI and interfaces
- HTTP API
backend/src/Rastro.Api/Program.cs - AI advisors
backend/src/Rastro.Ai/Suggestions/QueryAdvisor.cs - MCP tools
backend/src/Rastro.Mcp/RastroTools.cs - CLI
backend/src/Rastro.Cli/Program.cs
Other components
- Engineer
Connections 25
- Engineer → Angular UI: uses
README.md - Angular UI → API client: requests data
frontend/src/app/app.ts - API client → HTTP API: calls HTTP
frontend/src/app/core/rastro-api.service.ts - Survey views → API client: requests surveys
- Database views → API client: requests database data
- HTTP API → Survey endpoints: routes requests
- Survey endpoints → Rastro database: reads and writes
backend/src/Rastro.Api/Controllers/SurveysController.cs - Survey endpoints → Survey workers: queues surveys
backend/src/Rastro.Api/Controllers/SurveysController.cs - Survey workers → Flow extractor: analyzes code
- Flow extractor → Flow graph: builds graph
- Survey endpoints → Flow graph: serves flow graph
backend/src/Rastro.Api/Controllers/SurveysController.cs - Flow graph → Survey model: forms survey data
- Survey endpoints → Change proposals: creates change prompt
backend/src/Rastro.Api/Controllers/SurveysController.cs - Change proposals → Change validation: validates changed code
- Survey endpoints → Architecture export: exports C4
backend/src/Rastro.Api/Controllers/SurveysController.cs - Angular UI → Angular extractor: starts screen trace
- HTTP API → Schema extraction: serves code schema
- HTTP API → Query services: serves query analysis
- Query services → SQL analysis: analyzes SQL
backend/src/Rastro.Infrastructure/Database/QueryAnalysisService.cs - Database views → Query presentation: formats findings
- Database views → Schema presentation: renders schema
- HTTP API → AI advisors: offers optional advice
- MCP tools → Query services: uses query services
- CLI → Flow extractor: runs extraction
backend/src/Rastro.Cli/Program.cs - Survey endpoints → AI advisors: requests AI features