ApexOS β€” Complete System Architecture

Personal AI Operating System for @induwarauthsara Β· Running on Azure B2ms Β· Managed by Hexa (Hermes v0.14)

10
Cronjobs Active
59
Hermes Skills
10
Notion Databases
18
Cronjobs Planned
6
Phases
4
Weeks

What's Working

n8n Container β€” Up & Running healthz β€” {"status":"ok"} 10/10 Notion Databases 10 Hermes Cronjobs Active Google Calendar Sync Gmail Connected GitHub Backup (daily) SSL: apexos.induwara.dev πŸ”’

Needs Attention

n8n Workflows β€” 9 inactive (0 nodes) AI Chatbot β€” 504 HTML error Google Tasks API β€” missing OAuth scope Crypto DB β€” missing PnL formula n8n β€” Chatbot Health Check v2 still present Certs DB β€” zero entries Playwright β€” installed only in venv

πŸ”‘ Architecture Decision: Sunset n8n for Execution

All 9 n8n workflows have 0 nodes β€” they're empty shells. Hermes cronjobs with LLM skills were tested and work reliably (email-triage, crypto-alert, calendar-sync all ran successfully).
Decision: Move all automation to Hermes cronjobs. n8n stays only as a WhatsApp webhook receiver.

πŸ”„ Problem β†’ Solution Map

All 17 of Induwara's needs mapped to ApexOS phases

πŸŽ“ Study ManagementDeadlines don't auto-surface. No learning tracker.Phase 1A
πŸ›  Personal ProjectsProjects DB exists. No progress tracking, no learning pipeline.Phase 1B
πŸ’° Solo Startup + ERPNo payment reminders. ERP/CRM DB empty. No customer pipeline.Phase 1C
πŸ€– Portfolio ChatbotDetection works. No auto-fix. Backend currently DOWN.Phase 2A
πŸ›‘ CTF & HackathonsNo auto-template, no upcoming event alerts. Writeups stagnate.Phase 2B
πŸ” Cyber SecurityAd-hoc learning. No structured curriculum. No spaced repetition.Phase 2C
πŸ“§ Email TriageLLM classification unreliable (OpenRouter credits). No fallback.Phase 2D
πŸ“ˆ Crypto & TradingPrices tracked but no execution, no paper trading, no backtests.Phase 3A
πŸ‘₯ Community EventsManual event prep. No slide generator, no RSVP tracking.Phase 3B
πŸ“… CalendarSync works but doesn't classify events. Google Tasks API broken.Phase 3C
⏱ Time ManagementReactive. No daily time-blocking. No "what now?" guidance.Phase 3D
πŸ”¬ Tech ResearchOnly HN. No arXiv, no release notes, no YouTube summaries.Phase 4A
πŸŽ₯ Vlog PipelineBacklog grows. No monthly batch enforcement. No auto-catalog.Phase 4B
✍ Blog WritingData-rich but unwritten. No auto-draft from projects/events.Phase 4C
πŸŽ– CertificationsNo study plan, progress tracker, or exam date alerts.Phase 4D
🌐 PortfolioUptime unknown beyond chatbot. No SSL or deploy monitoring.Phase 5A
🏫 Campus LifeManual entry only. No lecture capture or assignment breakdown.Phase 5B

πŸ“‹ Execution Plan β€” 6 Phases, 4 Weeks

πŸ”΄ Phase 1: Study & Projects Week 1 β–Ό

1A β€” Study Engine

Never miss a deadline. Know what to study daily.

  • Populate Study DB with current semester modules
  • Polish study-briefing skill β€” sort by due date, flag <48h as CRITICAL
  • New cron: study-deadline-check β€” 7:30 AM daily
  • New skill: notion-study-capture β€” auto-log assignments from chat
  • Auto-save explanations to Notes/Learning DB when you ask me to explain topics

1B β€” Project Tracker

Track all projects. Auto-convert learning to notes.

  • Populate Projects DB (ERP, Portfolio, AutoCryptoBot, Web3, Community, ApexOS)
  • New skill: project-status β€” query active projects, show milestones
  • New cron: project-check-in β€” Mondays 10AM
  • New skill: learn-deep β€” structured curriculum, spaced repetition

1C β€” ERP Engine

  • Activate ERP/CRM DB β€” customer entries, payment tracking
  • Polish payment-check cron β€” formatted Telegram alerts
  • n8n webhook for WhatsApp reminders (keep 1 n8n WF)
  • New skill: erp-customer-add
🟠 Phase 2: Infrastructure & Security Week 2 β–Ό

2A β€” Chatbot Self-Healing

⚠ Chatbot currently DOWN β€” returns 504 HTML error

  • Enhance chatbot_wrapper.py β€” attempt SSH restart on failure
  • New script: chatbot_fixer.py β€” restart, check logs, verify
  • Escalate: Telegram alert + Notion P1 task if unfixable
  • Need from you: What runs the backend? (Docker? PM2? Serverless?)

2B β€” CTF Pipeline

  • New cron: ctf-event-scanner β€” Sundays 12PM, scrapes CTFtime
  • CTF prep reminder 48h before events
  • Polish ctf-log skill β€” auto-generate writeup templates
  • New skill: ctf-prep β€” past writeups, tools to install

