Distributed Desk Management System with Embedded Elements
DeskUp is a comprehensive desk management platform developed as a semester project for Distributed Software Systems. It combines web technologies, embedded systems, and intelligent scheduling to create a complete smart office solution.
DeskUp manages standing desks with smart height adjustment capabilities, user session tracking, automated cleaning schedules, and ergonomic optimization through computer vision. The system integrates multiple components:
- Web Application (Laravel + Tailwind CSS)
- Desk Simulator (Python REST API)
- Embedded Controller (Raspberry Pi Pico W)
- AI Height Analyzer (Python + MediaPipe)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DeskUp System β
ββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββ€
β Laravel Web β Python AI β Wifi2Ble β Raspberry Pi β
β Application β Service β Simulator β Pico W β
β (Port 80) β (Port 5000) β (Port 8443) β (Embedded) β
ββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββ
- User Management: Authentication, profiles, and session tracking
- Desk Control: Real-time desk height adjustment and monitoring
- Smart Scheduling: Automated recurring cleaning schedules
- 3D Layout View: Interactive office layout visualization using Three.js
- Health Statistics: User activity tracking and ergonomic analytics
- Notifications: Real-time alerts for events and cleanings
- PDF Export: Generate reports and statistics
- Admin Dashboard: Comprehensive system management
- Computer vision-based pose detection using MediaPipe
- Ergonomic assessment and posture analysis
- Height estimation from images
- Optimal desk height calculation
- Detailed anthropometric analysis
- REST API for desk control and monitoring
- Simulates multiple desks with configurable properties
- Real-time position, speed, and status tracking
- Error logging and usage counters
- HTTPS support with SSL certificates
- Data persistence across restarts
- OLED display for user information
- UART communication with desk hardware
- Real-time height monitoring
- User login/logout detection
- Desk assignment tracking
- Docker & Docker Compose
- PHP 8.2+ (for local development)
- Python 3.8+ (for local development)
- Node.js 18+ (for local development)
- Raspberry Pi Pico W SDK (for embedded development)
-
Clone the repository
git clone https://github.com/dricondop/DeskUp.git cd DeskUp -
Configure environment
cd DeskUp cp .env.example .env # Edit .env with your settings
-
Start all services
docker-compose up -d
-
Access the application
- Web App: http://localhost
- Wifi2Ble Simulator: https://localhost:8443
- Python AI Service: http://localhost:5000
cd DeskUp
# Install dependencies
composer install
npm install
# Configure environment
cp .env.example .env
php artisan key:generate
# Setup database
touch database/database.sqlite
php artisan migrate
php artisan db:seed
# Start development server
composer dev
# Or separately:
# php artisan serve
# php artisan queue:listen
# npm run devcd DeskUp/python_service
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start service
python main.pycd Wifi2Ble
# Start HTTP server
python simulator/main.py --port 8000
# Or HTTPS server
python simulator/main.py --port 8443 --https \
--certfile config/cert.pem --keyfile config/key.pem
# With custom desk count and simulation speed
python simulator/main.py --desks 100 --speed 60cd Pico4DeskUp
# Build the project
mkdir build && cd build
cmake ..
make
# Flash to Pico (connect via USB)
# Copy Pico4DeskUp.uf2 to the Pico drive- Laravel Application - Web application details
- Python AI Service - Height analyzer documentation
- Wifi2Ble Simulator - REST API documentation
# Run cleaning scheduler (manual)
php artisan cleaning:run
# Complete expired events
php artisan events:complete-expired
# Run scheduler continuously
php artisan schedule:work
# Run tests
composer test
# or
php artisan test# Run linter
vendor/bin/pint
# Clear cache
php artisan config:clear
php artisan cache:clear- Laravel 12 - PHP web framework
- SQLite - Database
- Python 3 - AI service & simulator
- MediaPipe - Pose detection
- C/C++ - Embedded firmware
- Tailwind CSS 4 - Styling
- Three.js - 3D visualization
- Vite - Build tool
- Axios - HTTP client
- Docker - Containerization
- Nginx - Web server
- UART - Hardware communication
- I2C - OLED display interface
DeskUp/
βββ DeskUp/ # Laravel web application
β βββ app/ # Application logic
β βββ resources/ # Views and assets
β βββ routes/ # Route definitions
β βββ database/ # Migrations and seeders
β βββ python_service/ # AI height analyzer
βββ Wifi2Ble/ # Desk simulator API
β βββ simulator/ # Python REST server
β βββ config/ # SSL certificates & API keys
β βββ data/ # Persistent desk state
βββ Pico4DeskUp/ # Raspberry Pi Pico firmware
β βββ *.cpp/*.h # Source files
β βββ build/ # Build artifacts
βββ docker-compose.yml # Docker orchestration
- API key authentication for desk simulator
- HTTPS support with SSL/TLS
- Laravel authentication and authorization
- Admin role-based access control
- Rate limiting on sensitive endpoints
# Laravel tests
cd DeskUp
php artisan test
# Python service tests
cd DeskUp/python_service
python test_service.py
# Wifi2Ble API tests
cd Wifi2Ble
python tests/simple_api_test.pyThis project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2024 Krzysztof Sierszecki, SDU
Developed as part of the SPE25 - Distributed Software Systems with Embedded Elements course.
-
Docker containers won't start
- Ensure ports 80, 5000, and 8443 are available
- Check Docker daemon is running
- Review logs:
docker-compose logs
-
Laravel migration fails
- Ensure database file exists:
touch database/database.sqlite - Clear config cache:
php artisan config:clear
- Ensure database file exists:
-
Pico won't connect
- Verify UART connections
- Check I2C wiring for OLED display
- Review serial output for errors
-
AI service errors
- Install all Python dependencies
- Ensure camera/image permissions
- Check MediaPipe compatibility
For questions or issues, please open an issue on the GitHub repository.
Current Version: 1.0.0
DeskUp - Smart Desk Management for Modern Offices