AI-Powered Specification Generation for Modern Development
OpenSpecification is an open-source web application that democratizes spec-driven development by replicating Kiro IDE's Spec Mode functionality. Generate comprehensive technical specifications using any AI model from OpenRouter's API, following a structured three-phase workflow with iterative refinement capabilities.
Live: https://www.openspec.app/
- π€ AI-Powered Generation: Use any AI model from OpenRouter's extensive catalog
- π Three-Phase Workflow: Requirements β Design β Implementation Tasks
- π Iterative Refinement: Refine and improve each phase with AI assistance
- π Automatic Diagrams: Generate Mermaid diagrams for architecture, workflows, and data models
- πΎ Local Storage: All data stays in your browser - no backend required
- π€ Multiple Export Options: Markdown, HTML, PDF, and ZIP formats
- βΏ Accessibility First: WCAG 2.1 compliant with keyboard navigation
- π± Responsive Design: Works seamlessly on desktop and mobile devices
- Framework: Next.js 14 with App Router
- Language: TypeScript with strict mode
- Styling: Tailwind CSS + shadcn/ui components
- Markdown: react-markdown with syntax highlighting
- Diagrams: Mermaid.js for automatic diagram generation
- AI Integration: OpenRouter API for model access
- Storage: Browser localStorage (client-side only)
- Testing: Jest + React Testing Library + 100+ test cases
- Node.js 18+
- npm, yarn, or pnpm
- OpenRouter API key (Get yours here)
-
Clone the repository
git clone https://github.com/openspec/openspec.git cd openspec -
Install dependencies
npm install # or yarn install # or pnpm install
-
Start development server
npm run dev # or yarn dev # or pnpm dev
-
Open in browser
Navigate to http://localhost:3000
-
Enter your OpenRouter API key
The application will prompt you to enter your OpenRouter API key on first use.
-
Setup π§
- Enter your OpenRouter API key
- Select an AI model (Claude 3 Sonnet recommended)
- Describe your feature or project
- Upload context files (optional)
-
Generate β‘
- Requirements Phase: Generate comprehensive requirements
- Design Phase: Create technical design specifications
- Tasks Phase: Generate actionable implementation tasks
-
Refine π―
- Request refinements for any phase
- Iterate until satisfied
- Approve each phase to progress
-
Export π€
- Choose from multiple formats
- Include diagrams and metadata
- Download as individual files or ZIP
- Code:
.ts,.js,.py,.go,.rs,.java,.cpp,.c# - Markup:
.md,.html,.xml,.json,.yaml,.toml - Config:
.env,.cfg,.ini,.conf - Documentation:
.txt,.rtf
OpenSpecification includes a comprehensive testing suite with 100+ test cases:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage report
npm run test:coverage
# Run specific test suites
npm run test:unit # Unit tests
npm run test:components # Component tests
npm run test:integration # Integration tests
# CI/CD testing
npm run test:ci- Unit Tests: Core utilities and hooks (25+ tests)
- Component Tests: UI components with user interactions (60+ tests)
- Integration Tests: OpenRouter API integration (20+ tests)
- Accessibility Tests: ARIA compliance and keyboard navigation
- Error Handling: Edge cases and error recovery
openspec/
βββ app/ # Next.js 14 App Router
β βββ page.tsx # Main application page
β βββ layout.tsx # Root layout with metadata
β βββ globals.css # Global styles
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β βββ ApiKeyInput.tsx # API key management
β βββ ModelSelector.tsx # AI model selection
β βββ PromptInput.tsx # Feature description input
β βββ WorkflowProgress.tsx # Progress indicator
β βββ MarkdownPreview.tsx # Content preview
β βββ ContentRefinement.tsx # Refinement interface
β βββ ApprovalControls.tsx # Phase approval
β βββ ExportDialog.tsx # Export functionality
β βββ ErrorBoundary.tsx # Error handling
β βββ Header.tsx # Navigation header
β βββ Footer.tsx # Site footer
βββ lib/ # Utility libraries
β βββ openrouter/ # OpenRouter API client
β βββ prompts/ # AI prompts for each phase
β βββ diagram/ # Mermaid diagram utilities
β βββ file-export.ts # File export functionality
β βββ storage.ts # Browser storage management
βββ hooks/ # Custom React hooks
β βββ useSpecWorkflow.ts # Main workflow state
βββ types/ # TypeScript type definitions
βββ __tests__/ # Test suites
β βββ unit/ # Unit tests
β βββ components/ # Component tests
β βββ integration/ # Integration tests
βββ public/ # Static assets
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLintnpm test- Run test suitenpm run test:watch- Run tests in watch modenpm run test:coverage- Generate coverage report
# Install dependencies
npm install
# Install additional shadcn/ui components (if needed)
npx shadcn@latest add [component-name]
# Run type checking
npx tsc --noEmit
# Run linting
npm run lint- TypeScript: Strict mode enabled
- ESLint: Next.js configuration
- Prettier: Code formatting
- Tailwind CSS: Utility-first styling
- shadcn/ui: Consistent component patterns
- Connect your repository to Vercel
- No environment variables needed (client-side only)
- Automatic deployments on push to main
# Build the application
npm run build
# Start production server
npm startOpenSpecification is a fully static Next.js application with no backend dependencies.
- API Keys: Stored only in browser memory, never persisted
- No Backend: All processing happens client-side
- Local Storage: Specifications stored locally in your browser
- No Tracking: No analytics or user tracking
- HTTPS: All API communications use secure protocols
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
We use Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Adding testsrefactor:- Code refactoringstyle:- Formatting changeschore:- Maintenance tasks
OpenSpecification is open source software licensed under the MIT License.
- Inspired by: Kiro IDE Spec Mode functionality
- Powered by: OpenRouter for AI model access
- UI Components: shadcn/ui
- Diagrams: Mermaid.js
- Documentation: Check the code comments and type definitions
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Contact: Reach out to @spencer_i_am on X
Made with β€οΈ for open source agentic coding
Built to solve agentic coding needs for open source development.