Open-Source Mobile Device Management
Manage, secure, and monitor your mobile device fleet with a modern, enterprise-grade MDM solution.
OpenMDM is a full-featured Mobile Device Management platform built with modern technologies. It provides organizations with the tools they need to manage, secure, and monitor their mobile device fleet from a single, intuitive dashboard.
- Open Source - Full transparency and community-driven development
- Modern Stack - Built with Next.js 16, React 19, and TypeScript
- Beautiful UI - Powered by shadcn/ui with a distinctive Electric Blue theme
- Enterprise Ready - Scalable architecture with PostgreSQL, Redis, and MQTT
- Developer Friendly - Type-safe APIs with oRPC, monorepo with Turborepo
- Real-time Monitoring - Track device status, battery, storage, and location
- Remote Commands - Lock, wipe, reboot devices remotely
- Bulk Operations - Execute commands across multiple devices at once
- Policy Templates - Pre-built templates for common use cases (Kiosk, Restricted, Secure)
- Granular Controls - Configure camera, USB, WiFi, Bluetooth, and more
- Password Enforcement - Set minimum requirements and expiration rules
- App Distribution - Deploy applications to devices and groups
- Version Control - Track and manage app versions
- Installation Policies - Control which apps can be installed
- Hierarchical Organization - Create nested groups for departments or locations
- Targeted Deployment - Apply policies and apps to specific groups
- Bulk Assignment - Quickly organize devices into groups
- Single App Mode - Lock devices to a specific application
- Allowed Apps - Define a whitelist of permitted applications
- Exit Protection - Secure kiosk mode with admin credentials
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript |
| Styling | Tailwind CSS 4, shadcn/ui |
| Backend | Hono, oRPC (type-safe APIs) |
| Database | PostgreSQL 16, Drizzle ORM |
| Auth | Better-Auth |
| Messaging | MQTT (Eclipse Mosquitto) |
| Storage | MinIO (S3-compatible) |
| Cache | Redis |
| Runtime | Bun |
| Build | Turborepo |
git clone git@github.com:azoila/openmdm-demo.git
cd openmdm-demodocker compose up -dThis starts:
- PostgreSQL (port 5432) - Main database
- MQTT Broker (port 1883, 9001) - Device communication
- MinIO (port 9000, 9002) - APK storage
- Redis (port 6379) - Caching
bun install# Copy example env files
cp apps/server/.env.example apps/server/.envDefault database connection (works with Docker Compose):
DATABASE_URL=postgresql://openmdm:openmdm123@localhost:5432/openmdmbun run db:pushbun run devOpen your browser:
- Web App: http://localhost:3001
- API Server: http://localhost:3000
openmdm-demo/
├── apps/
│ ├── web/ # Next.js 16 frontend
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── (public)/ # Landing page
│ │ │ │ ├── (auth)/ # Login, Register
│ │ │ │ └── (dashboard)/ # Protected dashboard
│ │ │ ├── components/
│ │ │ │ ├── mdm/ # MDM-specific components
│ │ │ │ ├── sidebar/ # Navigation sidebar
│ │ │ │ └── ui/ # shadcn/ui components
│ │ │ └── lib/ # Utilities, hooks, types
│ │ └── ...
│ │
│ └── server/ # Hono API server
│ ├── src/
│ │ ├── index.ts # Server entry point
│ │ └── mdm.ts # MDM API routes
│ └── ...
│
├── packages/
│ ├── api/ # Shared API definitions (oRPC)
│ ├── auth/ # Authentication configuration
│ ├── db/ # Database schema (Drizzle)
│ │ └── src/schema/
│ │ ├── index.ts # Schema exports
│ │ └── mdm.ts # MDM tables
│ ├── env/ # Environment variable validation
│ └── config/ # Shared configurations
│
├── docker/ # Docker configurations
│ └── mosquitto/ # MQTT broker config
│
├── docker-compose.yml # Local infrastructure
└── turbo.json # Turborepo configuration
| Route | Description |
|---|---|
/ |
Landing page with features and pricing |
/login |
User authentication |
/register |
New account registration |
/dashboard |
Main dashboard overview |
/dashboard/devices |
Device management |
/dashboard/apps |
Application management |
/dashboard/groups |
Group management |
/dashboard/policies |
Policy configuration |
# Development
bun run dev # Start all apps in development mode
bun run dev:web # Start only the web app
bun run dev:server # Start only the API server
# Build
bun run build # Build all applications
bun run check-types # TypeScript type checking
# Database
bun run db:push # Push schema changes to database
bun run db:generate # Generate migration files
bun run db:migrate # Run migrations
bun run db:studio # Open Drizzle Studio (database UI)# Database
DATABASE_URL=postgresql://openmdm:openmdm123@localhost:5432/openmdm
# Authentication
BETTER_AUTH_SECRET=your-secret-key-here
BETTER_AUTH_URL=http://localhost:3000
# MQTT (optional)
MQTT_BROKER_URL=mqtt://localhost:1883
# MinIO (optional)
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
MINIO_ACCESS_KEY=openmdm
MINIO_SECRET_KEY=openmdm123OpenMDM uses a distinctive Electric Blue (#0EA5E9) accent color with a modern, rounded design language.
- Glassmorphism - Subtle blur effects on headers and overlays
- Rounded Corners -
rounded-xl(16px) androunded-2xl(24px) - Glow Effects - Primary color glow on interactive elements
- Dark Mode - Full support with deep slate backgrounds
| Token | Light Mode | Dark Mode |
|---|---|---|
| Primary | #0EA5E9 |
#0EA5E9 |
| Background | #FAFBFC |
#0F172A |
| Card | #FFFFFF |
#1E293B |
| Muted | #F1F5F9 |
#334155 |
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with love using the Better-T-Stack