Files
pic/webui
roof 673fe04164 feat(service-ports): remove hardcoded ports from docker-compose, make all service ports configurable
All host port bindings in docker-compose.yml now use \${VAR:-default} substitution,
driven by the .env file generated by ip_utils.write_env_file(). Changing a port in
Settings triggers a per-container pending-restart banner so only the affected container
is restarted on Apply.

- ip_utils: add PORT_DEFAULTS, PORT_ENV_VAR_NAMES, PORT_TO_CONTAINERS; extend
  write_env_file() to accept optional ports dict and write all port env vars
- docker-compose: convert all hardcoded port bindings to \${VAR:-default} form
- app.py: add _collect_service_ports helper; detect port changes in update_config,
  write updated .env and call _set_pending_restart with specific container list;
  update _set_pending_restart to merge/accumulate pending state with containers list;
  update apply_pending_config to use --no-deps <service> for targeted restarts
- config_manager: add submission_port, webmail_port to email schema; add manager_port
  to files schema
- Settings.jsx: make all email/files ports editable, add submission_port, webmail_port,
  manager_port fields; update stale identity note
- tests: 8 new tests for PORT_DEFAULTS, PORT_ENV_VAR_NAMES, and port override in write_env_file

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 11:51:10 -04:00
..
2025-09-12 23:04:52 +03:00
2025-09-12 23:04:52 +03:00
2025-09-13 15:49:32 +03:00
2025-09-12 23:04:52 +03:00
2025-09-13 18:56:00 +03:00
2025-09-13 12:08:28 -05:00
2025-09-12 23:04:52 +03:00
2025-09-13 14:23:31 +03:00
2025-09-12 23:04:52 +03:00
2025-09-12 23:04:52 +03:00

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

  1. Install dependencies:

    bun install
    
  2. Start the development server:

    npm run dev
    
  3. Open your browser to http://localhost:5173

Development Features

  • Hot Reload: Changes reflect immediately
  • API Proxy: Requests to /api/* are proxied to http://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: .card for content containers
  • Buttons: .btn, .btn-primary, .btn-secondary, etc.
  • Inputs: .input for form fields
  • Status Indicators: .status-indicator, .status-online, etc.

Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

Contributing

  1. Follow the existing code style
  2. Use TypeScript for new components
  3. Add tests for new features
  4. Update documentation as needed

License

Part of the Personal Internet Cell project.