Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/derintolu/wp-site-dashboard/archive/refs/heads/main.zipA WordPress plugin that provides a configurable frontend portal dashboard with a backend settings interface built using WordPress Gutenberg components.
Features
- 🎯 Frontend Portal Dashboard: Custom dashboard accessible at a configurable route (e.g.,
/portal) - ⚙️ Backend Settings Page: Full-page Gutenberg-like interface for configuration
- 🔐 Role-based Access Control: Configure which user roles can access the portal
- 🎨 Login Page Customization: Custom logo, colors, tagline, and background for login pages
- 📄 Page Assignment: Assign specific WordPress pages to portal sections
- 📊 Dashboard Statistics: Display posts, pages, users, and comments counts
- 🚀 Quick Actions: Easy access to common WordPress tasks
- 📱 Responsive Design: Mobile-friendly interface
Tech Stack
- WordPress Plugin Framework
- React with
@wordpress/element - WordPress Components (
@wordpress/components) - Some @automattic/site-admin components for enhanced UI
- SCSS for styling
- WordPress REST API for data handling
- Webpack via
@wordpress/scriptsfor building
Installation
-
Clone this repository to your WordPress plugins directory:
git clone https://github.com/yourusername/wp-site-dashboard.git /path/to/wordpress/wp-content/plugins/wp-site-dashboard -
Navigate to the plugin directory:
cd /path/to/wordpress/wp-content/plugins/wp-site-dashboard -
Install dependencies:
yarn install -
Build the plugin:
yarn build -
Activate the plugin in your WordPress admin dashboard.
Development
Prerequisites
- Node.js (v14 or higher)
- Yarn
- WordPress development environment
Setup
- Clone the repository
- Install dependencies:
yarn install - Start development mode:
yarn start - Build for production:
yarn build
Available Scripts
yarn start- Start development mode with hot reloadingyarn build- Build for productionyarn packages-update- Update WordPress packages
File Structure
wp-site-dashboard/
├── src/
│ ├── components/
│ │ ├── Dashboard.jsx # Frontend portal dashboard
│ │ └── Settings.jsx # Backend settings interface
│ ├── index.js # Main entry point
│ └── style.scss # Global styles
├── build/ # Compiled assets
├── wp-site-dashboard.php # Main plugin file
├── package.json
├── webpack.config.js
└── README.md
Usage
Backend Configuration
- Go to Portal > Settings in your WordPress admin
- Configure:
- General Settings: Dashboard route and allowed user roles
- Login Page Appearance: Logo, colors, tagline, background
- Page Assignment: Assign WordPress pages to portal sections
Frontend Portal
- Access the portal at your configured route (default:
/portal) - View site statistics and quick actions
- Navigate through assigned pages
API Endpoints
The plugin registers the following REST API endpoints:
GET /wp-json/site-dashboard/v1/stats- Get site statisticsGET /wp-json/site-dashboard/v1/roles- Get available user rolesGET /wp-json/site-dashboard/v1/settings- Get plugin settingsPOST /wp-json/site-dashboard/v1/settings- Update plugin settings
Customization
Styling
The plugin uses SCSS for styling. Main style file: src/style.scss
Key CSS classes:
.portal-dashboard-app- Main dashboard container.portal-sidebar- Sidebar navigation.portal-main-content- Main content area.portal-stats-grid- Statistics cards grid
Adding New Features
- Create new React components in
src/components/ - Add new API endpoints in
wp-site-dashboard.php - Update styles in
src/style.scss - Build the plugin:
yarn build
Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes
- Build and test:
yarn build - Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
License
This project is licensed under the GPL v2 or later - see the plugin header for details.
Changelog
v1.0.0
- Initial release
- Frontend portal dashboard
- Backend settings interface
- Role-based access control
- Login page customization
- Statistics and quick actions
Support
For support, please create an issue on the GitHub repository.