How cmdmnt/commandment works
Project type and purpose
• Commandment is a full-stack, open-source Apple MDM (Mobile Device Management) server.
• It provides a REST/JSON-API backend (Python/Flask + SQLAlchemy + Alembic migrations) and a React/Redux/TypeScript SPA as its frontend.
• It interacts with Apple’s APNS (push), DEP (enrollment), and VPP (volume-purchase) services, manages device profiles, certificates, and commands.
File structure
• Top-level “commandment/” directory: the Python package with sub‐apps (api, auth, apns, dep, enroll, mdm, vpp, pki, profiles, etc.). Each has its own Flask “app.py” and resource/schema modules.
• “alembic/” and “commandment/alembic/”: database migration scripts for SQLAlchemy.
• “ui/”: the web UI; React components, Redux store modules, webpack configs.
• Docker and CI configs (.circleci/, .docker/, docker-compose.yml, GitLab CI, Travis settings): container orchestration & deployment.
Key insights from README
• Python 3.6+ backend requiring a TLS cert, APNS certificate, and a relational database.
• Frontend is a static bundle, served by nginx (in Docker) or any static host, and communicates over HTTPS to the Flask API.
• No external message broker—background “threads” (startup, VPP, APNS) run inside the same container via supervisord.