Add in-app wiki help system with accounts and members articles

Markdown-based help pages rendered in the admin UI. Sidebar category
navigation with search. Articles: Getting Started, Accounts Overview,
Members Overview, Payment Methods, Tax Exemptions. Written for
non-technical store staff.
This commit is contained in:
Ryan Moon
2026-03-28 13:05:52 -05:00
parent ce560cc568
commit c7e2c141ec
5 changed files with 381 additions and 324 deletions

View File

@@ -0,0 +1,203 @@
export interface WikiPage {
slug: string
title: string
category: string
content: string
}
export interface WikiCategory {
name: string
pages: WikiPage[]
}
const pages: WikiPage[] = [
{
slug: 'getting-started',
title: 'Getting Started',
category: 'General',
content: `
# Getting Started with Forte
Welcome to Forte — your music store management platform.
## Signing In
1. Open Forte in your browser
2. Enter your email and password
3. Click **Sign in**
If you don't have an account, ask your store manager to create one for you.
## Navigation
Use the sidebar on the left to navigate between sections:
- **Accounts** — manage customer accounts and their members
- **Members** — find and manage individual people across all accounts
- **Help** — you're here!
## Need Help?
If you can't find what you're looking for, contact your store manager or system administrator.
`.trim(),
},
{
slug: 'accounts-overview',
title: 'Accounts Overview',
category: 'Accounts',
content: `
# Accounts
An **account** is a billing entity — it could be a family, a business, a school, or an individual person. All billing, invoices, and payments are tied to an account.
## Creating an Account
1. Go to **Accounts** in the sidebar
2. Click **New Account** in the top right
3. Fill in the account name (e.g. "Smith Family" or "Lincoln Elementary")
4. Optionally add email, phone, and address
5. Add the **primary contact** — this is the main person on the account
6. Click **Create Account**
**Tip:** If you leave the account name blank and fill in the primary contact, the account name will be automatically set to the person's name.
## Account Details
Click any account in the list to see its details. The detail page has tabs:
- **Overview** — edit account name, contact info, billing mode
- **Members** — people on the account (family members, students, etc.)
- **Payment Methods** — cards on file
- **Tax Exemptions** — tax-exempt certificates
- **Processor Links** — payment processor connections
## Searching
Use the search bar to find accounts by name, email, phone, or account number. You can also find accounts by searching for a member's name.
## Account Numbers
Every account gets a unique 6-digit number automatically. This number appears in the account list and can be used for quick lookup.
`.trim(),
},
{
slug: 'members-overview',
title: 'Members Overview',
category: 'Accounts',
content: `
# Members
A **member** is an individual person associated with an account. This could be a parent, a child, a student, a band director — anyone who takes lessons, rents instruments, or needs to be tracked.
## Adding a Member
1. Go to an account's **Members** tab
2. Click **Add Member**
3. Enter first and last name (required)
4. Optionally add email, phone, date of birth
5. Click **Add Member**
**Tip:** If you don't provide email, phone, or address, the member will automatically inherit these from the account.
## Minor Flag
If a member is under 18, they're flagged as a **Minor**. This happens automatically if you enter a date of birth. If the family prefers not to share a birthday, you can check the "This person is a minor" box instead.
## Member Numbers
Like accounts, every member gets a unique 6-digit number for quick reference.
## Finding Members
Use the **Members** page in the sidebar to search across all members in all accounts. Click a member to go to their account.
## Moving a Member
If a member needs to be moved to a different account (e.g. a student aging out and getting their own account), ask your administrator — members can be reassigned between accounts.
`.trim(),
},
{
slug: 'payment-methods',
title: 'Payment Methods',
category: 'Accounts',
content: `
# Payment Methods
Payment methods are cards on file for an account. These are used for recurring billing (rentals, lessons) and in-store purchases.
## Adding a Payment Method
1. Go to an account's **Payment Methods** tab
2. Click **Add Method**
3. Select the processor (Stripe or Global Payments)
4. Enter the payment method ID from the processor
5. Optionally enter card brand, last four digits, and expiration
6. Click **Add Payment Method**
**Note:** Card details are stored securely with the payment processor — Forte only keeps a reference and display info (last 4 digits, brand).
## Default Payment Method
One payment method can be marked as the **default**. Click the star icon next to a method to make it the default. The previous default is automatically unset.
## Needs Update Flag
If a payment method was migrated from an old system, it may show a "Needs Update" badge. This means the customer needs to re-enter their card information.
`.trim(),
},
{
slug: 'tax-exemptions',
title: 'Tax Exemptions',
category: 'Accounts',
content: `
# Tax Exemptions
Schools, churches, and resellers may be exempt from sales tax. Forte tracks tax exemption certificates per account.
## Adding a Tax Exemption
1. Go to an account's **Tax Exemptions** tab
2. Click **Add Exemption**
3. Enter the certificate number (required)
4. Optionally add certificate type (e.g. "resale"), issuing state, and expiration date
5. Click **Add Tax Exemption**
The exemption starts in **Pending** status.
## Approving an Exemption
A manager must verify the certificate and approve it:
1. Click the **check mark** icon next to a pending exemption
2. The status changes to **Approved**
## Revoking an Exemption
If a certificate expires or is no longer valid:
1. Click the **X** icon next to an approved exemption
2. Enter a reason for revoking
3. The status changes back to **None**
All approvals and revocations are logged with who did it and when.
`.trim(),
},
]
export function getWikiPages(): WikiPage[] {
return pages
}
export function getWikiPage(slug: string): WikiPage | undefined {
return pages.find((p) => p.slug === slug)
}
export function getWikiCategories(): WikiCategory[] {
const categoryMap = new Map<string, WikiPage[]>()
for (const page of pages) {
const existing = categoryMap.get(page.category) ?? []
existing.push(page)
categoryMap.set(page.category, existing)
}
return Array.from(categoryMap.entries()).map(([name, pages]) => ({ name, pages }))
}