import { useState } from 'react' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { ScrollArea } from '@/components/ui/scroll-area' import { Badge } from '@/components/ui/badge' import { Separator } from '@/components/ui/separator' import { Input } from '@/components/ui/input' import { BookOpen, MapPin, FileCode, CheckCircle, Clock, Sparkle, Code, Database, Tree, PaintBrush, Flask, Play, Cube, Wrench, Gear, Package, Rocket, Target, Lightbulb, MagnifyingGlass, GitBranch } from '@phosphor-icons/react' export function DocumentationView() { const [activeTab, setActiveTab] = useState('readme') const [searchQuery, setSearchQuery] = useState('') return (
README Roadmap Agents Files PWA Guide Sass Styles Guide CI/CD Guide
setSearchQuery(e.target.value)} className="pl-10" />

CodeForge

Low-Code Next.js App Builder with AI

Overview

CodeForge is a comprehensive visual low-code platform for generating production-ready Next.js applications. It combines the power of visual designers with direct code editing, AI-powered generation, and a complete full-stack development toolkit.

Key Features } title="Monaco Code Editor" description="Full-featured code editor with syntax highlighting, autocomplete, and AI-powered improvements" /> } title="Prisma Schema Designer" description="Visual database model designer with automatic schema generation and AI assistance" /> } title="Component Tree Builder" description="Hierarchical component structure builder with drag-and-drop and AI generation" /> } title="Theme Designer" description="Material UI theme customizer with multiple variants, custom colors, and AI theme generation" /> } title="Flask Backend Designer" description="Visual Python Flask API designer with blueprints, endpoints, and CORS configuration" /> } title="Playwright Test Designer" description="E2E test builder with step configuration and AI test generation" /> } title="Unit Test Designer" description="Comprehensive test suite builder for components, functions, hooks, and integration tests" /> } title="Auto Error Repair" description="Automated error detection and AI-powered code repair system" /> } title="Project Settings" description="Configure Next.js options, npm packages, scripts, and build settings" /> } title="AI Integration" description="OpenAI-powered generation across all features for rapid development" />

Getting Started

1 Create Your First Model

Navigate to the Models tab and create your database schema using the visual designer or describe your data model to the AI.

2 Design Your Components

Use the Components tab to build your UI hierarchy visually or let the AI generate component structures based on your requirements.

3 Customize Your Theme

Head to the Styling tab to create custom color palettes, manage theme variants (light/dark), and configure typography.

4 Build Your Backend

Configure your Flask API in the Flask API tab by creating blueprints and endpoints with full CORS and authentication support.

5 Export Your Project

Click Export Project to generate all files including Next.js pages, Prisma schemas, Flask backend, tests, and configuration files ready for deployment.

AI-Powered Features

CodeForge integrates OpenAI across every designer to accelerate development:

Technology Stack

Frontend
  • Next.js 14 with App Router
  • React 18 with TypeScript
  • Material UI 5
  • Monaco Editor
  • Tailwind CSS
Backend & Tools
  • Flask REST API
  • Prisma ORM
  • Playwright E2E Testing
  • Vitest & React Testing Library
  • Storybook for Components
Pro Tips

💡 Use the AI Generate feature to quickly scaffold entire applications from descriptions

💡 The Error Repair tab automatically scans and fixes common issues - check it before exporting

💡 Create multiple theme variants (light, dark, custom) in the Styling tab for complete theme support

💡 Test your components with Storybook stories before writing full E2E tests

💡 Flask blueprints help organize your API endpoints by feature or resource

Product Roadmap

Features delivered and planned for CodeForge development

Completed Features

Planned Features

Agents Files

AI agent configuration and service architecture

AI Service Architecture

CodeForge uses a modular AI service architecture that integrates OpenAI's GPT models across all features. Each designer has specialized prompts and validation logic to ensure high-quality generated code.

Core AI Services Primary modules handling AI operations AI Integration Points Features enhanced by AI capabilities
Prompt Engineering How we optimize AI interactions

Context Preservation

All AI prompts include relevant project context such as existing models, components, and theme configurations to ensure generated code integrates seamlessly.

Format Specification

Prompts specify exact output formats (JSON, TypeScript, Python) with strict schemas to ensure parseable and valid responses.

Best Practices Enforcement

Generated code follows Next.js, React, and Flask best practices through detailed prompt instructions and post-processing validation.

Error Handling

Fallback mechanisms and retry logic ensure graceful degradation when AI services are unavailable or responses are malformed.

Future AI Enhancements
  • Multi-Model Support: Integration with Claude, Gemini, and other LLMs for specialized tasks
  • Fine-Tuned Models: Custom models trained on specific frameworks and design patterns
  • Code Review Agent: Automated code review with security and performance analysis
  • Conversational Interface: Chat-based project building with natural language commands
  • Learning System: AI that learns from user corrections and preferences over time

Progressive Web App

Offline-first experience with native-like capabilities

Overview

