What Do You Need Before You Start?

Prerequisites

  • A FlowSquad account (free tier works for this tutorial — create at flowsquad.ai)
  • A GitHub account with access to the Spring PetClinic repository (public)
  • A Jira project with an API token (for the export step — optional but recommended)
  • ~30 minutes of uninterrupted time

We'll use the open-source Spring PetClinic project (github.com/spring-projects/spring-petclinic) as our example. It's a well-known Java/Spring Boot reference application with 27,000 lines of code, JPA data models, REST controllers, and service layers — representative of the structure you'd find in a real legacy Java application.

Our goal: add a new feature — "appointment reminder notifications via email" — and generate the full SDLC plan for it.

1
Connect Your Repository (GitHub/GitLab/Bitbucket)

From the FlowSquad dashboard, click New Project → Connect Repository. FlowSquad's GitHub integration uses OAuth — click "Authorize FlowSquad" and you'll be redirected back with repository access granted.

Select the spring-projects/spring-petclinic repository (or fork it to your own account). Choose the main branch. Set the project framework to Scrum and the primary language to Java.

# FlowSquad project configuration (set in UI, shown here for reference) project_name: "PetClinic Modernization" repository: provider: github url: https://github.com/spring-projects/spring-petclinic branch: main primary_language: java framework: scrum llm_backend: openai # or: anthropic | azure | ollama vector_db: chromadb # or: pinecone
2
Run the Codebase Analysis

Click Analyze Codebase. FlowSquad's codebase analysis engine clones the repository and begins building its semantic knowledge graph. For PetClinic (27,000 lines), this takes approximately 4 minutes 12 seconds on the cloud configuration.

✓ Repository cloned: spring-petclinic (27,342 lines of Java) ✓ Parsing Java AST: 47 classes, 312 methods ✓ REST endpoints detected: 14 (GET: 9, POST: 3, PUT: 1, DELETE: 1) ✓ JPA entities detected: 6 (Owner, Pet, PetType, Vet, Specialty, Visit) ✓ Service layer: 4 services (OwnerService, PetService, VisitService, VetService) ✓ Repository layer: 4 repositories (JPA + Spring Data) ✓ VectorDB index built: 1,847 embeddings → ChromaDB ✓ Analysis complete in 4m 12s

The analysis dashboard now shows you a module map: which classes are most central to the codebase, which modules have the highest cyclomatic complexity, and which endpoints are untested. For PetClinic, FlowSquad flags 3 controllers with test coverage below 40% and identifies VisitService as the highest-complexity service (cyclomatic complexity: 14).

3
Refine Your Requirements with the AI Q&A

Before generating epics, use FlowSquad's AskProduct to interrogate the codebase. Type natural language questions and FlowSquad retrieves answers grounded in your actual code:

-- AskProduct session (questions typed by developer, answers from FlowSquad) Q: "Which service handles visit scheduling?" A: VisitService.java — schedules visits via VisitRepository.save(). Called from PetController.processNewVisitForm() at line 134. No email notification logic currently exists. Q: "What is the current notification mechanism?" A: No notification system detected. No email sender, no messaging queue, no scheduled task annotations found in any service class. Q: "Which entities would need to change for email notifications?" A: Visit (add notificationSent boolean, notificationScheduledAt timestamp), Owner (add email field — currently stores phone only), New entity required: NotificationTemplate.

This 3-question AskProduct session just saved a developer 2–3 hours of manual codebase exploration. We now know exactly what exists, what's missing, and what will change.

4
Generate Epics, Stories, and Tasks

Click Generate Work Breakdown. Enter the requirement: "Add appointment reminder notifications: send email to pet owners 24 hours before a scheduled visit." FlowSquad's Epic/Story/Task decomposition engine generates the full breakdown in 87 seconds.

Epic
EPIC-01: Appointment Reminder Notification System
Enable automated email reminders to pet owners 24 hours before scheduled visits. Requires new NotificationService, email configuration, Visit entity migration, and Owner email field addition.
User Story (1 of 5 generated)
STORY-03: Email notification triggers from VisitService
As a pet owner, I want to receive an email reminder 24 hours before my appointment.

Acceptance Criteria:
1. VisitService.scheduleVisit() calls NotificationService.scheduleReminder(visit, owner) after persisting the visit via VisitRepository.save()
2. NotificationScheduler (Spring @Scheduled cron) runs daily at 08:00 and queries VisitRepository.findVisitsScheduledFor(tomorrow)
3. EmailSenderService.sendReminder(owner.getEmail(), visit) is invoked with a rendered NotificationTemplate
4. Visit.notificationSent is set to true after successful send
5. Failed sends are logged to AuditLog with owner.id, visit.id, and error message

