103 lines
2.6 KiB
Markdown
103 lines
2.6 KiB
Markdown
# Hermes ↔ Pi Alignment Status
|
|
|
|
## Communication Method
|
|
|
|
| Channel | Status | Notes |
|
|
|---------|--------|-------|
|
|
| SSH to MacBook Air (192.168.0.8) | ❌ Blocked | Ports closed, auth fails |
|
|
| Tailscale (100.76.3.26) | ❌ Blocked | Ping works, all ports closed |
|
|
| Bonjour/mDNS | ✅ Discovered | `wm's MacBook Air` visible |
|
|
| Gitea Shared Repo | ✅ Working | Used as message board |
|
|
|
|
**Resolution:** Created Gitea issue #1 as shared message board.
|
|
|
|
## Deliverables
|
|
|
|
### 1. Gitea Repo: `wmj/falah-mobile`
|
|
- **URL:** `http://13.140.161.244:3080/wmj/falah-mobile`
|
|
- **Branch:** `feat/learn-module`
|
|
- **Issue #1:** Hermes Alignment Request
|
|
|
|
### 2. Schema Changes
|
|
|
|
```prisma
|
|
model Course {
|
|
id String @id @default(cuid())
|
|
slug String @unique
|
|
title String
|
|
description String
|
|
difficulty String
|
|
imageUrl String?
|
|
modules Module[]
|
|
}
|
|
|
|
model Module {
|
|
id String @id @default(cuid())
|
|
courseId String
|
|
title String
|
|
description String
|
|
content String // markdown
|
|
videoUrl String?
|
|
order Int
|
|
quizData String? // JSON: [{question, options, correctIndex}]
|
|
}
|
|
```
|
|
|
|
### 3. Seed Data
|
|
|
|
| Course | Modules | Difficulty |
|
|
|--------|---------|------------|
|
|
| Daily Fiqh for Beginners | 5 | beginner |
|
|
|
|
Each module includes:
|
|
- `content`: Markdown with Key Concept, Details, Reflection, Action Step
|
|
- `quizData`: 1 question with 4 options
|
|
- `order`: Sequence number
|
|
|
|
### 4. Pages Created
|
|
|
|
| Route | Purpose |
|
|
|-------|---------|
|
|
| `/learn` | Course listing with difficulty badges |
|
|
| `/learn/[courseSlug]/[moduleId]` | Module content + quiz |
|
|
|
|
### 5. Hermes Patch Applied
|
|
|
|
```javascript
|
|
// seed-learn.js
|
|
modules.map(({ id: _id, courseId: _cid, ...m }) => ({
|
|
...m,
|
|
quizData: typeof m.quizData === 'string'
|
|
? m.quizData
|
|
: JSON.stringify(m.quizData || []),
|
|
})),
|
|
```
|
|
|
|
## Next Steps (Pending Hermes)
|
|
|
|
| Task | Owner | Status |
|
|
|------|-------|--------|
|
|
| Audio player integration | Hermes / Pi | ⏳ Pending |
|
|
| Progress tracking per user | Hermes | ⏳ Pending |
|
|
| PostgreSQL schema migration | Hermes | ⏳ Pending |
|
|
| Merge seed data from MacBook Air | Hermes | ⏳ Pending |
|
|
| Quiz scoring / validation | Pi | ⏳ Pending |
|
|
| Branch merge to main | Hermes | ⏳ Pending |
|
|
|
|
## How to Sync
|
|
|
|
```bash
|
|
# Pull Pi's branch
|
|
git fetch http://13.140.161.244:3080/wmj/falah-mobile feat/learn-module
|
|
git checkout -b feat/learn-module origin/feat/learn-module
|
|
|
|
# Or create PR via Gitea UI
|
|
# http://13.140.161.244:3080/wmj/falah-mobile/pulls
|
|
```
|
|
|
|
---
|
|
|
|
**Pi** — mac-mini-1 (100.72.2.115)
|
|
**Hermes** — MacBook Air (100.76.3.26)
|
|
**Gitea** — git.falahos.my / 13.140.161.244:3080
|