CodeForge is a fully-featured Progressive Web App that can be installed on any device and works offline. With intelligent caching, automatic updates, and native app-like features, you can build applications anywhere, anytime.

PWA Features Native app capabilities in your browser
Installable

Install on desktop or mobile for quick access from your home screen or applications menu

Offline Support

Work without internet connection; changes sync automatically when you reconnect

Automatic Updates

Get notified when new versions are available with one-click updates

Push Notifications

Opt-in to receive updates about builds, errors, and new features

App Shortcuts

Quick access to Dashboard, Code Editor, and Models from your OS

Share Target

Share code files directly to CodeForge from other apps

Installation

Desktop Installation
Chrome/Edge/Brave:
  1. Look for install icon (⊕) in address bar
  2. Click "Install" or use prompt in app
  3. App added to applications menu
Safari (macOS):
  1. Click File → Add to Dock
  2. App appears in Dock
Mobile Installation
iOS (Safari):
  1. Tap Share button
  2. Select "Add to Home Screen"
  3. Tap "Add"
Android (Chrome):
  1. Tap menu (three dots)
  2. Select "Install app"
  3. Confirm installation

PWA Settings

Navigate to the PWA tab to manage all Progressive Web App features:

Available Controls
Installation Status

Check if app is installed and trigger installation if available

Network Status

Real-time online/offline indicator with connectivity information

Push Notifications

Toggle notifications and manage permissions

Cache Management

View cache size, service worker status, and clear cached data

Update Management

Install pending updates when new versions are available

Offline Capabilities

Works Offline
  • • View and edit existing projects
  • • Browse files and code
  • • Use Monaco editor
  • • Navigate all tabs
  • • View documentation
  • • Make changes locally
Requires Internet
  • • AI-powered generation
  • • External font loading
  • • Database sync
  • • External resources
Pro Tips
  • • Install for best performance: Installed apps load faster and work more reliably offline
  • • Save before going offline: Ensure projects are saved to local storage before losing connection
  • • Clear cache if issues arise: Use PWA settings to clear cache and reload with fresh data
  • • Enable notifications: Stay informed about updates and build completions
  • • Update regularly: New versions bring performance improvements and features

Sass Styles Guide

Custom Material UI components with Sass

Overview

CodeForge includes a comprehensive Sass-based styling system for non-standard Material UI components. This system provides pre-built components, utilities, mixins, and animations that extend beyond the standard Material UI component library.

File Structure
src/styles/_variables.scss

Color palettes, spacing scales, typography, transitions, and other design tokens

src/styles/_utilities.scss

Mixins and functions for responsive design, colors, typography, and layout helpers

src/styles/_animations.scss

Keyframe animations and animation utility classes for transitions and effects

src/styles/material-ui-custom.scss

Custom Material UI component styles with variants and states

src/styles/main.scss

Main entry point that imports all Sass modules and provides layout components

Available Components Custom Material UI components built with Sass
Layout Components Sass-powered layout utilities } title="custom-mui-container" description="Max-width container with responsive padding" /> } title="custom-mui-grid" description="CSS Grid layouts with responsive columns (--cols-1 to --cols-12, --responsive)" /> } title="custom-mui-flex" description="Flexbox utilities (--row, --col, --wrap, --center, --between, --around)" /> } title="custom-mui-stack" description="Vertical/horizontal stacks with configurable gaps" /> } title="custom-mui-surface" description="Interactive surfaces with elevation and hover effects" /> Sass Utilities & Mixins Reusable functions for custom styling

Responsive Design

@include respond-to($breakpoint)

Generate media queries for xs, sm, md, lg, xl, 2xl breakpoints

{`@include respond-to('lg') {
  padding: 2rem;
}`}
                          

Elevation & Shadows

@include elevation($level)

Apply box shadows with levels 1-4

{`@include elevation(2);`}
                          

Glassmorphism

@include glassmorphism($blur, $opacity)

Create frosted glass effects with backdrop blur

{`@include glassmorphism(16px, 0.1);`}
                          

Color Functions

get-color($palette, $shade)

Access colors from predefined palettes (primary, secondary, accent, success, error, warning)

{`color: get-color('primary', 500);`}
                          

Text Truncation

@include truncate($lines)

Truncate text with ellipsis after specified lines

{`@include truncate(2);`}
                          

Custom Scrollbars

@include show-scrollbar($track, $thumb)

Style webkit scrollbars with custom colors

{`@include show-scrollbar(rgba(0,0,0,0.1), rgba(0,0,0,0.3));`}
                          
Animation Classes Pre-built animation utilities
Quick Start Example

Using Custom Components

{`import './styles/main.scss'

function MyComponent() {
  return (
    

Card Title

Card content

) }`}

Creating Custom Styles with Mixins

{`@use './styles/utilities' as *;
@use './styles/variables' as *;

.my-custom-component {
  @include elevation(2);
  @include responsive-padding(spacing('6'));
  background: get-color('primary', 500);
  
  @include respond-to('md') {
    @include elevation(3);
  }
  
  &:hover {
    @include glassmorphism(12px, 0.15);
  }
}`}
                      
