8d904b1b8f
Unit Tests / test (push) Successful in 13m7s
Three independent bugs surfaced during pic1 clean-install testing: 1. Tor _exit_status hardcoded configured=True regardless of whether Tor was actually installed. Status now flows through the same store-installed / container-running bridge used by every other optional service, so Tor only reports installed when the container is present and running. 2. check_port_open compared the port from wg0.conf against the kernel-reported listening port, causing false "port closed" results whenever the conf and the running container were momentarily out of sync. The function is now an honest liveness check: any wg0 interface that is up and has a "listening port:" line in `wg show` is considered open. The check-port API endpoint now also returns the actual kernel listening_port and a port_mismatch flag so the UI can inform the user when a container recreate is needed. (The recreate machinery already exists via the port-change pending-restart path; this fix makes the mismatch visible rather than silently lying about reachability.) 3. upload_backup only handled .zip archives; encrypted .age blobs were rejected with a generic error. The endpoint now calls backup_crypto.is_encrypted() to detect Age-encrypted blobs and stores them verbatim as <id>.tar.gz.age with mode 0600 so they can be uploaded and then restored with a passphrase. The plaintext zip path is unchanged. Tests added/updated: test_connectivity_manager.py (Tor status bridge), test_wireguard_manager.py + test_wireguard_endpoints.py (port-check liveness and mismatch flag), test_config_backup_restore_http.py (encrypted upload round-trip). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Personal Internet Cell - Web UI
A modern React-based web interface for managing your Personal Internet Cell.
Features
- Dashboard: Overview of cell status and services
- Peer Management: Add, remove, and configure WireGuard peers
- Network Services: DNS, DHCP, and NTP management
- WireGuard: VPN configuration and status
- Email Services: Postfix and Dovecot management
- Calendar Services: Radicale CalDAV/CardDAV management
- File Storage: WebDAV file storage management
- Routing: Advanced VPN gateway and routing configuration
- Logs: System logs and monitoring
- Settings: Cell configuration and security settings
Tech Stack
- React 19: Modern React with hooks
- Vite: Fast build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- Lucide React: Beautiful icons
- React Router: Client-side routing
- Axios: HTTP client for API communication
Development
Prerequisites
- Node.js 18+ and npm
- Personal Internet Cell backend running on port 3000
Setup
-
Install dependencies:
bun install -
Start the development server:
npm run dev -
Open your browser to
http://localhost:5173
Development Features
- Hot Reload: Changes reflect immediately
- API Proxy: Requests to
/api/*are proxied tohttp://localhost:3000 - TypeScript Support: Full TypeScript support available
- ESLint: Code linting and formatting
Building for Production
Build
npm run build
This creates a dist/ directory with optimized production files.
Preview
npm run preview
This serves the built files locally for testing.
API Integration
The Web UI communicates with the Personal Internet Cell backend API:
- Base URL:
http://localhost:3000(development) - Health Check:
/health - API Endpoints:
/api/*
Environment Variables
Create a .env file to customize the API URL:
VITE_API_URL=http://localhost:3000
Project Structure
src/
├── components/ # Reusable UI components
│ └── Sidebar.jsx # Navigation sidebar
├── pages/ # Page components
│ ├── Dashboard.jsx # Main dashboard
│ ├── Peers.jsx # Peer management
│ ├── NetworkServices.jsx
│ ├── WireGuard.jsx # VPN configuration
│ ├── Email.jsx # Email services
│ ├── Calendar.jsx # Calendar services
│ ├── Files.jsx # File storage
│ ├── Routing.jsx # Routing configuration
│ ├── Logs.jsx # System logs
│ └── Settings.jsx # Cell settings
├── services/ # API services
│ └── api.js # API client and endpoints
├── App.jsx # Main app component
├── main.jsx # App entry point
└── index.css # Global styles
Styling
The Web UI uses Tailwind CSS with custom components:
- Cards:
.cardfor content containers - Buttons:
.btn,.btn-primary,.btn-secondary, etc. - Inputs:
.inputfor form fields - Status Indicators:
.status-indicator,.status-online, etc.
Browser Support
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Contributing
- Follow the existing code style
- Use TypeScript for new components
- Add tests for new features
- Update documentation as needed
License
Part of the Personal Internet Cell project.