Story Points: 5 | Dependencies: STORY-01 (Owner email field), STORY-02 (NotificationService stub)

FlowSquad generated 3 epics, 14 stories, and 41 tasks in total. Every story references real PetClinic class names and methods. Dependencies between stories are automatically detected based on the codebase graph.

5
Generate HLD + LLD Design Documents

Click Generate Design Documents. FlowSquad produces both a High-Level Design and Low-Level Design document grounded in the PetClinic architecture.

The HLD covers: new service boundaries (NotificationService, EmailSenderService), integration with the existing Spring context, database migration plan (2 ALTER TABLE statements), and the external dependency (JavaMailSender / SMTP configuration).

The LLD covers: new class diagram with 4 new classes, sequence diagram for the notification trigger flow, method signatures for all 7 new public methods, and the Flyway migration script for the visits table changes.

-- LLD excerpt: generated class interface for NotificationService @Service public interface NotificationService { /** * Schedule a reminder for the given visit. * Called by VisitService after successful VisitRepository.save() * @param visit the persisted Visit entity * @param owner the Owner entity (must have non-null email) */ void scheduleReminder(Visit visit, Owner owner); /** * Send all pending reminders for visits occurring on targetDate. * Invoked by NotificationScheduler @Scheduled cron. * @param targetDate the appointment date to query (LocalDate) * @return count of notifications sent successfully */ int sendPendingReminders(LocalDate targetDate); }
6
Generate Test Cases and Export to Jira

Click Generate Test Cases. FlowSquad's test case generation produces 28 test cases across unit, integration, and edge-case scenarios, all aligned to the 14 generated stories.

-- Test case example (Given/When/Then format, generated by FlowSquad) Test: TC-07 — Notification not sent when Owner email is null Story: STORY-03 Layer: Unit (NotificationServiceImpl) Given: A Visit entity persisted with a scheduled date of tomorrow And: The owning Owner entity has email = null When: NotificationService.scheduleReminder(visit, owner) is called Then: No EmailSenderService.sendReminder() call is made And: AuditLogService records a WARNING event with code "NOTIFICATION_SKIPPED_NO_EMAIL" And: Visit.notificationSent remains false

Click Export to Jira. Select your Jira project (e.g., PET), map FlowSquad epics to Jira epics, and click Create Issues. In 23 seconds, 14 Jira stories, 41 tasks, and 3 epics are created — fully populated, with acceptance criteria and story points.

What Did We Produce in 30 Minutes?

3
Epics generated
14
User stories with acceptance criteria
41
Engineering tasks
28
Test cases (unit + integration)
1 HLD
High-Level Design document
1 LLD
Low-Level Design with class diagrams

Total elapsed time: 31 minutes 44 seconds. Estimated manual equivalent: 18–24 hours across 3–4 team members (product manager, tech lead, QA engineer, architect). FlowSquad produced a sprint-ready backlog, two design documents, and a test plan — all grounded in the actual PetClinic codebase — in the time it takes to run a sprint planning meeting.

Frequently Asked Questions

Does this work on larger Java codebases, not just PetClinic?
Yes. FlowSquad's codebase analysis engine is tested on Java codebases up to 2 million lines. Analysis time scales linearly: a 500,000-line monorepo takes approximately 40–60 minutes on first analysis. Incremental analysis (re-analyzing only changed files since last run) takes under 5 minutes for typical PR-level changes.
What Java frameworks does FlowSquad understand?
FlowSquad's Java analyzer understands Spring Boot (annotations, component scanning, dependency injection), Spring Data JPA (repository patterns, entity relationships), Spring MVC (request mapping, controller patterns), Hibernate (mapping annotations, cascade types), Maven and Gradle build structures, and common enterprise patterns (Repository, Service, Controller, DTO, Mapper layers).
Can I regenerate only specific stories without re-running the full analysis?
Yes. FlowSquad caches the codebase analysis index. You can regenerate individual stories, test cases, or design documents without re-analyzing the repository. Re-analysis is only needed when you want to incorporate new code changes into the context.
What if my codebase has no tests — will FlowSquad still generate accurate test cases?
Yes. FlowSquad's test case generation is driven by the generated stories and the LLD class interfaces, not by existing test code. It generates test cases based on acceptance criteria and method contracts. Having existing tests does improve quality slightly, as FlowSquad can reference existing test patterns and framework choices (JUnit 5, Mockito, TestContainers).
Can the generated Jira tickets be linked to a specific sprint automatically?
Yes. During the Jira export, you can select a target sprint from a dropdown populated from your Jira project's active and future sprints. Stories are created and assigned to the selected sprint. Epic links are automatically established based on FlowSquad's 3-tier hierarchy.