Overview
Implement an interactive mode for feature generation that guides developers through the process with prompts, suggestions, and validation, improving the developer experience and reducing errors.
Background
While CLI flags are powerful, an interactive mode can help new users and provide a more guided experience for complex feature generation. This will make Goca more accessible while maintaining its flexibility.
Scope
In Scope
Out of Scope
- Full GUI application
- Web-based interface
- Visual schema designer
- Real-time code preview
Requirements
Functional Requirements
Non-Functional Requirements
Technical Design
Interactive Flow
Welcome to Goca Interactive Mode
=================================
What would you like to generate?
1. Complete Feature
2. Entity Only
3. Repository Only
> 1
Enter entity name (PascalCase): User
Add fields to User:
Field 1 name: name
Field 1 type:
1. string
2. int
3. float64
4. bool
5. time.Time
> 1
Field 2 name: email
Field 2 type: string
Add another field? (y/n): n
Select database:
1. PostgreSQL
2. MySQL
3. MongoDB
4. SQLite
> 1
Select handler type:
1. HTTP (REST)
2. gRPC
3. GraphQL
4. CLI
> 1
Configuration Preview:
=====================
Entity: User
Fields:
- name: string
- email: string
Database: postgres
Handler: http
Timestamps: yes
Soft Delete: yes
Files to be generated:
- internal/domain/user.go
- internal/repository/postgres_user_repository.go
- internal/usecase/user_service.go
- internal/handler/http/user_handler.go
- internal/di/container.go (updated)
Proceed with generation? (y/n): y
Generating feature User...
✓ Generated internal/domain/user.go
✓ Generated internal/repository/postgres_user_repository.go
✓ Generated internal/usecase/user_service.go
✓ Generated internal/handler/http/user_handler.go
✓ Updated internal/di/container.go
Feature User generated successfully!
Implementation Plan
Phase 1: Core Interactive Mode
Phase 2: Advanced Features
Phase 3: Integration
CLI Usage
goca feature --interactive
goca init --interactive
goca --interactive # General interactive mode
Acceptance Criteria
Priority and Classification
Priority: High
Category: Developer Experience
Section: CLI Improvements
Release Target: Backlog (Post v2.0.0)
Estimated Effort: 3-4 weeks
Complexity: Medium
Dependencies: None
Related Issues
- Improves onboarding experience
- Reduces errors in feature generation
- Complements project scaffolding wizard
Additional Notes
Interactive mode will significantly improve the first-time user experience and reduce the learning curve for Goca while maintaining the flexibility of flag-based commands for automation.
Overview
Implement an interactive mode for feature generation that guides developers through the process with prompts, suggestions, and validation, improving the developer experience and reducing errors.
Background
While CLI flags are powerful, an interactive mode can help new users and provide a more guided experience for complex feature generation. This will make Goca more accessible while maintaining its flexibility.
Scope
In Scope
Out of Scope
Requirements
Functional Requirements
Non-Functional Requirements
Technical Design
Interactive Flow
Implementation Plan
Phase 1: Core Interactive Mode
Phase 2: Advanced Features
Phase 3: Integration
--interactiveflagCLI Usage
goca feature --interactive goca init --interactive goca --interactive # General interactive modeAcceptance Criteria
Priority and Classification
Priority: High
Category: Developer Experience
Section: CLI Improvements
Release Target: Backlog (Post v2.0.0)
Estimated Effort: 3-4 weeks
Complexity: Medium
Dependencies: None
Related Issues
Additional Notes
Interactive mode will significantly improve the first-time user experience and reduce the learning curve for Goca while maintaining the flexibility of flag-based commands for automation.