How agilepemdigi-2026/story2gherkin works
Story2Gherkin turns a user story and GUI context into draft Given–When–Then scenarios for analyst review, correction, validation, and download. The React frontend supports authentication and role-specific workspaces; the Go API owns business processes and persistence, while the Python service provides model generation and deterministic Gherkin validation. The README describes Go–Python integration as intended but notes that their generation contracts differ, so that connection is shown as unverified. Several backend and frontend implementation files were not sampled; their internal calls are not inferred.
Main entry points: main.go Go REST API entry · App.tsx Role-based app routes · ReviewScenarioPage.tsx Scenario review workspace · routes.go Scenario API routes
Components 27
React user interface
- Role-based app routes
frontend/src/App.tsx - Sign-in and session
frontend/src/services/authSession.ts - Scenario generation page
frontend/src/pages/GenerateScenarioPage.tsx - Scenario review workspace
frontend/src/pages/ReviewScenarioPage.tsx - Editor and validation panels
frontend/src/components/review/GherkinEditor.tsx - Authentication API client
frontend/src/services/authApi.ts - Scenario API client
frontend/src/services/scenarioApi.ts - Review API client
frontend/src/services/reviewApi.ts
Go API and persistence
- Go REST API entry
backend/cmd/main.go - Authentication and tokens
backend/modules/auth/handler/auth_handler.go - User accounts
backend/modules/user/repository/user_repository.go - Scenario API routes
backend/modules/scenario/routes.go - Scenario generation service
backend/modules/scenario/service/scenario_service.go - AI service client
backend/modules/scenario/service/llm_client.go - Review handlers
backend/modules/scenario/handler/review_handler.go - Review and correction logic
backend/modules/scenario/service/review_service.go - Review repository
backend/modules/scenario/repository/review_repository.go
Python AI service
- Internal FastAPI routes
ai-service/app/main.py - Generate endpoint
ai-service/app/api/routes/generate.py - Gherkin generation and parsing
ai-service/app/services/generator.py - Prompt construction
ai-service/app/services/prompts.py - Ollama / OpenRouter clients
ai-service/app/clients/ollama.py - Validation endpoint
ai-service/app/api/routes/review.py - Gherkin validation and coverage
ai-service/app/services/validation.py
Scenario data
- PostgreSQL
Other components
- System analyst / QA
- LLM provider
Connections 28
- System analyst / QA → Role-based app routes: uses
frontend/src/App.tsx - Role-based app routes → Sign-in and session: routes to
frontend/src/App.tsx - Role-based app routes → Scenario generation page: routes to
frontend/src/App.tsx - Role-based app routes → Scenario review workspace: routes to
frontend/src/App.tsx - Sign-in and session → Authentication API client: calls
frontend/src/services/authSession.ts - Scenario generation page → Scenario API client: calls
- Scenario review workspace → Review API client: calls
frontend/src/pages/ReviewScenarioPage.tsx - Scenario review workspace → Editor and validation panels: renders
frontend/src/pages/ReviewScenarioPage.tsx - Authentication API client → Go REST API entry: requests
- Scenario API client → Go REST API entry: requests
- Review API client → Go REST API entry: requests
- Go REST API entry → Authentication and tokens: dispatches
- Go REST API entry → Scenario API routes: dispatches
- Authentication and tokens → User accounts: uses
- Scenario API routes → Scenario generation service: dispatches
- Scenario API routes → Review handlers: dispatches
- Scenario generation service → AI service client: requests generation
- AI service client → Internal FastAPI routes: calls
README.md - Review handlers → Review and correction logic: delegates to
- Review and correction logic → Review repository: uses
- Review repository → PostgreSQL: reads and writes
- Internal FastAPI routes → Generate endpoint: registers
ai-service/app/main.py - Internal FastAPI routes → Validation endpoint: registers
ai-service/app/main.py - Generate endpoint → Gherkin generation and parsing: invokes
ai-service/app/api/routes/generate.py - Gherkin generation and parsing → Prompt construction: uses
ai-service/app/services/generator.py - Gherkin generation and parsing → Ollama / OpenRouter clients: calls
- Ollama / OpenRouter clients → LLM provider: sends prompts
- Validation endpoint → Gherkin validation and coverage: calls
ai-service/app/api/routes/review.py