2C β€” Cyber Security Learning Path

  • Structured curriculum: 5 levels (Linux basics β†’ Red Teaming)
  • New cron: security-news β€” daily 8AM, CVEs + Hacker News
  • Spaced repetition: 1-day, 3-day, 7-day, 30-day intervals
  • CTF skill mapping: track which domains you've mastered

2D β€” Email Triage v2

  • Rule-based fallback classifier (keyword + sender rules)
  • LLM only for ambiguous cases (use Google Gemini free API)
  • Urgent emails β†’ immediate Telegram alert
  • Daily digest at 9PM for skipped emails
🟑 Phase 3: Crypto + Community + Time Week 2-3 β–Ό

3A β€” AutoCryptoTrading Bot

  • Paper trading framework (virtual portfolio, Binance prices)
  • Trade signals: EMA crossover, RSI, volume spikes
  • Risk mgmt: max 5% per trade, 20% total exposure
  • New skill: crypto-trade β€” double confirm for real trades
  • CRITICAL: All logs labeled "PAPER TRADING β€” NOT REAL MONEY"

3B β€” Community Engine

  • New skill: community-workshop β€” 5-part outline, slide structure
  • Presentation assistant β€” search notes, suggest demos
  • Post-event: auto blog + vlog entry + attendee follow-up

3C β€” Calendar Intelligence

  • Fix Google Tasks OAuth scope (re-auth required)
  • Auto-classify events: CTF β†’ CTF DB, Workshop β†’ Community DB, Birthday β†’ skip
  • Conflict detection in morning briefing
  • Evening time-blocking suggestions

3D β€” Daily Command Center

  • Complete morning-briefing rewrite with structured sections
  • Interactive Telegram buttons: [βœ… Done] [⏰ Snooze] [πŸ“‹ Details]
  • Evening wrap-up at 9PM β€” completed vs rolled over
🟒 Phase 4: Knowledge & Content Week 3 β–Ό

4A β€” Research Engine

  • Beyond HN: arXiv (CS.AI, CS.CR), GitHub trending, Docker/K8s blogs, RSS
  • Smart filtering: stack-matching + actionable vs opinion
  • Weekly research briefing β€” Fridays 6PM, top 5 items
  • YouTube research: auto-summarize tutorials for MLOps, Web3, Go

4B β€” Vlog Pipeline

  • Monthly vlog batch day β€” 1st Sunday, auto-count unedited vlogs
  • Auto-generate YouTube descriptions + title suggestions
  • Urgency indicator: days since recorded

4C β€” Blog Pipeline

  • Auto-draft from projects (Problem β†’ Solution β†’ Code β†’ Lessons)
  • Auto-draft from events (Overview β†’ Moments β†’ Tech β†’ Takeaways)
  • Blogger API integration (future phase)

4D β€” Certification Tracker

  • Populate Certs DB: Binance, Anthropic, Azure (AZ-900, AZ-204), AWS
  • Study plan generator with topic breakdown
  • New cron: cert-progress-check β€” Sundays 8PM
πŸ”΅ Phase 5: Quality of Life Week 4 β–Ό

5A β€” Portfolio Uptime

  • Monitor portfolio repo for commits β†’ check deploy status
  • Auto-generate project descriptions when you build something new
  • Monthly SSL expiry check for induwara.dev

5B β€” Campus Life

  • Recurring lecture tasks from semester timetable
  • Assignment breakdown: Research β†’ Outline β†’ Draft β†’ Review β†’ Submit
  • Lecture note auto-capture from web research
🟣 Phase 6: System Health Week 4 β–Ό
  • Health dashboard β€” check nginx, n8n, Hermes, cron every 6h
  • Disk space monitor every 12h β€” alert >80%, auto-clean cache
  • Monthly Azure B2ms cost monitor
  • Weekly data hygiene β€” dedup Notion entries, orphaned relations, stale tasks
  • All health events β†’ Notion System Log page

πŸ“… Execution Timeline

Week 1 β€” Foundation
Study Engine Β· Morning Briefing Rewrite Β· Email Triage v2
Week 2 β€” Core Pipelines
Chatbot Self-Healing Β· CTF Pipeline Β· Paper Trading Β· Calendar Intelligence
Week 3 β€” Knowledge & Content
Research Engine Β· Vlog/Blog Pipelines Β· Security Learning Path Β· Project/ERP Trackers
Week 4 β€” Polish & Quality
Community Engine Β· Certs Β· Portfolio Β· Campus Β· System Health Β· Data Hygiene

⏰ Complete Cronjob Schedule (18 Jobs)

