First Steps
After installing or signing up for Sunschool, follow this guide to get familiar with the interface and start teaching your kids.Accessing the Application
Hosted Instance
Visit sunschool.xyz and log in with your credentials.Self-Hosted Instance
Navigate to your server’s URL:The default port is
5000. Change it via the PORT environment variable.First User Becomes Admin
This auto-promotion ensures you have full system access on self-hosted installations.How It Works
Fromserver/routes.ts:87-92:
Admin Capabilities
As an admin, you have access to:- User Management: Create/edit/delete all users (admins, parents, learners)
- Lesson Management: View/edit/delete all lessons
- System Settings: Configure feature flags and global settings
- Full API Access: All endpoints without permission restrictions
Most users will operate as Parents, not Admins. Create a new parent account for daily use and reserve the admin account for system administration.
Creating Parent Accounts
Option 1: Register as Parent
If you’re not the first user, you can register directly as a PARENT:- Navigate to
/auth - Select Sign Up
- Choose role: PARENT
- Fill in username, email, name, and password
- Accept the age disclaimer
- Submit
/dashboard).
Option 2: Admin Creates Parent
Admins can create parent accounts from the admin panel:- Navigate to
/admin/users - Click “Add User”
- Select role: PARENT
- Fill in details and submit
Adding Learners
Learners are child accounts linked to a parent.From the Parent Dashboard
Click Add Child
If you have no children, you’ll see an inline form. Otherwise, click the “Add Child” button.
What Gets Created
When you add a learner:-
User Account with role
LEARNER- Auto-generated username:
emma-123456 - No password (learners log in via parent selection)
- Linked to your parent account via
parentId
- Auto-generated username:
-
Learner Profile
- Grade level
- Empty knowledge graph (populated as lessons are completed)
- Subject preferences (optional)
-
Starter Rewards
- Extra Recess (10 points)
- Pick a Movie (25 points)
- Special Outing (50 points)
server/routes.ts:358-366:
Multiple Children
Parents can manage multiple learners from a single account. Each child:- Has their own progress tracking
- Earns points independently
- Has a unique knowledge graph
- Can have different grade levels and subjects
All your kids, one account — Each child gets their own adaptive path. Add learners as your family grows.
Navigating the Interface
Sunschool has two primary modes: PARENT and LEARNER.Parent Mode
The parent interface includes:Dashboard
Route:
/dashboardView all children with stats: lessons completed, average score, achievements. Click “Start Learning as [Child]” to switch to learner mode.Learners Management
Route:
/learnersView and edit learner profiles: grade levels, subjects, knowledge graphs. Delete learners if needed.Reports
Route:
/reportsDetailed analytics per child:- Progress over time
- Concept mastery heatmaps
- Recent quiz performance
- Export to CSV/JSON/PDF
Rewards Shop
Route:
/rewardsCreate custom rewards, set point costs, approve redemption requests. Manage the points economy.Database Sync
Route:
/database-syncConfigure external PostgreSQL sync for data backup and portability.Learner Mode
The learner interface is simplified and child-friendly:Learner Home
Route:
/learnerMain hub: active lesson card, subject selector, goals strip. Kids can request new lessons here.Active Lesson
Route:
/lessonRead the current lesson with rich markdown, SVG illustrations, and interactive elements. Tap “Take Quiz” when ready.Quiz
Route:
/quiz/:lessonIdAnswer multiple-choice questions. Earn points for correct answers. See instant feedback.Progress
Route:
/progressView lesson history, scores, achievements, and points balance. Celebrate milestones.Goals & Rewards
Route:
/goalsBrowse available rewards, check point costs, redeem rewards for parent approval.Lessons List
Route:
/lessonsBrowse past and available lessons. Replay quizzes to improve scores.Mode Switching
Only PARENT and ADMIN users can switch modes. Learner accounts are locked to learner mode for safety.
- Click the mode toggle button in the header
- Select which child to use in learner mode (if you have multiple)
- The interface changes to the selected mode
workflows.md:61:
Mode Toggle: Parents/admins switch between GROWN_UP and LEARNER mode via header button
Starting a Lesson
Step 1: Switch to Learner Mode
From the Parent Dashboard:- Find your child’s card
- Click “Start Learning as [Child Name]”
- You’re now in Learner Mode at
/learner
Step 2: Request a Lesson
On the Learner Home page:- (Optional) Choose a subject from the dropdown
- (Optional) Enter a topic (e.g., “fractions”, “planets”)
- Click “Create Lesson”
If no subject is selected, Sunschool picks one from the learner’s profile. If no topic is provided, the AI generates one based on grade level.
Step 3: Read the Lesson
The lesson page displays:- Markdown content with explanations and examples
- SVG illustrations generated via Google Gemini 3.1
- Interactive elements like expandable sections
workflows.md:26:
Active Lesson — View current lesson with rich content, SVG illustrations, diagrams
Step 4: Take the Quiz
When ready:- Tap “Take Quiz”
- Answer multiple-choice questions
- See your score and earned points
- Return to Learner Home to start another lesson
Understanding the Dashboard
Child Cards
Each child has a card showing:- Avatar: First letter of their name
- Grade Level: Badge (e.g., “Grade 5”)
- Lessons Completed: Total count
- Average Score: Percentage across all quizzes
- Achievements: Milestone badges earned
- “Start Learning” button to switch to their account
client/src/pages/dashboard-page.tsx:75-131:
Real-Time Data
Dashboard stats are fetched live from the API:Managing Learners
Editing Profiles
- Navigate to Learners Management (
/learners) - Click on a learner’s name
- Edit:
- Name
- Grade level
- Subjects (add/remove)
- Interests (used for lesson personalization)
- Save changes
Changing Subjects
Subjects determine which lessons are generated:- Go to
/change-learner-subjects/:id - Toggle subjects on/off:
- Math
- Science
- Reading
- History
- Art
- etc.
- Save
workflows.md:41:
Change Subjects — Add/remove subjects for a learner
Viewing Knowledge Graphs
Each learner has a knowledge graph showing:- Nodes: Concepts learned
- Edges: Relationships between concepts
- Colors: Mastery level (green = strong, yellow = moderate, red = weak)
Deleting Learners
To delete:- Navigate to Learners Management
- Select the learner
- Click “Delete”
- Confirm the action
Using the Rewards System
Creating Rewards
- Navigate to Rewards Shop (
/rewards) - Click “Add Reward”
- Fill in:
- Title: Name of the reward (e.g., “Ice Cream Trip”)
- Description: Details (e.g., “Visit the ice cream shop”)
- Token Cost: Points required (e.g.,
20) - Emoji: Visual icon (e.g.,
🍦) - Color: Hex code (e.g.,
#FF9800)
- Save
Approving Redemptions
When a learner redeems a reward:- Request appears in
/rewardsunder Pending Redemptions - Parent approves or rejects
- If approved:
- Points are deducted
- Redemption is logged
- Learner sees confirmation
- If rejected:
- Points are refunded
- Learner sees rejection message
workflows.md:43:
Rewards Management — Create/edit/delete rewards, approve/reject redemptions
Data Privacy and Export
Your Data Stays Yours
From README.md:33:Your data stays yours — Nothing gets sold. Nothing trains a model. Export or delete anytime.Sunschool does not:
- Sell user data
- Train AI models on your children’s lessons
- Share data with third parties
Exporting Data
Parents can export all learner data:- Navigate to Reports (
/reports) - Select a learner
- Click “Export”
- Choose format:
- CSV: For spreadsheets
- JSON: For programmatic access
- PDF: For printing
GET /api/export?learnerId=123&format=json
Database Sync
For redundancy, sync data to an external PostgreSQL database:- Navigate to Database Sync (
/database-sync) - Enter external database URL
- Choose sync mode:
- Manual: Push data on-demand
- Continuous: Auto-sync after every change
- Save configuration
server/sync-utils.ts for implementation.
Common Workflows
Daily Learning Routine
Weekly Reward Redemption
Monthly Progress Review
Next Steps
Quickstart
Complete walkthrough from signup to first lesson
Configuration
Customize AI providers, feature flags, and settings
API Reference
Integrate with the Sunschool API programmatically
Installation
Self-host Sunschool on your infrastructure
Troubleshooting
I can't switch to learner mode
I can't switch to learner mode
Only PARENT and ADMIN users can switch modes. If you registered as a learner, you’re locked to learner mode. Log out and create a parent account.
Child's stats aren't updating
Child's stats aren't updating
Stats are fetched live from the API. If they’re not updating:
- Refresh the page
- Check the browser console for API errors
- Verify the learner has completed lessons (stats are empty for new learners)
Lesson generation is failing
Lesson generation is failing
If lessons fail to generate:
- Check
OPENROUTER_API_KEYis valid - Verify the API account has sufficient credits
- Check server logs for errors:
npm run deploy - Set
USE_AI=0to test without AI (uses placeholder content)
Points aren't being awarded
Points aren't being awarded
Points are awarded based on quiz performance. Ensure:
- The quiz was completed (not abandoned mid-way)
- The learner answered at least one question correctly
- Check the points ledger in Reports > Points History
Rewards not showing up
Rewards not showing up
Rewards must be created by a parent before they appear in the learner’s Goals page:
- Navigate to Rewards Shop (
/rewards) - Create at least one reward
- Refresh the learner’s Goals page