3.1 KiB
3.1 KiB
Sarthi Lab Desktop
AI learning desktop application for school computer labs.
Quick Start
1. Clone & Install
git clone https://github.com/Eduspheria/sarthi_lab.git
cd sarthi_lab
npm install
2. Run Locally
npm run dev
Electron app will open at http://localhost:5174. Exercises load correctly in dev mode.
Global Command Setup (Run from Anywhere)
Set up a global sarthi-lab command that works from any terminal directory.
macOS / Linux
Symlink Setup
# Make script executable
chmod +x launch.sh
# Create global symlink (requires sudo)
sudo ln -s "$(pwd)/launch.sh" /usr/local/bin/sarthi-lab
If /usr/local/bin isn't in PATH, add it:
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc
Windows
Add to PATH
-
Copy
launch.batto a directory already in PATH:C:\Windows\System32C:\Program Files\Git\usr\bin(if Git installed)
-
OR add repo to PATH:
- Open System Properties → Environment Variables
- Edit User variables → PATH
- Add
C:\path\to\sarthi_lab - Restart terminal
Usage
Basic Launch
sarthi-lab
Starts the Electron dev app (npm run dev).
Upgrade Command
sarthi-lab upgrade
Pulls latest git changes and updates npm dependencies.
Command Reference
sarthi-lab– Start Sarthi Lab (default)sarthi-lab upgrade– Pull latest changes and update dependenciessarthi-lab --helpor-h– Show helpsarthi-lab --versionor-v– Show version
Troubleshooting
| Issue | Solution |
|---|---|
sudo: command not found (mac/Linux) |
Use ~/bin: ln -s "$(pwd)/launch.sh" ~/bin/sarthi-lab |
| Permission denied (symlink) | Ensure /usr/local/bin exists and is writable |
| Windows PATH not working | Use full path: C:\path\to\sarthi_lab\launch.bat |
npm run dev fails |
Check Node.js ≥18, run npm install |
| Exercises not loading | Ensure you're using dev mode (npm run dev); packaged DMG may have issues |
Development
Scripts
npm run dev– Start dev server + Electronnpm run build– Build for productionnpm run build:mac– Build macOS DMGnpm run build:win– Build Windows installernpm run build:linux– Build Linux AppImage
Project Structure
sarthi_lab/
├── src/ # React frontend
├── electron/ # Electron main process
├── dist/ # Production build
└── dist-electron/ # Packaged apps
Backend Connection
Sarthi Lab connects to a Django backend (cloud or local):
- Default:
https://sarthi.eduspheria.com - Change via Settings screen in app
Notes
- Packaged App Limitation: Packaged DMG (
file://origin) may have loading issues. Usenpm run dev(this launcher) for school deployments. - Offline Features: Desktop TTS/STT via Piper/whisper binaries (macOS only in current build).
- Updates: Use
sarthi-lab upgradeto pull latest code.
Eduspheria · eduspheria.com · Contact: eduspheria@gmail.com