#NameScheduleTypeDelivers ToStatus
1β˜€οΈ morning-briefing07:00 dailyLLMTelegramβœ… Active
2πŸŽ“ study-deadline-check07:30 dailyLLMTelegramNew
3πŸ” security-news08:00 dailyLLMTelegram (critical)New
4πŸ’° payment-check08:00 MondayLLMTelegramβœ… Active
5πŸ›  project-check-in10:00 MondayLLMTelegramNew
6πŸ›‘ ctf-event-scanner12:00 SundayLLMTelegramNew
7πŸ“… calendar-syncEvery 2 hoursLLMLocalβœ… Active
8πŸ“§ email-triageEvery 2 hoursScript+LLMLocal (urgentβ†’TG)βœ… Active
9πŸ“ˆ crypto-alertEvery 4 hoursLLMTelegramβœ… Active
10πŸ€– chatbot-healthEvery 6 hoursScriptTG (if broken)βœ… Active
11🩺 system-healthEvery 6 hoursScriptTG (if down)New
12πŸ”¬ tech-digest18:00 FridayLLMTelegramβœ… Active
13πŸ“Š weekly-review09:00 SundayLLMTelegramβœ… Active
14πŸŽ– cert-progress-check20:00 SundayLLMTelegramNew
15πŸŽ₯ vlog-reminder10:00 1st SunLLMTelegramβœ… Active
16πŸŒ™ evening-wrap-up21:00 dailyLLMTelegramNew
17πŸ”„ hermes-git-backup00:00 dailyScriptTelegramβœ… Active
18πŸ’Ύ disk-space-checkEvery 12 hoursScriptTG (if >80%)New

🧩 Skill Inventory β€” 20 Skills

Existing 12

  • apexos-databases
  • morning-brief
  • study-briefing
  • weekly-review
  • crypto-status
  • ctf-log
  • content-pipeline
  • notion-task-capture
  • notion-quick-log
  • github-monitor
  • google-workspace-sync
  • email-scanner

New to Create 8

  • project-status
  • learn-deep
  • erp-customer-add
  • ctf-prep
  • community-workshop
  • crypto-trade
  • notion-study-capture
  • system-health-check

Scripts 7

  • chatbot_health_check.py βœ…
  • chatbot_wrapper.py βœ…
  • chatbot_fixer.py NEW
  • email_classifier.py NEW
  • crypto_paper_trader.py NEW
  • hermes_git_backup.sh βœ…
  • system_health.sh NEW

πŸŽ“ Trackademic Integration

Trackademic is Induwara's academic OS β€” a Next.js + Supabase web app for study management.

πŸ“¦ Trackademic Tech Stack

Frontend: Next.js 16 (App Router), React 18, Tailwind CSS, Radix UI, Recharts
Backend: Supabase (PostgreSQL), pgvector (embeddings), Row-Level Security
AI: Google Gemini API, OpenRouter, RAG pipeline
Integrations: Google Calendar OAuth, Stripe, PDF parsing
Key Features:
β€’ AI Study Coach with context-aware chat
β€’ Grade Predictor (what-if scenarios)
β€’ Credit-weighted Smart Focus Engine
β€’ Bidirectional Google Calendar sync
β€’ Pomodoro timer with analytics
β€’ Past paper matrix + progress tracking
β€’ Document RAG (upload PDFs β†’ AI Q&A)

πŸ—„ 15 Database Tables

profiles, semesters, subjects (with credits, weights, targets), sessions (lecture/practical log), assignments, exams, past_papers, study_sessions, documents + document_chunks (RAG), ai_insights, calendar_tokens, reschedule_log, chat_history, monthly_attendance view

πŸ”— ApexOS ↔ Trackademic Integration

Trackademic handles the data layer for academics. ApexOS provides the intelligence and notification layer. Here's how they work together:

1. Morning Briefing pulls from Trackademic

ApexOS morning briefing queries Trackademic's Supabase directly: assignments due today, attendance alerts, grade predictions. Merges with Notion data for a unified view.

2. Telegram β†’ Trackademic auto-logging

When Induwara tells Hexa "Attended DSA lecture today on Stacks", Hexa creates a session entry in Trackademic Supabase. Zero manual data entry.

3. Complementary AI

Trackademic AI Coach = structured academic content (questions from slides, grade predictions). ApexOS learn-deep = hobby/project learning (teach me Docker from ground level). Two AIs, two domains.

4. Trackademic β†’ ApexOS Sync Cron

New cron: trackademic-sync β€” every 2 hours: fetch assignment deadlines, attendance risks, exam dates from Trackademic Supabase β†’ inject into ApexOS context for morning briefing and alerts.

5. Shared Identity

Both use the same Google OAuth identity. Induwara logs into Trackademic via Google. ApexOS's Google token can query Trackademic Supabase.

πŸš€ How ApexOS Can Contribute to Trackademic

  1. Data Population: Auto-fill lecture logs, assignments, and exam entries from Telegram conversations
  2. Study Plan Generation: Use learn-deep skill to suggest structured topics for each subject
  3. Attendance Auto-Update: Detect "attended X lecture" from chat β†’ update Trackademic session
  4. Cross-System Alerts: Trackademic attendance risk β†’ ApexOS Telegram alert β†’ Induwara acts
  5. Research Pipeline: ApexOS tech-digest finds relevant content β†’ saves to Trackademic document vault
  6. Writeup Pipeline: After CTFs β†’ ApexOS generates writeup β†’ Trackademic stores as document
  7. Supabase Schema Extension: Add ApexOS-specific fields (synced_at, source="telegram") for traceability