Transform Software Requirements Specifications into UML diagrams automatically with AI
Features β’ Quick Start β’ Documentation β’ Demo β’ Contributing
- About
- Key Features
- Demo
- Tech Stack
- Quick Start
- Installation
- Environment Variables
- Project Structure
- Usage Guide
- API Integration
- Design System
- Development
- Building for Production
- Deployment
- Troubleshooting
- Contributing
- Roadmap
- FAQ
- License
- Acknowledgments
- Support
SpecMorph is a cutting-edge web application that leverages AI to automatically transform Software Requirements Specification (SRS) documents into professional UML diagrams. Built with modern web technologies and featuring a stunning glassmorphism UI, SpecMorph streamlines the software design process by automating diagram generation.
Creating UML diagrams from SRS documents is time-consuming and prone to human error. Software architects and developers spend countless hours manually:
- Reading and analyzing SRS documents
- Identifying entities, relationships, and use cases
- Drawing UML diagrams manually
- Maintaining consistency across multiple diagrams
SpecMorph automates this entire workflow using AI-powered extraction and intelligent diagram generation, reducing what takes hours into minutes while maintaining accuracy and consistency.
- Glassmorphism Design - Modern frosted glass effects with backdrop blur
- Animated Gradients - Dynamic liquid gradient background animations
- Fully Responsive - Seamless experience across desktop, tablet, and mobile
- Dark Theme - Eye-friendly dark mode with violet-indigo accents
- Smooth Animations - Framer Motion powered micro-interactions
- π Document Management - Upload, organize, and process multiple SRS PDF documents
- π§ AI-Powered Extraction - Intelligent extraction of requirements, entities, and relationships
- π UML Diagram Generation - Automatic creation of Class, Sequence, and Use Case diagrams
- π Workflow Automation - One-click complete pipeline from upload to diagrams
- β‘ Real-time Updates - Live progress tracking with polling
- πΎ Smart Caching - TanStack Query for optimized data fetching
- π Search & Filter - Find diagrams and documents quickly
- π₯ Bulk Operations - Upload, delete, and manage multiple items at once
- πΌοΈ Interactive Preview - Full-screen diagram viewing with zoom
- β¬οΈ Export Options - Download diagrams in multiple formats
- π Dashboard Analytics - Overview of system stats and recent activity
- π― Type-Safe - Full TypeScript support for better DX
- Next.js 16 - React framework with App Router
- React 19.2 - UI library
- TypeScript 5.9 - Type safety
- Tailwind CSS 4 - Utility-first CSS framework
- Radix UI - Headless UI components
- Lucide React - Beautiful icon library
- Class Variance Authority - Component variants
- Framer Motion - Animation library
- TanStack Query v5 - Async state management
- Zustand - Lightweight state management
- Axios - HTTP client
- React Dropzone - File upload
- Sonner - Toast notifications
- ESLint - Linting
- pnpm - Fast package manager
# Clone the repository
git clone https://github.com/paradocx96/specmorph-app.git
# Navigate to project directory
cd specmorph-app
# Install dependencies
pnpm install
# Copy environment variables
cp .env.local.example .env.local
# Start development server
pnpm devOpen http://localhost:3000 in your browser π
Before you begin, ensure you have the following installed:
- Node.js
18.xor higher (Download) - pnpm
8.xor higher (recommended) or npmnpm install -g pnpm
- SpecMorph Backend API running on
http://localhost:8000- See Backend Repository for setup instructions
git clone https://github.com/paradocx96/specmorph-app.git
cd specmorph-appUsing pnpm (recommended):
pnpm installUsing npm:
npm installUsing yarn:
yarn installCreate a .env.local file:
cp .env.local.example .env.localEdit the file and add your configuration:
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8000
# Debug mode (optional)
# NEXT_PUBLIC_DEBUG=truepnpm devThe application will be available at http://localhost:3000
- β
Frontend accessible at
http://localhost:3000 - β
Backend API running at
http://localhost:8000 - β
API health check:
http://localhost:8000/api/health
Create a .env.local file in the root directory:
| Variable | Description | Required | Default |
|---|---|---|---|
NEXT_PUBLIC_API_URL |
Backend API base URL | β Yes | http://localhost:8000 |
NEXT_PUBLIC_DEBUG |
Enable debug mode | β No | false |
# Development
NEXT_PUBLIC_API_URL=http://localhost:8000
# Production
NEXT_PUBLIC_API_URL=https://api.specmorph.comspecmorph-app/
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js App Router
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Dashboard (Home)
β β βββ loading.tsx # Loading UI
β β βββ error.tsx # Error boundary
β β βββ not-found.tsx # 404 page
β β βββ documents/ # Document management page
β β β βββ page.tsx
β β βββ extraction/ # AI extraction viewer
β β β βββ page.tsx
β β βββ diagrams/ # Diagram gallery
β β β βββ page.tsx
β β βββ workflow/ # Automated workflow
β β βββ page.tsx
β β
β βββ components/ # React components
β β βββ ui/ # Base UI primitives
β β β βββ button.tsx
β β β βββ card.tsx
β β β βββ dialog.tsx
β β β βββ input.tsx
β β β βββ badge.tsx
β β β βββ tabs.tsx
β β β βββ ...
β β βββ common/ # Shared components
β β β βββ loading-spinner.tsx
β β β βββ error-display.tsx
β β β βββ empty-state.tsx
β β β βββ file-upload-zone.tsx
β β β βββ diagram-card.tsx
β β βββ layout/ # Layout components
β β β βββ sidebar.tsx
β β β βββ header.tsx
β β β βββ navigation.tsx
β β βββ diagram/ # Diagram-specific components
β β βββ document/ # Document-specific components
β β βββ workflow/ # Workflow-specific components
β β
β βββ hooks/ # Custom React hooks
β β βββ use-documents.ts
β β βββ use-diagrams.ts
β β βββ use-extraction.ts
β β βββ use-workflow.ts
β β βββ index.ts
β β
β βββ services/ # API service layer
β β βββ diagram.service.ts
β β βββ document.service.ts
β β βββ extraction.service.ts
β β βββ workflow.service.ts
β β
β βββ store/ # Zustand state management
β β βββ index.ts
β β
β βββ types/ # TypeScript type definitions
β β βββ api.ts
β β βββ index.ts
β β
β βββ lib/ # Configuration & utilities
β β βββ axios.ts # Axios instance
β β βββ constants.ts # API endpoints
β β
β βββ utils/ # Utility functions
β β βββ index.ts
β β
β βββ assets/ # Styles and static files
β βββ styles/
β βββ globals.css # Global styles
β
βββ .env.local.example # Environment variables template
βββ .gitignore
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json
βββ README.md
Navigate to Documents page:
- Click Upload button or drag & drop PDF files
- Supported formats: PDF
- Multiple files can be uploaded at once
After uploading:
- Click Process All to chunk documents
- Wait for processing to complete
- View processed chunks in Extraction page
Go to Extraction page:
- Click Extract to run AI extraction
- View extracted requirements, entities, and relationships
- Review structured data before diagram generation
Navigate to Diagrams page:
- Click Generate Diagrams
- System creates:
- Class Diagrams
- Sequence Diagrams
- Use Case Diagrams
- View, download, or delete diagrams
For complete automation, use Workflow page:
- Upload documents
- Click Start Workflow
- Monitor real-time progress
- Automatically get all diagrams
The design uses a dark theme with violet/indigo accent colors:
- Background:
slate-950(#0a0a0f) - Primary: Violet-Indigo gradient
- Success: Emerald
- Warning: Amber
- Error: Red
All components feature glassmorphism effects:
- Glass Card: Frosted glass effect with backdrop blur
- Buttons: Gradient backgrounds with glow effects
- Inputs: Glass-style with focus animations
- Badges: Color-coded status indicators
- Animated liquid gradient background
- Smooth page transitions
- Micro-interactions on hover/focus
- Progress tracking animations
The frontend connects to the SpecMorph Backend API using Axios with type-safe TypeScript interfaces.
Located in src/lib/axios.ts:
const api = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL,
timeout: 30000,
headers: {
'Content-Type': 'application/json',
},
});| Feature | Method | Endpoint | Description |
|---|---|---|---|
| Documents | |||
| List Documents | GET | /api/v1/documents |
Get all documents with pagination |
| Upload Document | POST | /api/v1/documents/upload |
Upload single PDF |
| Bulk Upload | POST | /api/v1/documents/bulk-upload |
Upload multiple PDFs |
| Delete Document | DELETE | /api/v1/documents/:id |
Delete by ID |
| Process Documents | POST | /api/v1/documents/process |
Create chunks |
| Extraction | |||
| Get Chunks | GET | /api/v1/extraction/chunks |
View text chunks |
| Extract Data | POST | /api/v1/extraction/extract |
Run AI extraction |
| Get Extraction | GET | /api/v1/extraction |
Get extraction results |
| Diagrams | |||
| List Diagrams | GET | /api/v1/diagrams/list |
Get all diagrams |
| Generate Diagrams | GET | /api/v1/diagrams/generate |
Create UML diagrams |
| Download Diagram | GET | /api/v1/diagrams/download/:filename |
Download file |
| Delete Diagram | DELETE | /api/v1/diagrams/:filename |
Delete diagram |
| Bulk Delete | POST | /api/v1/diagrams/bulk-delete |
Delete multiple |
| Workflow | |||
| Execute Workflow | POST | /api/v1/workflow/execute |
Start automation |
| Get Status | GET | /api/v1/workflow/status/:id |
Check progress |
| List Workflows | GET | /api/v1/workflow |
Get history |
| System | |||
| Health Check | GET | /api/health |
API status |
| Statistics | GET | /api/v1/stats |
System stats |
All API calls use TypeScript interfaces defined in src/types/api.ts:
interface DiagramQueryParams {
page?: number;
limit?: number;
search?: string;
diagram_type?: 'class' | 'sequence' | 'usecase';
sort_by?: string;
sort_order?: 'asc' | 'desc';
}
interface DiagramsListResponse {
data: DiagramInfo[];
success: boolean;
pagination: DocumentPagination;
metadata: ResponseMetadata;
}- System Stats - Documents, chunks, extractions count
- API Health - Real-time backend status
- Recent Activity - Latest documents and diagrams
- Quick Actions - Fast access to common tasks
- Storage Info - Disk usage statistics
- Drag & Drop Upload - Intuitive file upload zone
- Document List - Paginated table view
- Search & Filter - Find documents quickly
- Bulk Operations - Select multiple for deletion
- Process All - Batch document processing
- Status Indicators - Processed/unprocessed badges
- Text Chunks Viewer - Browse processed text
- AI Extraction Results - Requirements, entities, relationships
- Structured Data - UML entities with attributes/methods
- Validation Status - Data quality indicators
- Export Options - Download extraction data
- Gallery View - Grid/list toggle
- Type Filters - Class, Sequence, Use Case
- Full-Screen Preview - Expandable diagram viewer
- Download - Export diagrams
- Bulk Delete - Multi-select operations
- Generation - Create new diagrams from extraction
- Automated Pipeline - One-click complete process
- Progress Tracking - Real-time step updates
- Step Visualization - Visual progress indicators
- Result Preview - Generated diagrams preview
- Workflow History - Past executions log
- Error Handling - Failure notifications and retry
# Development
pnpm dev # Start development server (http://localhost:3000)
pnpm dev --turbo # Start with Turbopack (faster)
# Building
pnpm build # Create production build
pnpm start # Start production server
# Code Quality
pnpm lint # Run ESLint
pnpm type-check # Run TypeScript compiler check-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make changes and test locally
pnpm dev
-
Check code quality
pnpm lint pnpm build
-
Commit and push
git add . git commit -m "feat: add your feature" git push origin feature/your-feature-name
- TypeScript - Strict mode enabled
- ESLint - Next.js recommended config
- Prettier - Automatic code formatting (recommended)
- Naming Conventions:
- Components: PascalCase (
DiagramCard.tsx) - Utilities: camelCase (
buildQueryString()) - Types: PascalCase (
DiagramInfo) - Constants: UPPER_SNAKE_CASE (
API_BASE_URL)
- Components: PascalCase (
- Use React Server Components where possible
- Implement error boundaries for all pages
- Add loading states for async operations
- Write type-safe API calls
- Follow component composition pattern
- Use custom hooks for reusable logic
# Build the application
pnpm build
# Start production server
pnpm startThe built application will be available at http://localhost:3000
.next/
βββ cache/ # Build cache
βββ server/ # Server-side code
βββ static/ # Static assets
βββ standalone/ # Self-contained deployment
- β Automatic code splitting
- β Image optimization with Next.js Image
- β TanStack Query caching
- β Tree shaking
- β Minification
- β Gzip compression
- Push code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
Dockerfile:
FROM node:18-alpine AS base
# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies
COPY package.json pnpm-lock.yaml ./
RUN corepack enable pnpm && pnpm install --frozen-lockfile
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Build application
RUN corepack enable pnpm && pnpm build
# Production image
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]Build and run:
# Build image
docker build -t specmorph-app .
# Run container
docker run -p 3000:3000 \
-e NEXT_PUBLIC_API_URL=http://your-api-url:8000 \
specmorph-appversion: '3.8'
services:
frontend:
build: .
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://backend:8000
depends_on:
- backend
backend:
image: specmorph-api:latest
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://user:pass@db:5432/specmorph- Connect your GitHub repository
- Build settings:
- Build command:
pnpm build - Publish directory:
.next
- Build command:
- Add environment variables
- Deploy
See Next.js Deployment Documentation for platform-specific guides.
Images not loading from backend
Problem: Diagrams showing broken image icons
Solution:
- Verify backend is running on correct port
- Check CORS configuration in backend
- Ensure
next.config.tshas correctremotePatterns:
images: {
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '8000',
pathname: '/static/**',
},
],
}- Add
unoptimizedprop to<Image>components for development
API connection refused
Problem: Cannot connect to backend API
Solutions:
- Verify backend is running:
curl http://localhost:8000/api/health - Check
.env.localhas correctNEXT_PUBLIC_API_URL - Ensure no firewall blocking port 8000
- Check browser console for CORS errors
Build errors with TypeScript
Problem: Type errors during build
Solutions:
# Clear cache
rm -rf .next node_modules
pnpm install
# Check types
pnpm type-check
# Update dependencies
pnpm updateSlow performance
Optimizations:
- Enable TanStack Query caching
- Use React Server Components
- Implement pagination for large lists
- Enable browser caching
- Optimize images
- π Check Documentation
- π Report bugs via GitHub Issues
- π¬ Ask questions in Discussions
- π§ Email: support@specmorph.com
We welcome contributions from the community! Here's how you can help:
-
Fork the repository
git clone https://github.com/your-username/specmorph-app.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Write clean, documented code
- Follow the code style guidelines
- Add tests if applicable
-
Test your changes
pnpm dev pnpm build pnpm lint
-
Commit using conventional commits
git commit -m "feat: add amazing feature"Types:
feat,fix,docs,style,refactor,test,chore -
Push to your fork
git push origin feature/amazing-feature
-
Open a Pull Request
- Describe your changes clearly
- Link related issues
- Wait for review
- π Update documentation for new features
- β Ensure all tests pass
- π¨ Follow existing code style
- π¬ Write meaningful commit messages
- π Report bugs with detailed information
- π‘ Discuss major changes in issues first
Be respectful, inclusive, and professional. See CODE_OF_CONDUCT.md for details.
- Advanced diagram customization options
- Real-time collaborative editing
- Multiple theme support (light mode)
- Export diagrams to PNG/SVG/PDF formats
- Diagram version history and comparison
- Custom AI model configuration
- Integration with popular project management tools
- API rate limiting and authentication
- Multi-language support (i18n)
- Advanced search with filters
- Diagram templates library
- Mobile app (React Native)
- Plugin system for extensibility
- AI-powered diagram suggestions
- Collaborative team workspaces
- Integration with GitHub/GitLab
- Automated testing for diagrams
- Performance analytics dashboard
Want to contribute to any of these? Check out the Contributing section!
What file formats are supported for upload?
Currently, only PDF files are supported. The system extracts text from PDF documents for processing.
How accurate is the AI extraction?
Accuracy depends on:
- Quality of the SRS document
- Clarity of requirements
- AI model used in the backend
Typical accuracy: 85-95% for well-structured SRS documents.
Can I customize the generated diagrams?
Currently, diagrams are auto-generated. Manual customization is on the roadmap. You can download and edit them using tools like PlantUML editors.
Is my data secure?
- All data is processed locally on your server
- No data is sent to third-party services (except AI API if configured)
- You have full control over your documents and diagrams
Can I use this in production?
Yes, but ensure you:
- Set up proper authentication
- Use HTTPS in production
- Configure rate limiting
- Regularly backup your data
What's the difference between Workflow and manual processing?
- Manual: Step-by-step process (Upload β Process β Extract β Generate)
- Workflow: One-click automation of all steps with progress tracking
How do I update to the latest version?
git pull origin main
pnpm install
pnpm buildThis project is licensed under the MIT License.
MIT License
Copyright (c) 2025 Navinda Chandrasiri
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
See LICENSE file for full details.
This project wouldn't be possible without these amazing open-source projects:
- Next.js - The React Framework
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- TanStack Query - Powerful data synchronization
- Framer Motion - Production-ready animations
- Zustand - Lightweight state management
- Lucide - Beautiful icon library
Special thanks to:
- OpenAI for AI capabilities
- The open-source community
- All contributors and users
- π Documentation: Check this README and inline code comments
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: navindadev@gmail.com
- π Website: https://navindachandrasiri.vercel.app
- β Star this repository
- π Watch for updates
- π Enable notifications
- SpecMorph Backend API - Python FastAPI backend
- SpecMorph CLI - Command-line interface
- SpecMorph Docs - Comprehensive documentation
π Built with passion by paradocx96
If you find this project helpful, please consider giving it a β
Last updated: December 2024



