Smart Contract Management Platform - Streamline your contract lifecycle from creation to completion.
A modern, full-featured contract management system built with React, TypeScript, and Redux. Manage contracts through their entire lifecycle, create custom blueprints, and download professional PDF documents—all in one elegant interface.
🔗 https://contract.moinmalek6612.workers.dev/
Try out the platform with pre-loaded demo contracts and explore all features without any setup!
Contract Hub was built to solve the common pain points of managing business contracts:
- Fragmented Workflows - Multiple tools for creating, tracking, and storing contracts
- No Status Visibility - Unclear contract states and approval stages
- Repetitive Work - Creating similar contracts from scratch every time
- Poor Organization - Contracts scattered across emails and folders
This platform brings everything together in one place with a clean, intuitive interface that makes contract management actually enjoyable.
Dashboard with contract overview and quick stats
Contract page with All necessary details
Contract detail page with lifecycle tracking
Customizable contract blueprints
- 5-Stage Workflow: Created → Approved → Sent → Signed → Locked
- Status Tracking: Real-time visibility of contract states
- Revoke Option: Cancel contracts at any stage
- Bulk Actions: Quick status changes and batch operations
- Pre-built Templates: Service, Employment, Sales, Partnership, NDA, and more
- Custom Blueprints: Create your own templates from scratch
- Dynamic Fields: Add Text, Date, Signature, and Checkbox fields
- Field Editor: Rename, reorder, and configure custom fields
- Search & Filter: Find contracts instantly by name, client, or status
- Table/Grid Views: Switch between list and card layouts
- PDF Export: Download professional contract documents
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Demo Data: Pre-loaded sample contracts to explore features
- LocalStorage: All data saved locally in your browser
- Import/Export: Backup and restore your contracts (coming soon)
- React 19 - UI library with latest features
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- Tailwind CSS v4 - Utility-first styling
- Redux Toolkit - Predictable state container
- React Redux - Official React bindings
- React Router - Client-side routing
- Lucide React - Beautiful icon library
- jsPDF - PDF generation for contract downloads
- ESLint - Code quality and consistency
- TypeScript Compiler - Type checking
- Vite Plugin React - Fast refresh and HMR
contract-hub/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── BlueprintEditor.tsx
│ │ ├── BlueprintSelector.tsx
│ │ ├── ContractForm.tsx
│ │ ├── ContractCard.tsx
│ │ ├── Header.tsx
│ │ └── ...
│ ├── pages/ # Route pages
│ │ ├── Dashboard.tsx
│ │ ├── ContractList.tsx
│ │ ├── ContractDetail.tsx
│ │ ├── CreateContract.tsx
│ │ ├── EditContract.tsx
│ │ └── Blueprints.tsx
│ ├── store/ # Redux state management
│ │ ├── contractSlice.ts
│ │ ├── blueprintSlice.ts
│ │ ├── hooks.ts
│ │ └── index.ts
│ ├── types/ # TypeScript definitions
│ │ ├── contract.ts
│ │ └── blueprint.ts
│ ├── utils/ # Utility functions
│ │ └── localStorage.ts
│ ├── App.tsx # Main app component
│ ├── index.css # Global styles
│ └── main.tsx # App entry point
├── public/ # Static assets
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download here
- npm (comes with Node.js) or yarn
- A modern web browser (Chrome, Firefox, Safari, or Edge)
To check if you have Node.js installed:
node --version
npm --versiongit clone https://github.com/moin1777/contract-hub.git
cd contract-hubnpm installThis will install all required packages including:
- React, Redux, and React Router
- Tailwind CSS and UI dependencies
- TypeScript and development tools
npm run devYou should see output like:
VITE v7.3.1 ready in 423 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
Navigate to http://localhost:5173/ in your browser. You'll see the dashboard with 3 demo contracts pre-loaded!
1. Choose a Blueprint (or Start from Scratch)
Dashboard → New Contract → Select Blueprint
You can:
- Pick from 9+ pre-built templates
- Create a custom blueprint with your own fields
- Skip blueprints and build from scratch
2. Fill in Contract Details
{
"clientName": "Acme Corporation",
"title": "Web Development Agreement",
"description": "Full-stack development services...",
"value": 45000,
"startDate": "2026-01-15",
"endDate": "2026-06-15"
}3. Add Custom Fields (if using a blueprint)
Custom fields appear automatically based on your blueprint:
- Text fields for names, roles, descriptions
- Date fields for milestones and deadlines
- Signature fields for authorization
- Checkboxes for yes/no options
Output: A new contract is created with status "Created" and appears in your dashboard!
Change Status
Contracts List → Three-dots menu → Change Status → Select next stage
Workflow Rules:
- ✅ Created → Can approve or revoke
- ✅ Approved → Can send or revoke
- ✅ Sent → Can mark as signed or revoke
- ✅ Signed → Can lock (finalize)
- 🔒 Locked → Cannot change (final state)
- ❌ Revoked → Cannot change (canceled)
Quick Actions:
- View Details
- Edit Contract (if not locked/revoked)
- Download PDF
- Delete
1. Navigate to Blueprints
Dashboard → Blueprints → "Start from scratch"
2. Configure Template
{
"name": "Freelance Agreement",
"category": "Service",
"color": "#6366f1",
"icon": "Briefcase",
"template": {
"title": "Freelance Services Agreement",
"description": "Professional freelance services...",
"value": 5000
}
}3. Add Custom Fields
Click field type buttons to add:
- 📝 Text - Client names, project details
- 📅 Date - Deadlines, milestones
- ✍️ Signature - Authorization fields
- ☑️ Checkbox - Terms acceptance
4. Save and Use
Your blueprint appears in the list and can be:
- Used to create new contracts
- Edited to update fields
- Deleted if no longer needed (custom only)
Generate PDF
Contract Detail Page → Download button
Output: Professional PDF document with:
- Contract title and client info
- Status badge
- All contract details (dates, value, description)
- Custom fields with values
- Contract ID and timestamps
- Formatted for printing
File downloaded as: Web_Development_Agreement_contract.pdf
User Action → Component Event → Redux Action →
Reducer Updates State → localStorage Sync → UI Re-renders
graph LR
A[Created] --> B[Approved]
B --> C[Sent]
C --> D[Signed]
D --> E[Locked]
A -.-> F[Revoked]
B -.-> F
C -.-> F
Contracts Slice:
- Stores all contracts
- Handles CRUD operations
- Manages status transitions
- Persists to localStorage
Blueprints Slice:
- Default blueprints (9 templates)
- Custom user blueprints
- CRUD for custom blueprints only
- Field management
/ (Dashboard)
├── /contracts (List View)
│ ├── /contracts/new (Create)
│ ├── /contracts/:id (Detail)
│ └── /contracts/:id/edit (Edit)
└── /blueprints (Blueprint Manager)
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run ESLint
npm run lintnpm run buildThis creates an optimized production build in the dist/ folder:
- Minified JavaScript and CSS
- Tree-shaken dependencies
- Optimized assets
- Ready to deploy to any static hosting
The app can be deployed to any static hosting service:
npm install -g vercel
vercelnpm run build
# Drag and drop the dist/ folder to Netlifynpm run build
# Configure GitHub Pages to serve from the dist/ branchEdit tailwind.config.js to change the primary color:
theme: {
extend: {
colors: {
primary: '#6366f1', // Change this
}
}
}Edit src/types/blueprint.ts:
export const defaultBlueprints: Blueprint[] = [
// Add your blueprint here
{
id: 'bp-custom',
name: 'Your Template',
// ... rest of config
}
];- Check if port 5173 is available
- Try
npm installagain to reinstall dependencies - Clear
node_modulesand reinstall:rm -rf node_modules && npm install
- Check browser console for localStorage errors
- Ensure you're not in incognito/private mode
- Check browser settings for localStorage permissions
- Ensure jsPDF is installed:
npm install jspdf - Check browser console for errors
- Try a different browser
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
✅ Commercial use
✅ Modification
✅ Distribution
✅ Private use
Future enhancements planned:
- Cloud Sync - Save contracts across devices
- Email Integration - Send contracts directly to clients
- E-Signatures - Built-in digital signature support
- Template Marketplace - Share and download blueprints
- Analytics Dashboard - Contract insights and metrics
- Multi-user Support - Team collaboration features
- Version History - Track contract changes over time
- Notifications - Alerts for contract milestones
- Dark Mode - Eye-friendly theme option
- Export/Import - Backup contracts as JSON
- 🚀 Built in React 19 with the latest features
- 🎨 Uses Tailwind CSS v4 (bleeding edge!)
- 📦 Zero database required - pure frontend magic
- ⚡ Lightning-fast with Vite's HMR
- 🎯 100% TypeScript for type safety
- 📱 Fully responsive - works on any device
Having issues? Found a bug? Have a feature request?
- 📧 Email: malekmoin.work@gmail.com
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- Icons by Lucide
- Styling with Tailwind CSS
- State Management by Redux Toolkit
- PDF Generation via jsPDF
⭐ Star this repo if you find it helpful!
Made with ❤️ and ☕
"Simplifying contracts, one click at a time."