Modern dashboard showcasing system stats, key features, API endpoints, and technology stack
Phantom Desktop UI is a cutting-edge application that bridges the gap between Large Language Models (LLMs)βsuch as OpenAI, Ollama, and othersβand your desktop environment. By enabling LLMs to interact with your desktop, this tool unlocks unparalleled productivity, automation, and collaboration opportunities.
- Universal LLM Integration: Seamlessly connects with any LLM (OpenAI, Ollama, etc.) to expose desktop capabilities.
- Secure Desktop Control: Empowers LLMs to interact with files, applications, and system resources while maintaining robust security protocols.
- Multi-LLM Collaboration: Supports simultaneous connections of multiple LLMs to a single desktop session for enhanced collaborative workflows.
- Real-Time Interaction: Facilitates seamless human-AI collaboration by allowing users to log into desktop sessions and work alongside LLMs.
- Modern and Responsive UI: Built with Angular 15 and Tailwind CSS to deliver a sleek, intuitive, and responsive user experience.
- Python FastAPI Backend: Ensures efficient communication between the UI and desktop environment, enabling smooth integration with LLMs.
- Angular 15 - Modern web framework
- Angular Material - UI component library
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type-safe JavaScript
- RxJS - Reactive programming
- Python 3.9+ - Programming language
- FastAPI - Modern, fast web framework
- Uvicorn - ASGI server
- Pydantic - Data validation
phantom-desktop-ui/
βββ src/ # Frontend source code
β βββ app/
β β βββ components/ # Angular components
β β β βββ dashboard/ # Dashboard component
β β β βββ file-manager/ # File management component
β β β βββ header/ # Navigation header
β β β βββ login/ # Authentication component
β β β βββ settings/ # Settings component
β β βββ services/ # Angular services
β β β βββ api.service.ts # API communication
β β β βββ auth.service.ts # Authentication
β β β βββ theme.service.ts # Theme management
β β βββ app.module.ts # Main Angular module
β β βββ app-routing.module.ts # Routing configuration
β βββ assets/ # Static assets
β βββ styles.css # Global styles
β βββ index.html # HTML entry point
βββ desktop_api.py # Python FastAPI backend
βββ test_api.py # Backend tests
βββ angular.json # Angular configuration
βββ package.json # Node dependencies
βββ requirements.txt # Python dependencies
βββ tsconfig.json # TypeScript configuration
βββ tailwind.config.js # Tailwind configuration
βββ Dockerfile # Frontend Docker image
βββ Dockerfile.backend # Backend Docker image
βββ docker-compose.yml # Docker Compose configuration
- Node.js 16+ and npm
- Python 3.9+
- Angular CLI (install with
npm install -g @angular/cli)
-
Clone the repository
git clone https://github.com/Artifact-Virtual/PHANTOMui.git cd PHANTOMui -
Install Frontend Dependencies
npm install
-
Install Backend Dependencies
pip install -r requirements.txt
-
Start the Backend Server
python3 desktop_api.py
The API will be available at
http://localhost:8000API Documentation:http://localhost:8000/docs -
Start the Frontend Development Server
ng serve
The application will be available at
http://localhost:4200
docker-compose upThis will start both frontend and backend services.
For testing purposes, use these default credentials:
- Username:
adminoruser - Password:
password
The backend provides a comprehensive REST API with the following endpoints:
GET /desktop/list- List all files on desktopGET /desktop/file?path={path}- Download a filePOST /desktop/upload- Upload a fileDELETE /desktop/delete?path={path}- Delete a fileGET /desktop/search?query={query}- Search for filesGET /desktop/preview?path={path}- Preview file contentsPOST /desktop/zip?path={path}- Create ZIP archivePOST /desktop/unzip?path={path}- Extract ZIP archivePOST /desktop/set-wallpaper?path={path}- Set desktop wallpaper
GET /admin/system-info- Get system informationGET /health- Health check endpoint
GET /llm/describe-path?path={path}- Describe a file/directory for LLM
POST /tools/add?a={number}&b={number}- Example addition tool
Run the Python backend tests:
python3 test_api.pyOr using pytest:
pytest test_api.py -vRun Angular tests:
ng test- Path Traversal Prevention: All file operations are restricted to the Desktop directory
- File Type Validation: Executable files (.exe, .sh, .bat, etc.) are blocked
- CORS Configuration: Controlled cross-origin resource sharing
- Input Sanitization: All inputs are validated and sanitized
- Secure Error Handling: Detailed errors logged, generic messages to clients
- Real-time system information
- Quick statistics (files, uploads, connections)
- Quick action buttons
- Responsive card-based layout
- File upload/download
- File deletion with confirmation
- Search functionality
- Preview support for text files
- Clean table-based interface
- Dark/Light theme toggle
- API configuration
- User preferences
- About information
- Mobile-friendly interface
- Adaptive layouts
- Touch-optimized controls
Edit desktop_api.py to configure:
BASE_DIR- Base directory for file operations (default: Desktop)ALLOWED_EXTENSIONS- Allowed file typesMAX_FILE_SIZE- Maximum upload size
Edit src/app/services/api.service.ts to configure:
baseUrl- Backend API URL (default: http://localhost:8000)
ng build --configuration productionThe build artifacts will be stored in the dist/ directory.
The backend can be run directly or containerized using the provided Dockerfile.
docker-compose up --build# Frontend
docker build -t phantom-ui .
# Backend
docker build -f Dockerfile.backend -t phantom-api .We welcome contributions from the community! Please see our Contributing Guidelines for detailed instructions.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Phantom Desktop UI is open-source software licensed under the MIT License.
- Angular Team for the excellent framework
- FastAPI for the modern Python web framework
- Tailwind CSS for the utility-first CSS framework
- Material Design for the component library
For issues, questions, or suggestions:
- Create an issue on GitHub
- Contact the development team
Phantom Desktop UI - Redefining desktop interaction by enabling seamless collaboration between humans and AI, paving the way for innovative workflows and enhanced productivity.
- Add authentication with JWT tokens
- Implement WebSocket for real-time updates
- Add support for multiple desktop sessions
- Enhance LLM integration capabilities
- Add file preview for images and PDFs
- Implement drag-and-drop file upload
- Add internationalization (i18n)
- Create mobile application
- Add plugin system for extensions
- OS: Windows 10/11, macOS 10.15+, Ubuntu 20.04+
- RAM: 4GB
- CPU: Dual-core processor
- Disk Space: 500MB
- OS: Windows 11, macOS 12+, Ubuntu 22.04+
- RAM: 8GB+
- CPU: Quad-core processor
- Disk Space: 1GB
