Reader Dashboard
Relevant source files
The following files were used as context for generating this wiki page:
The Reader Dashboard is a specialized interface designed for spiritual practitioners (Readers) on the SoulSeer platform. It serves as the primary hub for managing professional availability, tracking financial earnings, and interacting with clients through live sessions. The system integrates real-time state management for availability toggles, per-minute billing calculations, and session history management.
Within the SoulSeer architecture, the Reader Dashboard facilitates the 70/30 revenue split model where readers retain 70% of session earnings. It also provides the necessary hooks for Stripe Connect onboarding, ensuring that practitioners can receive payouts once they meet the minimum $15.00 balance threshold.
Sources: README.md:12-14, README.md:79-82, server/src/routes/admin.ts:400-405
Architecture and Core Functionalities
The Reader Dashboard operates within a React-based frontend and interacts with a Node.js/Express backend. It leverages the platform's monorepo structure, sharing types and validation logic between the client and server.
Key Components and State Management
The dashboard incorporates several UI patterns to manage complex reader workflows:
- Availability Toggle: A real-time switch that updates the
isOnlinestatus in the database, making the reader visible to clients on the Home Page and Readers Page. - Earnings Tracking: Displays the practitioner's balance in cents, calculated from completed readings and administrative adjustments.
- Rate Management: Interface for setting per-minute prices for Chat, Voice, and Video reading types.
The diagram above illustrates the primary data flows between the Reader Dashboard components and the backend database.
Sources: client/src/pages/dashboard/AdminDashboard.tsx:145-170, client/src/styles/pages.css:473-518, shared/src/validators.ts:45-50
Financial and Payout System
The financial module of the dashboard is built around a pre-pay balance system. While clients add funds, the Reader Dashboard tracks the accumulation of the practitioner's 70% share from every minute of active sessions.
Payout Lifecycle
Readers can request or trigger payouts once their accumulated balance exceeds 1500 cents ($15.00). This process is mediated by Stripe Connect.
| Feature | Description | Implementation Detail |
|---|---|---|
| Balance Display | Shows current earnings in USD. | Stored as balance (cents) in the User type. |
| Minimum Payout | Threshold for initiating transfers. | Set to 1500 cents ($15.00). |
| Stripe Connect | Onboarding for external transfers. | Uses stripeAccountId for destination transfers. |
| Revenue Split | Automated percentage calculation. | Readers keep 70% of totalCharged. |
Sources: client/src/types/index.ts:13-22, server/src/routes/admin.ts:390-410, README.md:79-82
This sequence ensures that reader balances are only zeroed out after a successful transfer is confirmed by the Stripe API.
Sources: server/src/routes/admin.ts:413-455
Profile and Rate Configuration
Readers utilize the dashboard to define their spiritual "storefront." This includes biographical information, specialties, and specific per-minute rates.
Reading Types and Rates
Rates are configured as non-negative integers representing cents per minute. The system supports three primary modes:
- Chat: Text-based interaction via Agora RTM.
- Voice: Audio-only calls via Agora RTC.
- Video: Face-to-face sessions via Agora RTC.
// Example Rate Configuration Schema
export const updatePricingSchema = z.object({
pricingChat: nonNegInt.max(100_000).optional(),
pricingVoice: nonNegInt.max(100_000).optional(),
pricingVideo: nonNegInt.max(100_000).optional(),
});
Sources: shared/src/validators.ts:40-48, client/src/pages/readers/ReaderProfilePage.tsx:135-180
Profile Elements
| Field | Type | Description |
|---|---|---|
bio | String | Practitioner's background and gifts (max 2000 chars). |
specialties | String | Comma-separated tags (e.g., Tarot, Astrology). |
profileImage | URL | Practitioner's photo, often hosted on Cloudinary. |
isOnline | Boolean | Determines if the "Start Reading" button is enabled. |
Sources: client/src/types/index.ts:47-60, shared/src/validators.ts:33-38, server/src/routes/admin.ts:210-225
Session Management
The dashboard provides a history of all readings, allowing readers to view transcripts for past chat sessions and monitor their performance metrics (average rating and review count).
Reading Data Model
The Reading object in the dashboard contains critical metadata for session reconciliation:
durationSeconds: Exact time connected to the client.readerEarned: The specific amount credited to the reader's balance.paymentStatus: Status of the transaction (pending, paid, or refunded).chatTranscript: JSON array containing the history of text messages.
Sources: client/src/types/index.ts:70-98, server/src/routes/admin.ts:468-485
Conclusion
The Reader Dashboard is the operational core for practitioners on SoulSeer. By combining real-time session controls, detailed financial ledgers, and profile customization, it enables readers to operate their spiritual practice as a professional, ethical business. Its integration with Stripe Connect and Agora ensures that the technical complexities of per-minute billing and streaming are abstracted, allowing the reader to focus on providing spiritual guidance.
Sources: README.md:7-14, client/src/pages/AboutPage.tsx:15-25