A modern maintenance management system built with Symfony 7 and React 18. This project started as a way to learn clean architecture principles while building something actually useful for industrial maintenance teams.
CMMS stands for Computerized Maintenance Management System. Basically, it helps facilities and factories keep track of their equipment, schedule maintenance, manage work orders, and avoid costly breakdowns.
I've been working on this using a proper clean architecture approach - separating business logic from infrastructure, using CQRS for commands and queries, and keeping everything testable. It's been a great learning experience so far.
Right now the project is in early alpha (v0.1). The foundation is solid:
- Backend API is running on Symfony 7 with proper DDD structure
- Frontend uses React 18 with TypeScript
- Everything runs in Docker containers (works great on Windows too)
- JWT authentication is working
- Basic asset management module is implemented
Still working on the UI for assets, work orders system, and the dashboard. But the architecture is there and ready to scale.
Backend:
- Symfony 7 (PHP 8.3)
- PostgreSQL 16 for data
- Redis for caching
- API Platform for REST endpoints
- Doctrine ORM with migrations
- JWT tokens for auth
Frontend:
- React 18 with TypeScript
- Vite for building (much faster than webpack)
- TailwindCSS + Shadcn components
- Zustand for state management
- TanStack Query for server data
Infrastructure:
- Docker Compose for local dev
- Nginx as reverse proxy
- Multi-stage Docker builds
- GitHub Actions for CI/CD
I'm following Clean Architecture and Domain-Driven Design patterns here. The backend is organized in layers:
backend/src/
├── Domain/ # Core business entities and rules
├── Application/ # Use cases (commands and queries)
├── Infrastructure/ # Database repos and external services
└── UI/ # API controllers and resources
Frontend is feature-based, so each module (auth, assets, work orders) has its own folder with components, API calls, and state management.
You'll need Docker Desktop installed. That's it.
- Clone the repo
git clone https://github.com/syeedalireza/cmms.git
cd cmms- Copy the example env file and update it
cp .env.example .env
# Edit .env with your settings- Start everything
docker-compose up -d- Run database migrations
docker-compose exec backend php bin/console doctrine:migrations:migrate- Create an admin user
docker-compose exec backend php bin/console app:create-adminThe app should be running at http://localhost
API docs are available at http://localhost/api/docs
Backend commands:
# Install dependencies
docker-compose exec backend composer install
# Run migrations
docker-compose exec backend php bin/console doctrine:migrations:migrate
# Code quality checks
docker-compose exec backend vendor/bin/phpstan analyse
docker-compose exec backend vendor/bin/php-cs-fixer fixFrontend:
cd frontend
npm install
npm run devThe roadmap is pretty straightforward:
Phase 1 (Done):
- ✅ Docker setup with security best practices
- ✅ Clean architecture implementation
- ✅ Authentication and user management
- ✅ Basic asset module
Phase 2 (In Progress):
- Asset management UI
- Work order system
- Dashboard with metrics
- Preventive maintenance scheduling
Phase 3 (Planned):
- Inventory management
- Reporting tools
- Mobile optimization
- Email notifications
I'm using PHPStan at level 8 for static analysis, PHP-CS-Fixer for code style (PSR-12), and TypeScript in strict mode. The code should be pretty clean and maintainable.
Some important security measures in place:
- Database ports are not exposed publicly
- Redis requires password authentication
- JWT tokens for API access
- Role-based access control (RBAC)
- All containers run as non-root users
- Input validation on all endpoints
There's more detailed documentation in the docs/ folder:
- Architecture decisions and reasoning
- Database schema design
- API design patterns
- Deployment guides
If you want to contribute, feel free to open an issue or submit a pull request. Please follow the existing code style and architecture patterns.
MIT License - feel free to use this for your own projects.
Built with Symfony, React, and a lot of coffee ☕