Skip to content

iRaySpace/wp-control-plane

Repository files navigation

🧭 WP Control Plane

A simple Streamlit-based control panel for managing isolated WordPress deployments (with database containers) on subdomains.
It allows users to log in, deploy, and monitor their WordPress services — perfect for multi-tenant setups or local WordPress sandboxing.

🚀 Features

  • 🔐 Login System — Authenticates users and stores a session token.
  • 🌐 Subdomain Deployment — Creates unique subdomains (e.g. example.localtest.me).
  • 🧩 Service Management — Starts WordPress and DB containers through the DeployService.
  • 📊 Dashboard View — Displays container statuses and quick access to logs.
  • 🪄 Responsive UI — Built with Streamlit

🧱 Project Structure


.
├── service/
│   ├── account_service.py     # Handles authentication and account APIs
│   └── deploy_service.py      # Handles deployment logic for WordPress services
├── session.py                 # Manages user session (save/load/clear)
├── app.py                     # Main Streamlit entrypoint (this file)
└── README.md


🧰 Requirements

  • Python 3.11+
  • Docker (for deployment services)
  • Streamlit
  • Poetry
  • Additional Python packages (install below)

📦 Installation

  1. Clone the repository

    git clone https://github.com/yourusername/wp-control-plane.git
    cd wp-control-plane
  2. Activate a virtual environment

    poetry install
    $(poetry env activate)
  3. Run the app

    streamlit run app.py

🧑‍💻 Usage

🔑 1. Login

Enter your email and password (currently has a dummy [email protected] | password). The system will authenticate using the AccountService and save your session token.

🌐 2. Create Subdomain

If you don’t have an existing deployment:

  • Enter your preferred subdomain (e.g. test)
  • Click Deploy
  • The system will trigger the DeployService to spin up WordPress and DB containers (e.g., test.localtest.me)

📊 3. Dashboard

After deployment, view:

  • WordPress & DB status (🟢 running / 🟡 paused / 🔴 stopped)
  • Live logs with View Logs buttons
  • Option to Logout

⚙️ Configuration Notes

  • Session Management: Handled through session.py (save/load/clear token to st.session_state).
  • Async Support: Streamlit supports async functions — this app uses asyncio for service calls.
  • Deployment Services: Replace or extend DeployService with your Docker logic or API-based provisioning.

🧩 Other Ideas

  • Add user registration
  • Manage multiple subdomains per user
  • Include container metrics (CPU, memory)
  • Replace localtest.me with a local DNS alternative
  • Integrate with AWS ECS, Kubernetes, or serverless infrastructure
  • Option to delete existing services

About

WordPress Control Plane using Streamlit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages