How emiroshhh/mindpulse-by-northlight works
MindPulse is a guest-first AI study and self-growth workspace. Students use the dashboard or focused tools to describe a task, receive a safe AI response or structured plan, then save useful results locally as guests or to an account. Recovery Mode is a separate guided workflow with validated AI planning and a deterministic fallback. The README documents the six tools, Agent, feedback, account features, and localized public pages. Source excerpts substantiate chat, recovery, feedback, insights, safety, and event handling; other documented connections are shown as unverified where implementation was not sampled.
Main entry points: recovery/route.ts Recovery endpoint · chat/route.ts Chat endpoint · auth.ts Session and account services · events.ts Aggregate event store
Components 28
Web experience
- Workspace dashboard
apps/web/components/dashboard-app.tsx - Six AI tools
apps/web/app - Recovery interface
apps/web/components/recovery/recovery-flow.tsx - Chat panel
apps/web/components/mindpulse/chat-panel.tsx - Account forms
apps/web/components/auth-form.tsx - Localized public pages
apps/web/components/mindpulse/localized-public-page.tsx
Product workflows
- Chat endpoint
apps/web/app/api/chat/route.ts - Recovery endpoint
apps/web/app/api/recovery/route.ts - Agent endpoint
apps/web/app/api/agent/route.ts - Account endpoints
apps/web/app/api/auth/signup/route.ts - Feedback endpoint
apps/web/app/api/feedback/route.ts - Insights endpoint
apps/web/app/api/insights/route.ts - Beta events endpoint
apps/web/app/api/events/route.ts
Shared domain logic
- Safety screening
packages/shared/src/safety/index.ts - Recovery planning
packages/shared/src/recovery.ts - Exercises and tools
packages/shared/src/exercises.ts
Safety and persistence
- AI provider layer
apps/web/lib/server/ai-provider.ts - Session and account services
apps/web/lib/server/auth.ts - Usage and capacity
apps/web/lib/server/usage.ts - Aggregate event store
apps/web/lib/server/events.ts - Guest local state
apps/web/lib/mindpulse/local-store.ts
Mobile experience
- Mobile chat
apps/mobile/app/(tabs)/chat.tsx - Mobile local state
apps/mobile/lib/state.tsx - Mood check-in
apps/mobile/app/(tabs)/index.tsx
Other components
- Student
- Cloudflare D1
- Gemini AI
- DeepSeek AI
Connections 34
- Student → Workspace dashboard: opens workspace
- Student → Six AI tools: selects a tool
- Student → Recovery interface: starts recovery
- Workspace dashboard → Chat panel: offers chat
- Chat panel → Chat endpoint: submits message
- Six AI tools → Chat endpoint: sends tool request
- Recovery interface → Recovery endpoint: submits missed work
- Account forms → Account endpoints: submits credentials
- Chat endpoint → Safety screening: screens input and output
apps/web/app/api/chat/route.ts - Chat endpoint → Usage and capacity: reserves quota
apps/web/app/api/chat/route.ts - Chat endpoint → AI provider layer: requests reply
apps/web/app/api/chat/route.ts - Chat endpoint → Session and account services: resolves user and database
apps/web/app/api/chat/route.ts - Chat endpoint → Aggregate event store: records outcome
apps/web/app/api/chat/route.ts - Recovery endpoint → Safety screening: screens request and reply
apps/web/app/api/recovery/route.ts - Recovery endpoint → Recovery planning: validates or falls back
apps/web/app/api/recovery/route.ts - Recovery endpoint → AI provider layer: requests plan
apps/web/app/api/recovery/route.ts - Recovery endpoint → Usage and capacity: reserves or refunds quota
apps/web/app/api/recovery/route.ts - Recovery endpoint → Session and account services: resolves user and saves plan
apps/web/app/api/recovery/route.ts - Recovery endpoint → Aggregate event store: records outcome
apps/web/app/api/recovery/route.ts - Feedback endpoint → Safety screening: screens suggestion
apps/web/app/api/feedback/route.ts - Feedback endpoint → Session and account services: writes submission
apps/web/app/api/feedback/route.ts - Feedback endpoint → Aggregate event store: records feedback
apps/web/app/api/feedback/route.ts - Insights endpoint → Session and account services: reads account aggregates
apps/web/app/api/insights/route.ts - Beta events endpoint → Aggregate event store: records allowlisted event
apps/web/app/api/events/route.ts - Account endpoints → Session and account services: creates account session
- Session and account services → Cloudflare D1: reads and writes
- Aggregate event store → Cloudflare D1: increments daily counters
apps/web/lib/server/events.ts - AI provider layer → Gemini AI: uses by default
- AI provider layer → DeepSeek AI: supports optionally
- Workspace dashboard → Guest local state: saves guest progress
- Student → Mood check-in: records mood
apps/mobile/app/(tabs)/index.tsx - Mood check-in → Mobile local state: adds mood
apps/mobile/app/(tabs)/index.tsx - Mobile chat → Mobile local state: uses local state
apps/mobile/app/(tabs)/chat.tsx - Mobile chat → Exercises and tools: uses shared package
apps/mobile/app/(tabs)/chat.tsx