AIO Client Portal
Contents
1. Quick Start (5 Minutes)
Install the Plugin
Log into your WordPress admin. Go to Plugins > Add New > Upload Plugin. Upload aio-client-portal.zip, click Install Now, then Activate.
Find the Dashboard
After activation, look for your company name (or “Client Portal” on first install) in the left sidebar of your WordPress admin. It has a distinctive egg icon and sits between Comments and Appearance.
Click it. The plugin takes over the full screen with its own dashboard – sidebar, navigation, settings, and all.
Configure Your Branding
Inside the plugin dashboard, go to Settings (gear icon in the sidebar). The Branding tab is the first tab. Fill in your company details:
| Field | What It Controls | Default |
|---|---|---|
| Company Name | Page titles, sidebar, login page, footer, emails | Client Portal |
| Contact Email | Email “From” header, Reply-To | Your WP admin email |
| Tagline | Login page subtitle, email footer | Your project hub |
| Persona Name | AI assistant’s name everywhere | Mr. O |
| Persona Greeting | Chat welcome message, questionnaire intro | Hey there! |
| Persona Avatar | Avatar in chat bubbles, questionnaire, status cards | Bundled default |
| Support Email | Error messages, portal contact link | Your WP admin email |
| Admin Name | Dashboard greeting, project assignment, AI prompts | Admin |
| Currency | All financial displays (invoices, payments) | CAD |
| Invoice Prefix | Document numbering (e.g. “INV-001”) | INV- |
Click Save Branding. Every customer-facing screen updates immediately.
Add a Client
Go to Clients in the sidebar, click New Client, fill in their details, and save.
Send Them a Portal Link
Open the client’s record and click Send Magic Link. They’ll receive a branded email with a one-click login link. No passwords needed.
2. Configuring Your Branding
Where Branding Appears
Your branding flows to every customer-facing surface:
- Login page – company name, tagline, persona greeting
- Admin dashboard – sidebar header, “Welcome back, {admin name}” greeting
- Client portal – header, footer, copyright line
- AI chat – persona name in header, avatar in bubbles, name in disclaimers
- Emails – From name, subject line, footer
- Invoices & documents – prefix, company name
- Error messages – support email
Persona Avatar
The default avatar is a bundled SVG. To use your own:
- Upload your image to WordPress Media Library
- Copy the URL
- Paste it into the Persona Avatar field in Settings > Branding
Recommended: square image, at least 100x100px. PNG or SVG work best.
Currency
The currency code controls display formatting:
CADdisplays as $1,234.56 CADUSDdisplays as $1,234.56 USDEURdisplays as 1,234.56 EUR
Fresh Install Defaults
A fresh install with no branding configured shows completely generic text. No reference to any specific company. Just “Client Portal”, “Mr. O”, and your WordPress admin email.
3. Adding Your First Client
Via the Dashboard
- Click Clients in the plugin sidebar
- Click New Client
- Fill in: name, email, business name, industry, status
- Click Save
Via REST API
POST /wp-json/aio-cp/v1/clients
Content-Type: application/json
{
"client_name": "Jane Smith",
"client_email": "jane@example.com",
"business_name": "Smith Co"
}
4. Sending a Portal Link
Via the Dashboard
Open a client’s record and click Send Magic Link. The client receives a branded email with a one-click portal login. Links expire after 90 days.
Via REST API
POST /wp-json/aio-cp/v1/clients/{id}/magic-link
Content-Type: application/json
{
"send_email": true
}
send_email flag must be true to actually deliver the email. Without it, the endpoint only generates and returns the token/URL without emailing the client.Email Requirements
Magic link emails require a working mail setup. We strongly recommend:
- WP Mail SMTP plugin (or equivalent) configured with a real SMTP provider
- Verify your sending domain has SPF/DKIM records to avoid spam folders
- Test with your own email first
5. What Your Client Sees
When a client clicks their magic link, they land on a branded portal with:
- Project status – progress bars, task completion, milestones
- AI assistant – chat with your configured persona (name, avatar, greeting)
- Documents – download SOWs, invoices, reports
- Guided questionnaire – onboarding questions with conversational AI flow
- Contact info – your support email
The portal runs on its own standalone page (bypasses your WordPress theme) at /portal/{token}. Clients never see your WordPress admin.
6. Connecting Services
These are optional and configured in Settings within the plugin dashboard.
AI Assistant (Settings > AI Assistant)
- Supports Anthropic (Claude), OpenAI (GPT), and Google (Gemini)
- Enter your API key for any provider
- The system prompt auto-generates from your branding config
- You can customize the system prompt to add personality, knowledge, or instructions
Payments (Settings > Payments)
- Enter your Stripe publishable key and secret key
- Clients can pay invoices directly from their portal
Document Generation (Settings > Webhooks)
- SOWs, invoices, reports, and blueprints are generated via n8n webhooks
- Enter your n8n webhook URLs to enable “Generate Document” buttons
- Without webhooks configured, document generation buttons won’t appear
7. What’s Configurable vs Fixed
Changes Per Deployment (via Settings)
- All 10 branding fields
- AI provider, API key, and system prompt
- Stripe keys
- Webhook URLs
- Rate limits (admin/portal AI usage caps)
Fixed Across All Deployments
These internal identifiers never change and are invisible to your clients:
- Plugin folder:
aio-client-portal/ - REST namespace:
aio-cp/v1 - Database tables:
wp_aio_* - PHP class prefixes:
AIO_CP_* - wp_option prefixes:
aio_cp_*
Not Yet Configurable (Coming Soon)
- Service packages and pricing (currently preset)
- Color theme / CSS variables
- Logo and favicon (currently text-based)
8. REST API Reference
All endpoints are under /wp-json/aio-cp/v1/. Admin endpoints require WordPress authentication (cookie + nonce, or application password).
Branding
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /settings/branding | Admin | Get all branding values |
| PUT | /settings/branding | Admin | Update branding (JSON body) |
Clients
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /clients | Admin | List all clients |
| POST | /clients | Admin | Create client |
| GET | /clients/{id} | Admin | Get client details |
| PUT | /clients/{id} | Admin | Update client |
| DELETE | /clients/{id} | Admin | Delete client |
| POST | /clients/{id}/magic-link | Admin | Generate magic link (send_email: true to email) |
Portal (Token-Authenticated)
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /portal/{token}/status | Token | Client project status |
| GET | /portal/{token}/questionnaire | Token | Get questionnaire |
| PUT | /portal/{token}/questionnaire | Token | Submit answers |
| POST | /portal/{token}/chat | Token | AI chat (SSE stream) |
Settings
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET/PUT | /settings | Admin | Webhook settings |
| GET/PUT | /ai/settings | Admin | AI configuration |
| GET/PUT | /settings/stripe | Admin | Stripe configuration |
| GET | /dashboard | Admin | Stats (clients, revenue, projects) |
9. Troubleshooting
I can’t find the plugin dashboard
Look for your company name (or “Client Portal” on fresh install) in the WordPress admin sidebar. It has an egg-shaped icon and sits around position 26 in the menu – typically between Comments and Appearance.
Plugin won’t activate
- PHP 7.4+ required (tested on 8.2)
- Check PHP error logs for fatal errors
- Ensure the zip extracted correctly:
wp-content/plugins/aio-client-portal/aio-client-portal.phpmust exist
Portal page shows 404
Go to Settings > Permalinks in WordPress admin and click Save Changes (without changing anything). This flushes rewrite rules. Also check for slug conflicts with existing pages named “portal” or “client-portal”.
REST endpoints return “No route found”
Same fix: flush permalinks. Then verify the plugin is active.
Branding changes not showing
- Verify your values saved: check Settings > Branding shows correct values
- Hard refresh the page (Ctrl+Shift+R)
- Clear any hosting-level or plugin caches
Magic link email not arriving
- Confirm the client has an email address set on their record
- Verify your mail setup – install WP Mail SMTP if you haven’t
- Check spam/junk folders
- If using the REST API, make sure you’re passing
"send_email": true
AI chat says “no API key”
Go to Settings > AI Assistant inside the plugin dashboard, enter your API key for at least one provider (Anthropic, OpenAI, or Gemini), and save.
WordPress MCP tools can’t PUT to branding endpoint
The WordPress MCP plugin (v0.2.5) doesn’t support HTTP PUT. Workarounds:
- Use the Settings > Branding tab in the dashboard (recommended)
- Set values via
update_option()in a PHP snippet - Use WP-CLI:
wp option update aio_cp_brand_company_name "YourBrand"
10. Developer Reference
This section is for developers modifying the plugin source code. Skip it if you’re just deploying.
Architecture
wp_options (aio_cp_brand_*)
|
v
AIO_CP_Config (PHP static class)
|
+--> PHP classes (emails, AI prompts, invoices, DB defaults)
|
+--> window.aioCPConfig (JSON injected into React shell)
|
v
React components (Layout, Login, Portal, Chat, Settings)
Key Classes
| Class | File | Purpose |
|---|---|---|
AIO_CP_Config | class-aio-cp-config.php | Branding config (NEW v1.7.0) |
AIO_CP_Auth | class-aio-cp-auth.php | Magic link generation, email |
AIO_CP_AI | class-aio-cp-ai.php | AI chat, system prompts |
AIO_CP_REST | class-aio-cp-rest.php | All REST API endpoints |
AIO_CP_Database | class-aio-cp-database.php | Schema creation, CRUD |
AIO_CP_Payments | class-aio-cp-payments.php | Stripe checkout sessions |
AIO_CP_Docs | class-aio-cp-docs.php | Document generation |
Stack
- Backend: PHP 7.4+ (WordPress plugin)
- Frontend: React 19 + Tailwind CSS 4 + Vite
- AI: Multi-provider (Anthropic, OpenAI, Gemini) with SSE streaming
- Auth: Magic link tokens (passwordless)
- Payments: Stripe via wp_remote_post (no SDK)
- Documents: n8n webhook pipeline
Setting Branding via wp_options
update_option('aio_cp_brand_company_name', 'YourBrand');
update_option('aio_cp_brand_contact_email', 'hello@yourbrand.com');
update_option('aio_cp_brand_tagline', 'Your project hub');
update_option('aio_cp_brand_persona_name', 'Buddy');
update_option('aio_cp_brand_persona_greeting', 'Hey there!');
update_option('aio_cp_brand_persona_avatar', 'https://yourbrand.com/avatar.png');
update_option('aio_cp_brand_support_email', 'support@yourbrand.com');
update_option('aio_cp_brand_admin_name', 'Your Name');
update_option('aio_cp_brand_currency', 'USD');
update_option('aio_cp_brand_invoice_prefix', 'INV-');
Build Notes
- React source is in
src/(not included in distribution zip) - Build requires Node.js 18+, npm, Python 3
- Never use PowerShell Compress-Archive – creates backslash paths that break on Linux
- Unparenthesized nested ternaries fatal in PHP 8.0+ – must wrap