Best Practices
  • Import main.scss in your index.css to access all Sass components and utilities
  • Use @use instead of @import for better module encapsulation
  • Leverage mixins for consistent spacing, elevation, and responsive design
  • Extend existing component classes rather than creating from scratch
  • Use animation classes sparingly and respect prefers-reduced-motion
  • Customize variables in _variables.scss to match your design system

CI/CD Guide

Complete deployment automation for multiple platforms

Overview

CodeForge includes production-ready CI/CD configurations for GitHub Actions, GitLab CI, Jenkins, and CircleCI. Each pipeline includes linting, testing, security scanning, Docker image building, and automated deployment workflows.

Available Configurations

Pipeline Stages

All CI/CD configurations follow a similar multi-stage pipeline structure:

Docker Configuration Containerization for production deployment

Files Included

Dockerfile

Multi-stage build with Node.js builder and Nginx runtime

nginx.conf

Production Nginx configuration with health checks and caching

docker-compose.yml

Local development and deployment orchestration

.dockerignore

Optimized build context by excluding unnecessary files

Docker Commands

{`# Build image locally
docker build -t codeforge:local .

# Run container
docker run -p 3000:80 codeforge:local

# Use docker-compose
docker-compose up -d

# Pull from registry
docker pull ghcr.io//:latest`}
                      

Features

  • Multi-stage build reduces final image size to ~50MB
  • Nginx serves static files with gzip compression
  • Health check endpoint at /health for orchestration
  • Automatic cache headers for static assets
  • SPA routing support with fallback to index.html
Environment Variables Required configuration for CI/CD platforms
Variable Description Required
NODE_VERSION Node.js version (default: 20) No
REGISTRY Docker registry URL (default: ghcr.io) No
STAGING_WEBHOOK_URL Webhook for staging deployments Optional
PRODUCTION_WEBHOOK_URL Webhook for production deployments Optional
CODECOV_TOKEN Codecov integration token Optional
SLACK_WEBHOOK Slack webhook for notifications Optional

Branch Strategy

main

Production branch - deploys to production environment (manual approval required)

develop

Development branch - automatically deploys to staging environment

feature/*

Feature branches - runs tests only, no deployment

v* tags

Version tags - triggers release workflow with artifacts and changelog

Quick Start

1 Choose Your Platform

Select GitHub Actions, GitLab CI, Jenkins, or CircleCI based on your infrastructure

2 Configure Secrets

Add required environment variables and secrets in your platform's settings

3 Push to Repository

Push code to main or develop branch to trigger the CI/CD pipeline

4 Monitor Pipeline

View pipeline status, test results, and deployment logs in your platform's dashboard

Best Practices
  • Never commit secrets - use environment variables and platform secret management
  • Enable branch protection on main and develop branches
  • Require code reviews and passing tests before merging
  • Use manual approval gates for production deployments
  • Monitor security scan results and fix vulnerabilities promptly
  • Keep dependencies updated with Dependabot or Renovate
  • Use semantic versioning for releases (v1.0.0, v1.1.0, etc.)
  • Configure Slack or email notifications for deployment status
Additional Resources
  • CI_CD_GUIDE.md - Detailed setup guide for all platforms
  • .github/workflows/ - GitHub Actions workflows
  • .gitlab-ci.yml - GitLab CI configuration
  • Jenkinsfile - Jenkins pipeline definition
  • .circleci/config.yml - CircleCI configuration
) } function CICDPlatformItem({ name, file, description, features }: { name: string file: string description: string features: string[] }) { return (

{name}

{file}

{description}

Key Features:

    {features.map((feature, idx) => (
  • {feature}
  • ))}
) } function PipelineStageCard({ stage, description, duration }: { stage: string description: string duration: string }) { return (

{stage}

{description}

{duration}
) } function SassComponentItem({ name, classes, description }: { name: string; classes: string[]; description: string }) { return (

{name}

{description}

{classes.map((cls, idx) => ( {cls} ))}
) } function AnimationItem({ name, description }: { name: string; description: string }) { return (
{name}

{description}

) } function FeatureItem({ icon, title, description }: { icon: React.ReactNode; title: string; description: string }) { return (
{icon}

{title}

{description}

) } function AIFeatureCard({ title, description }: { title: string; description: string }) { return (

{title}

{description}

) } function RoadmapItem({ status, title, description, version }: { status: 'completed' | 'planned' title: string description: string version: string }) { return (

{title}

{version}

{description}

) } function AgentFileItem({ filename, path, description, features }: { filename: string path: string description: string features: string[] }) { return (
{filename}

{path}

{description}

Key Features:

    {features.map((feature, idx) => (
  • {feature}
  • ))}
) } function IntegrationPoint({ component, capabilities }: { component: string; capabilities: string[] }) { return (

{component}

) }