A lightweight, full-stack process management system with real-time monitoring, intelligent task scheduling, and complete virtual OS environment
Experience desktop computing in your browser with dual-mode process monitoring, persistent file system, and advanced resource management
- π Live Demo - Try it out!
- π Issues
- π€ Contributing
- π‘οΈ Security
- π License
webOS-processMGR is a lightweight, full-stack process management system that emulates a complete web-based operating system with real-time monitoring capabilities. Built with React (TypeScript) and FastAPI (Python), it provides:
- π₯οΈ Virtual Desktop Environment: Complete OS emulation with boot sequence, login, draggable/resizable windows, taskbar, and persistent desktop state
- π Dual Process Monitoring: Monitor both virtual OS processes and actual host system processes with real-time CPU/memory metrics
- π Virtual File System: Full CRUD operations for files and folders with persistent MongoDB storage
- π Enterprise Security: JWT authentication, bcrypt password hashing, and role-based access control (RBAC)
- β‘ Real-time Updates: WebSocket-powered live metrics streaming every 2 seconds
- π€ Intelligent Management: Smart task scheduling with priority queues and load-based optimization
The system combines the familiar desktop experience with powerful system monitoring tools, making it ideal for educational purposes, process visualization, and resource management demonstrations.
- π Lightweight Architecture - Efficient React + FastAPI stack with minimal dependencies
- π Real-time Monitoring - Live CPU/Memory/Threads tracking with interactive charts (Recharts)
- π Smart Task Scheduling - Priority-based process queue management
- π‘οΈ Resource Isolation - Process-level resource limits and isolation controls
- π Advanced Analytics - Historical data tracking and performance metrics
- π€ Auto-scaling - Intelligent load-based resource optimization
- π¨ Modern UI/UX - Framer Motion animations with intuitive drag-and-drop interface
- π Security First - JWT authentication, bcrypt hashing, admin-only critical operations
- π¦ Docker Ready - Full Docker Compose setup for one-command deployment
- π§© Modular Design - Clean separation of concerns with well-structured codebase
- Abstract
- Key Highlights
- Quick Start
- Features
- Screenshots & Visuals
- Tech Stack
- Dependencies & Packages
- Installation
- Usage
- Folder Structure
- API Reference
- Architecture
- Development
- Performance & Metrics
- Deployment
- Troubleshooting
- Security Considerations
- Contributing
- Code of Conduct
- License
# 1. Clone and install
git clone https://github.com/H0NEYP0T-466/webOS-processMGR.git
cd webOS-processMGR
npm install
# 2. Start with Docker (easiest)
cd docker && docker-compose up -d
# 3. Open browser
# http://localhost (frontend)
# http://localhost:8888/docs (API docs)Try the live demo: https://web-os-process-mgr.vercel.app
No installation needed! Just open the link and experience the full webOS environment.
Default credentials:
- Username:
admin - Password:
admin123
- Boot sequence with staged progress and witty messages
- Login screen with JWT-based authentication
- Draggable/resizable windows with minimize, maximize, and close
- Taskbar with open windows, system tray, and clock
- App launcher for quick access to applications
- Persistent desktop state (saved to MongoDB)
- Create, rename, move, and delete files and folders
- Text editor with autosave
- File tree navigation
- All data persisted to MongoDB
Two tabs for comprehensive process monitoring:
Virtual OS Tab:
- View all running virtual processes (apps/tasks)
- Monitor CPU and memory usage
- End tasks gracefully
Host System Tab:
- Real host machine processes via psutil
- Live CPU/memory charts with historical data
- Sort and filter processes
- End tasks (admin only) with safety checks
- JWT authentication
- Password hashing with bcrypt
- Role-based access control (RBAC)
- Admin-only host process termination
Emoji-rich logs for all major events:
β
MongoDB connected: mongodb://***localhost:27017
π’ Server started: http://0.0.0.0:8888
π€ User registered: username=john
π Login success: username=john
ποΈ Folder created: path=/Documents owner=user123
π File created: path=/Documents/notes.txt owner=user123
βοΈ File updated: path=/Documents/notes.txt bytes=256
π§° Virtual process started: id=abc123 app=editor
β Host process terminated: pid=1234 by=admin result=success
π¦ Desktop state saved: windows=3 icons=2 user=john
Runtime Dependencies
- Animation library for React
- JavaScript library for building user interfaces
- React package for working with the DOM
- Popular icons for React projects
- Declarative routing for React
- Composable charting library built on React
- Small, fast state management solution
Dev Dependencies
- ESLint JavaScript configuration
- TypeScript definitions for Node.js
- TypeScript definitions for React
- TypeScript definitions for React DOM
- Official Vite plugin for React
- Pluggable linting utility for JavaScript
- ESLint rules for React Hooks
- ESLint plugin for React Refresh
- Global identifiers from different JavaScript environments
- TypeScript language
- Monorepo for TypeScript ESLint tooling
- Next generation frontend build tool
Python Dependencies
- Modern, fast web framework for building APIs
- Lightning-fast ASGI server
- Async MongoDB driver for Python
- JOSE implementation in Python for JWT
- Modern password hashing library
- Data validation using Python type hints
- Settings management using Pydantic
- Cross-platform library for system and process utilities
- Multipart form data parser
- WebSocket implementation
- Testing framework
- Pytest support for asyncio
- HTTP client for Python
- Node.js 18+
- Python 3.11+
- MongoDB 6+
- Docker (optional)
# Clone the repository
git clone https://github.com/H0NEYP0T-466/webOS-processMGR.git
cd webOS-processMGR
# Start all services
cd docker
docker-compose up -d
# Access the app
# Frontend: http://localhost
# Backend: http://localhost:8888
# API Docs: http://localhost:8888/docsImportant: Before starting, create a .env file in the project root:
# Copy the example file
cp .env.example .env
# The .env file should contain:
# VITE_API_URL=http://localhost:8888
# VITE_WS_URL=ws://localhost:8888/ws
# (plus other backend configuration)# Navigate to backend
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set environment variables (or create .env file)
export MONGO_URI=mongodb://localhost:27017
export JWT_SECRET=your-secret-key
export ADMIN_USER=admin
export ADMIN_PASS=admin123
# Start the server
uvicorn app.main:app --host 0.0.0.0 --port 8888 --reload# Install dependencies
npm install
# Set environment variables (create .env file in project root)
# Copy from .env.example and ensure these are set:
# VITE_API_URL=http://localhost:8888
# VITE_WS_URL=ws://localhost:8888/ws
# Start development server
npm run dev- Open your browser and navigate to
http://localhost:5173(or the port shown by Vite) - You'll see the boot sequence
- Login with credentials (default admin:
admin/admin123) - Explore the desktop environment with various apps
- Boot Sequence: Watch the staged boot process with witty loading messages
- Login: Authenticate with default credentials (
admin/admin123) - Window Management:
- Drag windows around the desktop
- Resize windows by dragging edges
- Minimize, maximize, and close windows
- Use the taskbar to switch between open applications
- Navigate File Tree: Browse the virtual file system
- Create Folders: Right-click or use toolbar to create new folders
- Create Files: Add new text files
- Edit Files: Open text editor with auto-save functionality
- Organize: Rename, move, or delete files and folders
- Persistence: All changes saved to MongoDB instantly
Virtual OS Tab:
- View all running virtual processes (apps/tasks)
- Monitor CPU and memory usage for each process
- Sort by different metrics
- End tasks gracefully with the terminate button
Host System Tab:
- View real host machine processes (requires psutil)
- Watch live CPU/Memory charts update every 2 seconds
- Sort and filter processes by various criteria
- Terminate processes (admin only) with safety checks
- Protected PIDs (0, 1, self) cannot be terminated
Configure system preferences and user settings
Access interactive API documentation at http://localhost:8888/docs
webOS-processMGR/
βββ src/ # Frontend source
β βββ apps/ # Application components
β β βββ FileManager/ # File browser and editor
β β β βββ FileTree.tsx # Tree navigation component
β β β βββ FileEditor.tsx # Text editor component
β β β βββ FileManager.tsx # Main file manager
β β βββ TaskManager/ # Process monitoring
β β β βββ VirtualTab.tsx # Virtual OS processes
β β β βββ HostTab.tsx # Host system processes
β β β βββ TaskManager.tsx # Main task manager
β β βββ Editor/ # Standalone text editor
β β βββ Settings/ # System settings app
β βββ os/ # OS components
β β βββ Boot/ # Boot sequence
β β β βββ BootScreen.tsx
β β βββ Login/ # Authentication UI
β β β βββ LoginScreen.tsx
β β βββ Desktop/ # Desktop environment
β β β βββ Desktop.tsx
β β β βββ Taskbar.tsx
β β β βββ Launcher.tsx
β β βββ WindowManager/ # Window system
β β βββ Window.tsx
β β βββ WindowManager.tsx
β βββ services/ # API and WebSocket clients
β β βββ api.ts # REST API client
β β βββ websocket.ts # WebSocket client
β βββ state/ # Zustand state management
β β βββ authStore.ts # Authentication state
β β βββ desktopStore.ts # Desktop state
β β βββ fileStore.ts # File system state
β β βββ processStore.ts # Process state
β βββ types/ # TypeScript definitions
β βββ api.ts
β βββ models.ts
β
βββ backend/ # Backend source
β βββ app/
β βββ main.py # FastAPI application entry
β βββ auth/ # Authentication module
β β βββ routes.py # Auth endpoints
β β βββ models.py # User models
β β βββ security.py # JWT & hashing
β β βββ dependencies.py # Auth dependencies
β βββ files/ # File system module
β β βββ routes.py # File/folder endpoints
β β βββ models.py # File system models
β β βββ service.py # File operations logic
β βββ desktop/ # Desktop state module
β β βββ routes.py # Desktop state endpoints
β β βββ models.py # Desktop models
β β βββ service.py # Desktop state logic
β βββ vproc/ # Virtual processes module
β β βββ routes.py # Virtual process endpoints
β β βββ models.py # Process models
β β βββ manager.py # Process lifecycle
β βββ hproc/ # Host processes module
β β βββ routes.py # Host process endpoints
β β βββ monitor.py # psutil integration
β β βββ metrics.py # Metrics collection
β βββ ws/ # WebSocket module
β β βββ connection.py # Connection manager
β β βββ events.py # Event broadcasting
β βββ db/ # Database configuration
β β βββ mongodb.py # Motor async MongoDB
β βββ config.py # Application settings
β βββ tests/ # Backend tests
β βββ test_auth.py
β βββ test_files.py
β βββ test_processes.py
β
βββ docker/ # Docker configuration
β βββ docker-compose.yml # Development compose
β βββ docker-compose.prod.yml # Production compose
β βββ backend.Dockerfile # Backend image
β βββ frontend.Dockerfile # Frontend image
β
βββ public/ # Static assets
β βββ icons/ # App icons
β βββ favicon.ico
β
βββ docs/ # Documentation
β βββ API.md # API documentation
β βββ ARCHITECTURE.md # Architecture details
β
βββ .github/ # GitHub templates and workflows
β βββ workflows/
β β βββ ci.yml # CI/CD pipeline
β βββ ISSUE_TEMPLATE/
β
βββ .env.example # Environment template
βββ package.json # Frontend dependencies
βββ backend/requirements.txt # Backend dependencies
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ CONTRIBUTING.md # Contribution guidelines
βββ SECURITY.md # Security policy
βββ CODE_OF_CONDUCT.md # Code of conduct
βββ LICENSE # MIT License
βββ README.md # This file
| Endpoint | Method | Description |
|---|---|---|
/auth/register |
POST | Register new user |
/auth/login |
POST | Login and get JWT |
/auth/me |
GET | Get current user info |
| Endpoint | Method | Description |
|---|---|---|
/files/tree |
GET | Get file tree |
/files/folder |
POST | Create folder |
/files/file |
POST | Create file |
/files/node/{id} |
GET | Get node details |
/files/node/{id} |
PATCH | Update node |
/files/node/{id} |
DELETE | Delete node |
| Endpoint | Method | Description |
|---|---|---|
/desktop/state |
GET | Get desktop state |
/desktop/state |
PUT | Update desktop state |
| Endpoint | Method | Description |
|---|---|---|
/vproc/list |
GET | List virtual processes |
/vproc/start |
POST | Start virtual process |
/vproc/stop/{id} |
POST | Stop virtual process |
| Endpoint | Method | Description |
|---|---|---|
/hproc/list |
GET | List host processes |
/hproc/metrics |
GET | Get system metrics |
/hproc/details/{pid} |
GET | Get process details |
/hproc/terminate/{pid} |
POST | Terminate process (admin) |
Connect to /ws?token=<jwt_token> for real-time updates.
Topics:
metrics.host- System CPU/memory metrics (every 2s)vproc.events- Virtual process lifecycle eventsfs.events- File system changes
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React) β
β βββββββββββββ βββββββββββββ βββββββββββββ βββββββββββββββββ β
β β Desktop β β Task β β File β β Settings β β
β β Manager β β Manager β β Manager β β App β β
β βββββββββββββ βββββββββββββ βββββββββββββ βββββββββββββββββ β
β β β β β β
β βββββββ΄ββββββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄ββββββ β
β β Zustand State Store β β
β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ β
β β API Client (REST) / WebSocket Client β β
β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend (FastAPI) β
β βββββββββββββ βββββββββββββ βββββββββββββ βββββββββββββββββ β
β β Auth β β Virtual β β Host β β File β β
β β Routes β β Process β β Process β β System β β
β βββββββββββββ βββββββββββββ βββββββββββββ βββββββββββββββββ β
β β β β β β
β βββββββ΄ββββββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄ββββββ β
β β Service Layer β β
β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ β
β β MongoDB (Motor) β psutil (Host Monitoring) β β
β ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- User Authentication: JWT tokens stored in frontend state, sent with all API requests
- Virtual Processes: CRUD operations stored in MongoDB, events broadcast via WebSocket
- Host Processes: Read-only monitoring via psutil, metrics pushed every 1-2 seconds
- File System: Virtual file tree stored in MongoDB with path-based indexing
- Virtual Processes: Created on app open, tracked in database, cleaned up on app close
- Host Processes: Read-only monitoring, admin-only termination with safety guards
- Update Frequency: Metrics pushed every 2 seconds via WebSocket
- Data Points: CPU usage, memory usage, thread count, process count
- Historical Data: Rolling window for chart visualization
- Minimum RAM: 512MB for backend + frontend
- Recommended RAM: 2GB for smooth operation
- CPU: Single core sufficient, multi-core recommended for better performance
- Storage: ~100MB for application + MongoDB data
- Browser: Modern browser with WebSocket support (Chrome, Firefox, Safari, Edge)
- Concurrent Users: Supports multiple simultaneous users with isolated desktop states
- Process Tracking: Handles hundreds of virtual processes efficiently
- Database: MongoDB indexed for fast path-based file system lookups
- WebSocket: Efficient broadcast mechanism for real-time updates
# Backend tests
cd backend
source venv/bin/activate
python -m pytest app/tests -v
# Frontend lint and type check
npm run lint
npm run build# Frontend
npm run build
# Backend (Docker)
docker build -f docker/backend.Dockerfile -t webos-backend .# Build the frontend
npm run build
# Deploy to Vercel
# 1. Install Vercel CLI: npm i -g vercel
# 2. Run: vercel
# 3. Follow prompts to deploy
# Set environment variables in Vercel dashboard:
# VITE_API_URL=https://your-backend-url.com
# VITE_WS_URL=wss://your-backend-url.com/ws# Prepare for deployment
cd backend
# Railway deployment
# 1. Install Railway CLI
# 2. railway init
# 3. railway up
# Render deployment
# 1. Connect GitHub repository
# 2. Select backend/ as root directory
# 3. Set build command: pip install -r requirements.txt
# 4. Set start command: uvicorn app.main:app --host 0.0.0.0 --port $PORT# 1. Create MongoDB Atlas account
# 2. Create a cluster (free tier available)
# 3. Get connection string
# 4. Update MONGO_URI in backend .env:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/webos?retryWrites=true&w=majority# Build and run with Docker Compose
cd docker
docker-compose -f docker-compose.prod.yml up -d
# Or use Docker Swarm for scaling
docker swarm init
docker stack deploy -c docker-compose.prod.yml webosLive Demo: The current deployment is available at https://web-os-process-mgr.vercel.app
The project uses:
- ESLint for TypeScript/React linting
- pytest for Python testing
- GitHub Actions CI for automated testing on PR/push
MongoDB Connection Failed
- Ensure MongoDB is running:
docker psorsystemctl status mongod - Check
MONGO_URIin your.envfile
Permission Denied (Host Processes)
- Some process information requires elevated privileges
- Run the backend with appropriate permissions for full process access
WebSocket Connection Failed
- Check
VITE_WS_URLin frontend.env - Ensure backend is running and accessible
CORS Errors
- Update
CORS_ORIGINSin backend.envto include your frontend URL
- Change
JWT_SECRETin production - Use HTTPS in production
- Review CORS_ORIGINS settings
- Host process termination is admin-only
- Critical PIDs (0, 1, self) are protected
See SECURITY.md for more details.
We welcome contributions! Please see our Contributing Guidelines for details on:
- Setting up your development environment
- Code style and standards
- Submitting pull requests
- Reporting issues
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by H0NEYP0T-466