Knowledge Base
Knowledge Base
The in-app knowledge base lets your team publish, organise, and browse help articles directly inside the dashboard. Admins author and manage content; all authenticated users can read and search it.
Accessing the Knowledge Base
Navigate to Dashboard → Knowledge Base using the sidebar entry, or go directly to /dashboard/knowledge-base.
Browsing Articles
Category Sidebar
The left sidebar lists all available categories with the number of published articles in each:
| Icon | Category |
|---|---|
| 🚀 | Getting Started |
| 📊 | Dashboard |
| 📋 | Managing Offers |
| 🏠 | Tenancy Set Up |
| 🔄 | Tenancy Renewals |
| 📖 | General |
| 💡 | Helpful Tips |
| ❓ | FAQs |
Click All Articles to remove the category filter and see every published article.
Search
Use the search bar at the top of the listing to filter articles by keyword. Search results update automatically as you type (with a short debounce delay).
Sorting
Articles can be sorted using the sort control:
| Option | Behaviour |
|---|---|
| Newest | Most recently published first |
| Most Popular | Highest view count first |
| Title A-Z | Alphabetical by title |
| Relevance | Closest match to your search query |
Reading an Article
Click any article card to open the full article at /dashboard/knowledge-base/[slug].
Each article page includes:
- Breadcrumb navigation — Knowledge Base → Category → Article title
- Publication date and author name
- View count (incremented automatically on each visit)
- Tags displayed below the header
- Print button — opens the browser print dialog; UI chrome is hidden from the printed output
- Back to Knowledge Base link at the top and bottom of the page
Admin: Managing Articles
Requirement: You must have the Admin role to create, edit, or delete articles.
Go to /dashboard/knowledge-base/manage to access the article management interface.
Article Status Workflow
Articles follow a linear status flow:
Draft → Published → Archived
| Status | Visible to all users? |
|---|---|
| Draft | No — only visible in the admin list |
| Published | Yes |
| Archived | No — only visible in the admin list |
Creating an Article
- Click New Article on the manage page.
- Fill in the editor dialog:
- Title (required)
- Body — HTML content
- Category — select from the available categories
- Tags — comma-separated keywords
- Slug — auto-generated from the title; can be overridden
- Status — start as Draft, publish when ready
- Click Save to create the article.
Editing an Article
- Find the article in the admin list.
- Click Edit.
- Update any fields in the editor dialog.
- If you change the title, the slug is automatically regenerated (unless you have manually set a custom slug).
- Click Save to apply changes.
Deleting an Article
- Find the article in the admin list.
- Click Delete and confirm.
All create, edit, and delete actions are audit-logged and attributed to the acting admin user.
Data & Security
- All articles are scoped to your organisation — users in other organisations cannot see your content.
- Mutations (create, update, delete) are admin-only and enforced server-side via the tRPC router.
- Every mutation is recorded in the audit log.
API Reference (tRPC)
The knowledge base is backed by the knowledgeBase tRPC router. All endpoints require the user to be authenticated.
Public Endpoints
knowledgeBase.getCategories
Returns all categories with their published article counts.
// No input required
const categories = await trpc.knowledgeBase.getCategories.query();
// Returns: Array<{ id: string; label: string; articleCount: number }>
knowledgeBase.list
Paginated article listing with optional filters.
const result = await trpc.knowledgeBase.list.query({
category?: 'getting_started' | 'dashboard' | 'managing_offers' | 'tenancy_setup' | 'tenancy_renewals' | 'general' | 'helpful_tips' | 'faqs',
sortBy?: 'date' | 'popularity' | 'title' | 'relevance',
search?: string,
limit?: number,
});
// Returns: { items: Article[]; total: number }
knowledgeBase.getBySlug
Fetch a single published article by its URL slug. Auto-increments the view count.
const article = await trpc.knowledgeBase.getBySlug.query({ slug: 'my-article-slug' });
Admin Endpoints
All admin endpoints require the Admin role.
knowledgeBase.adminList
List all articles including drafts and archived.
knowledgeBase.adminGetById
Fetch any article by its ID for editing.
const article = await trpc.knowledgeBase.adminGetById.query({ id: 'article-id' });
knowledgeBase.create
Create a new article.
await trpc.knowledgeBase.create.mutate({
title: string;
body: string; // HTML
category: CategoryKey;
status: 'draft' | 'published' | 'archived';
tags?: string[];
slug?: string; // Auto-generated from title if omitted
authorName?: string;
});
knowledgeBase.update
Edit an existing article. Slug is auto-regenerated from title changes unless explicitly provided.
await trpc.knowledgeBase.update.mutate({
id: string;
// same fields as create, all optional
});
knowledgeBase.delete
Delete an article by ID.
await trpc.knowledgeBase.delete.mutate({ id: 'article-id' });