Technology
A deep dive into the AI systems, security scanning, and code generation architecture that power GenMB.
Architecture-Aware Generation
GenMB doesn't generate isolated code snippets. It generates multi-layer applications with proper separation of concerns — the same patterns a senior developer would use.
Controllers / RoutesAPI endpoint definitions with request validation and response formatting.
ServicesBusiness logic isolated from HTTP concerns, reusable across routes.
ModelsData schemas (Pydantic, TypeScript interfaces) shared between frontend and backend.
ComponentsReact components with proper props, state management, and event handling.
ConfigurationEnvironment config, middleware setup, CORS, and deployment manifests.
Not just templates
Every generation is unique. The AI analyzes your specific requirements and generates custom code — not pre-built templates with variable substitution.Multi-File Project Structure
Complex apps are generated as proper multi-file projects with separate files for each concern. The AI creates consistent imports, shared types, and module boundaries across all files.
An import processor validates every cross-file reference. Missing imports, circular dependencies, and type mismatches are caught and fixed before you see the code.
AI Provider System
GenMB uses a multi-provider architecture with automatic failover. No single model failure can break your generation.
Fallback chains
Each model has a 2-deep fallback chain that crosses provider boundaries (e.g., Gemini Flash -> GPT-5.2 -> Gemini Pro).
Circuit breaker
Tracks success/failure per model. When a model is failing, the system falls back immediately without waiting for timeouts.
Retry with backoff
Exponential backoff with jitter on transient errors. Retries exhaust before fallback triggers.
Task routing
Different AI tasks (generation, healing, detection, chat) can use different models optimized for each task type.
Security Scanning
Every generation runs through an OWASP Top 10 security scanner — pure static analysis with no LLM calls, completing in ~50ms.
XSS (A03)Detects innerHTML assignments, dangerouslySetInnerHTML without sanitization, unescaped user input in templates.
Injection (A03)Catches SQL via f-string interpolation, eval() with user input, and unsanitized command execution.
Exposed Secrets (A02)Finds hardcoded API keys, tokens, and passwords in source code across all file types.
Broken Auth (A07)Detects tokens stored in localStorage, missing CSRF protection, and insecure session handling.
Misconfigured CORS (A05)Flags Access-Control-Allow-Origin: * and overly permissive CORS configurations.
The security score (0-100) is calculated as: 100 minus 20 per critical finding, 10 per high, 3 per medium, and 1 per low. Critical and high findings are automatically fed into the Code Healer for remediation.
Code Healing Pipeline
The Code Healer is an AI-powered repair system that fixes issues found during validation. It uses a tool-based approach — reading files, identifying issues, and applying targeted edits.
All issues from syntax checks, import validation, security scanning, and backend validation are collected in one pass.
The AI healer receives all issues together, giving it full context to fix root causes rather than chasing symptoms one by one.
After healing, the code is re-validated. If issues remain, a second healing pass runs. Up to 3 attempts ensure thorough remediation.
Tool-based healing
The healer uses tools (list_files, read_file, edit_file, write_file) just like a human developer would — reading code, understanding context, and making precise edits rather than regenerating entire files.Plugin Injection
GenMB's 75+ plugins inject context directly into AI prompts during generation. When you mention "add Stripe payments," the Stripe plugin's configuration, code snippets, and best practices are included in the generation context.
Plugins are auto-detected from your prompt keywords and existing code patterns. No manual configuration needed.
Plugin templates and code snippets are injected into the generation prompt, giving the AI concrete implementation guidance.
Re-injection is safe. SDK markers ensure plugins are never duplicated across regenerations.
FAQs
How is GenMB different from tools that only generate UI?▾
How does the AI handle complex dependencies between files?▾
What AI models power GenMB?▾
Can GenMB generate enterprise-ready code?▾
Ready to build?
Create your first app for free — no credit card required.