Implementation Completion Prompts
After FlexBase Studio generates skeleton code, use these tasks to complete API business logic and generate UI pages/components — driven by your extraction JSON and Markdown artifacts.
Works for all entry points: Legacy Migration, BRD Extraction, and New Application Design.
How to Use
Tell your AI agent which feature or module to implement. It will load the implementation completion guide and relevant conventions to produce production-ready code.
Example prompts you can give your AI agent:
Complete the API business logic for the Schedule module using the extraction JSONGenerate Blazor CRUD pages for the Person entity from the feature JSONAdd [Table] and [Column] annotations for legacy database column namesImplement all validations for CreateBooking from the extraction dataComplete the Angular service and list component for OrdersWalk me through implementing the entire Customer module end-to-endComplete the implementation — move stored procedure logic to C# handlersComplete the implementation — use stored procedures for complex queriesGenerate database scripts for the stored proceduresImplement the CreateProduct handler using Document Store for CosmosDBAdd Redis caching to the GetProducts query with cache-aside patternSend a confirmation email after order creation using Email ProviderImplement AI-powered product classification using Azure OpenAI in the CreateProduct handlerTask Catalog
Task 1: Complete Domain Model from Extraction JSON
Goal: Fill in generated domain model partial classes with attributes, relationships, and legacy name annotations User provides: Module name, extraction JSON file path (or entity name)
Task 1b: Configure Database Indexes
Goal: Add index configuration from extraction JSON index definitions User provides: Extraction JSON with index arrays per domain entity
Task 2: Complete Domain Factory Methods
Goal: Implement Create and Update factory methods using extraction feature details User provides: Entity name, extraction JSON feature for CREATE/UPDATE
Task 2b: Complete Handler with Stored Procedure Logic
Goal: Implement handler using stored procedure documentation as the specification User provides: Feature name with SP flag in extraction JSON + SP documentation file
Options:
Move to Code (DEFAULT): SP logic translated to C# handler/query code
Call Stored Procedures: Keep SPs in the database and call them from handlers — generates database migration scripts
Task 3: Complete Handler Business Logic
Goal: Implement handler Execute method with orchestration from extraction features User provides: Feature name (e.g., CreateSchedule), extraction JSON
Task 4: Complete Query Implementations
Goal: Implement query filters, includes, and projections from extraction features User provides: Module or entity name, extraction JSON with GETPAGEDLIST/GETLIST features
Task 5: Complete Validation Plugins
Goal: Implement pre-bus validation logic from extraction validations User provides: Feature name, extraction JSON validations section
Task 6: Complete DTOs and Mappers
Goal: Fill in generated DTOs with properties and validation annotations from extraction, then create mapper expressions User provides: Entity name, extraction JSON domain services
Task 7: Complete Workflow States
Goal: Implement workflow state pattern from extraction workflow/status information User provides: Entity name, extraction JSON or Markdown with workflow/status information
Task 8: Complete Event Subscribers
Goal: Implement event reactions from extraction events and subscribers User provides: Feature name, extraction JSON events/subscribers section
Task 9: Add Legacy Name Retention
Goal: Add [Table] and [Column] annotations for legacy database compatibility
User provides: Entity name or "all entities", extraction JSON with originalName fields
Task 10: Generate Blazor UI from Extraction — Complete Module
Goal: Create the full Blazor FluentUI v4.x UI stack for a module — REST client, DTOs, dialog, list page, navigation — from extraction JSON or API project discovery User provides: Module name (e.g., "Products"), extraction JSON files or FlexBase API project User says: "Generate Blazor pages for the Products module"
What gets generated:
UI DTOs (list + detail with validation annotations)
REST client service with CRUD methods
DI registration
Edit dialog (view/edit/create modes)
List page (DataGrid with search, filter, CRUD)
Sidebar/navigation entry
Task 11: Generate Angular UI from Extraction
Goal: Create Angular components and services from extraction JSON User provides: Module or entity name, extraction JSON, target Angular project
Task 12: Generate React UI from Extraction
Goal: Create React components and hooks from extraction JSON User provides: Module or entity name, extraction JSON, target React project
Task 13: Complete Entire Module (API + UI)
Goal: End-to-end implementation of a module — all domain models, handlers, queries, validations, DTOs, and UI User provides: Module name, all extraction JSON files, target UI framework
Implementation order:
Domain models → DTOs & mappers → Queries → Validations → Handlers → Subscribers → UI → Build & verify
DataStore, AI & Email Provider Integration
These prompts add non-relational data store, AI, or email operations into FlexBase handlers, queries, subscribers, and validation plugins. Each provider follows the same pattern: inject the bridge interface, call the provider-specific operations, and let the MCP guide handle the rest.
Tip — Operation type for subscribers & validation plugins: Handlers and queries have an explicit operation type (CREATE, UPDATE, GETPAGEDLIST, etc.). Subscribers and validation plugins infer the operation from the class/event name (e.g.,
OnOrderCreated...→ Create). If the name is ambiguous, specify the operation explicitly in your prompt: "...for Update operation using Document Store".
Document Store (CosmosDB, MongoDB, DynamoDB, RavenDB)
Use when a feature needs to store, retrieve, or query JSON documents in a NoSQL database.
Handler — Create/Update/Delete a document:
Query — Retrieve documents:
Subscriber — React to events with document operations:
Validation Plugin — Validate against document data:
Vector Store (PgVector, Azure AI Search, OpenSearch, Qdrant, Pinecone)
Use when a feature needs similarity search, semantic search, or embedding storage.
Handler — Store embeddings:
Query — Similarity search:
Subscriber — Auto-index on changes:
Graph Store (Neo4j, Apache AGE, Amazon Neptune)
Use when a feature needs relationship traversal, path finding, or connected data queries.
Handler — Create graph nodes and relationships:
Query — Traverse relationships:
Subscriber — Maintain graph on entity changes:
Search Store (Elasticsearch, Azure AI Search, Algolia)
Use when a feature needs full-text search, faceted search, or search indexing.
Handler — Index content:
Query — Full-text search:
Subscriber — Auto-index on changes:
File Store (Azure Blob, AWS S3, GCP Storage)
Use when a feature needs to upload, download, or manage files in cloud storage.
Handler — Upload/manage files:
Query — List/check files:
Subscriber — Process files after events:
Time Series Store (TimescaleDB, InfluxDB, Azure Data Explorer)
Use when a feature needs to store or query time-stamped measurements, metrics, or IoT data.
Handler — Write data points:
Query — Aggregate time series data:
Subscriber — Record metrics on events:
Cache Store (Redis, Memcached, NCache)
Use when a feature needs caching, session storage, or fast key-value lookups.
Handler — Cache management:
Query — Cache-aside pattern:
Subscriber — Invalidate cache on changes:
AI Provider (Azure OpenAI, OpenAI, Anthropic, Gemini, Ollama)
Use when a feature needs chat completions, content generation, classification, embeddings, or streaming AI responses.
Handler — AI-powered operations:
Handler — Structured output (typed response):
Handler — Streaming response:
Query — AI-assisted search (RAG pattern):
Handler — Generate embeddings:
Subscriber — AI processing after events:
Validation Plugin — AI-assisted validation:
Email Provider (SMTP, SendGrid, AWS SES, Azure Communication Services)
Use when a feature needs to send emails — notifications, confirmations, alerts, or bulk communications.
Handler — Send email directly:
Handler — Send HTML email with attachments:
Handler — Send templated email:
Handler — Bulk email:
PostBus Plugin — Send email after handler completes:
Subscriber — Send email on event:
Validation Plugin — Validate email before sending:
Configuration Notes
All DataStore and Provider integrations follow the same pattern:
Registration: Each provider is registered in
Program.cs/ startup using FlexBase'sAddFlex[ProviderType]()extension methodsEnvironment-specific: Use Console/InMemory providers for development, real providers for production
Bridge interfaces: Inject the bridge interface (not the raw provider) in handlers, queries, subscribers, and plugins
Multiple instances: Use keyed registration when you need multiple instances of the same provider type (e.g., two different AI models)
Unit Testing (xUnit, NUnit, MSTest)
FlexBase supports 3 test frameworks across 4 test projects. The MCP guides detect which framework to use from the existing .csproj or from the user's prompt.
Feature-Level Tests (All 4 Projects)
Module-Level Tests (All Features)
DomainModels.Tests — Model & Mapper Tests
Handlers.Tests — Handler, Subscriber & PostBus Tests
PreBus.Tests — Validation Plugin Tests
Queries.Tests — Query Tests with DB Strategy
Test Data Infrastructure
DataStore/Provider Feature Tests
Related
API patterns: FlexBase API Patterns
Blazor patterns: Blazor FluentUI
Angular patterns: Angular UI
React patterns: React UI
Last updated