A Visual Mathematical Expression Builder & Computer Algebra System Workspace
MathLab is an innovative web-based platform that bridges the gap between mathematical notation and computation. Designed for the Kharazmi Festival, it provides an intuitive drag-and-drop interface for constructing and solving mathematical expressions with full support for multiple languages (English & Persian).
MathLab revolutionizes how students, educators, and mathematicians interact with complex mathematical expressions. Instead of typing cryptic syntax, users can:
- Visually construct mathematical equations using draggable elements
- Solve equations with a powerful, modular computer algebra system
- Validate expressions in real-time
- Copy and share results instantly
- Switch between languages (English & Persian) seamlessly
- Drag-and-drop interface for intuitive expression construction
- Rich element library including:
- Numbers and decimals
- Basic operations (+, −, ×, ÷)
- Advanced operations (fractions, radicals, powers)
- Variables and symbolic manipulation
- Mathematical symbols and operators
- Real-time equation preview with LaTeX rendering
- The core logic is powered by our standalone sobhanmohammadi/cas library.
- Equation solving with support for:
- Linear equations
- Multi-variable systems
- Symbolic manipulation
- Error detection and descriptive feedback
- Variable substitution and expression evaluation
- Full Persian (RTL) interface with proper directionality
- English support with complete localization
- Easy language switching via in-app button
- Comprehensive i18n for all UI strings
- Content Security Policy (CSP) headers to prevent XSS attacks
- Rate limiting with IP-based tracking
- Input sanitization for safe expression handling
- Optimized performance with debouncing and throttling
- No external dependencies for frontend core functionality (optional CDN for enhancements)
- Mobile-friendly interface
- Touch-optimized controls and interactions
- Adaptive layout for all screen sizes
- PHP: 7.4 or higher
- Composer: Required for backend dependencies
- Web Server: Apache with
mod_rewriteor Nginx - Browser: Modern browser with ES6 JavaScript support
- Chrome/Edge 51+
- Firefox 54+
- Safari 10+
The backend calculation engine relies on our dedicated Composer package. You must install the dependencies before running the application.
# Clone the repository
git clone https://github.com/sobhanmohammadi-dev/MathLab.git
cd MathLab
# Navigate to the app directory and install dependencies
cd app
composer install
cd ..Created with ❤️ and ☕ for Kharazmi Festival