asarOS
Build Tracker & Status
Loading…
Auto-saved
πŸ“Š asarOS β€” Build Dashboard
Complete status tracker: Web App β†’ Mobile App β†’ Monetized SaaS
–
Tasks Done
calculating…
–
To Do
remaining items
–
Total Tasks
across all phases
4
Active Phase
Mobile Build
βœ…
Phase 1 β€” Complete
Backend Auth + Payments + Admin API
βœ…
Phase 2 β€” Complete
Frontend Auth UI + Trial System + Admin Dashboard
πŸ”₯
Phase 3 β€” In Progress
PRO Gating + Feature Flags + Drive Persistence
πŸ“±
Phase 4 β€” Not Started
Capacitor Mobile Build + App Store Publishing
🌍
Phase 5 β€” Not Started
Domain Migration + Production Launch
πŸ€”
Are We Ready for Mobile?
Not quite yet. Here's what must happen first before starting Capacitor:
βœ“
Feature flags bug fixed (Feature Flags page renders inside AppShell)
The admin feature-flags page currently imports AppShell and renders the main app inside admin. Fixed in today's delivery.
πŸ”΄ Blockerfixes/app/admin/feature-flags/page.tsx
βœ“
Google Drive persistence fixed across logout/login
Drive tokens must survive logout. Fixed: authStore.logout() no longer clears Drive tokens. Only deleteAccount wipes them.
πŸ”΄ Blockerfixes/store/authStore.ts + fixes/app/hooks/useDriveToken.ts
βœ“
PRO feature gating applied to mini-apps (ProGate component)
ProGate.tsx exists. Still need to wrap 15+ page.tsx files with it. See PRO Feature Gates section.
πŸ”΄ Required
βœ“
Feature flag bulk-update admin endpoint wired in worker
The /api/admin/flags/bulk PUT endpoint exists in featureFlags.ts but needs to be added to admin.ts routes.
🟑 Required
βœ“
Razorpay live keys set in production worker
Currently using test keys. Must switch to live keys before publishing.
πŸ”΄ Required
πŸ—„ Database & Migrations
Cloudflare D1 (SQLite) β€” asaros-db
πŸ“‹
Migrations
βœ“
0001_init.sql β€” users, oauth_accounts tables
βœ… DoneApplied
βœ“
0002_auth_payments.sql β€” password_hash, refresh_tokens, subscriptions
βœ… Done
βœ“
0003_password_reset.sql β€” password_reset_tokens
βœ… Done
βœ“
0004_admin.sql β€” admin_logs, payment_events, is_banned column
βœ… Done
βœ“
0005_feature_flags.sql β€” feature_flags table
βœ… Done
πŸ” Auth System (Worker)
Routes & Middleware
βœ“
Google OAuth β€” /api/auth/google + /callback
βœ… Done
βœ“
Email/password β€” /api/auth/register + /login
βœ… Done
βœ“
JWT refresh β€” /api/auth/refresh
βœ… Done
βœ“
Logout β€” /api/auth/logout (revokes refresh token)
βœ… Done
βœ“
Forgot/reset password β€” /api/auth/forgot-password + /reset-password
βœ… Done
βœ“
Delete account β€” DELETE /api/auth/account (App Store required)
βœ… Done
βœ“
requireAuth middleware (JWT verification)
βœ… Done
βœ“
Ban check middleware (blocks banned users at every API call)
βœ… Done
βœ“
Forgot password email sending (currently returns token in dev mode only)
Wire up Resend / SendGrid to send the actual reset email. Currently dev mode only returns debug_token.
🟑 TODOemailAuth.ts β€” find "TODO: Send email" comment
// In emailAuth.ts POST /forgot-password: // await sendEmail({ to: emailLower, // subject: 'Reset your asarOS password', // html: resetLink })
πŸ’³ Payments (Razorpay)
Payment Routes
βœ“
POST /api/payments/order β€” create Razorpay order
βœ… Done
βœ“
POST /api/payments/verify β€” verify signature + activate plan
βœ… Done
βœ“
GET /api/payments/status β€” check current plan
βœ… Done
βœ“
POST /api/payments/admin/override β€” manual plan grant/revoke
βœ… Done
βœ“
payment_events table logging (revenue tracking)
βœ… Done
βœ“
Switch from Razorpay test keys to LIVE keys
Currently using test keys in .dev.vars. Deploy live keys via wrangler secrets.
πŸ”΄ Required before launch
cd asaros-worker npx wrangler secret put RAZORPAY_KEY_ID # rzp_live_xxx npx wrangler secret put RAZORPAY_KEY_SECRET # live secret
βœ“
USD pricing support for international users
Add USD plan options to PLANS config in payments.ts and upgrade page.
πŸ”΄ Required for global launch
βœ“
Razorpay webhook endpoint for subscription renewal/failure
POST /api/payments/webhook β€” handles subscription.charged, payment.failed events from Razorpay servers.
🟑 Before recurring billing
βœ“
Post-payment welcome email
Send confirmation/receipt after successful payment. Wire up email provider (Resend recommended).
🟑 Nice to have
βš™οΈ Admin API
Admin Routes (X-Admin-Key protected)
βœ“
GET /api/admin/stats β€” KPI dashboard
βœ… Done
βœ“
GET/PUT /api/admin/users β€” user list, plan change, ban
βœ… Done
βœ“
GET /api/admin/subscriptions + revenue + logs
βœ… Done
βœ“
GET /api/flags β€” public feature flags endpoint
βœ… Done
βœ“
PUT /api/admin/flags/bulk β€” bulk feature flag update
The route is defined in featureFlags.ts but needs to be mounted in admin.ts or index.ts.
πŸ”΄ Required for Feature Flags UI
// In asaros-worker/src/routes/admin.ts, add: admin.put('/flags/:id', async (c) => { ... }); admin.put('/flags/bulk', async (c) => { ... }); // Already defined in featureFlags.ts β€” copy or import.
πŸ” Auth UI (Frontend)
Auth Components & Flow
βœ“
AuthModal.tsx β€” sign in / register / forgot password
βœ… Done
βœ“
AccountDropdown.tsx β€” topbar dropdown for signed-in users
βœ… Done
βœ“
app/auth/callback β€” Google OAuth callback handler
βœ… Done
βœ“
app/auth/reset β€” password reset page
βœ… Done
βœ“
authStore.ts β€” login/register/logout/deleteAccount + JWT refresh
βœ… Done
βœ“
App opens without login (local mode default β€” no friction)
βœ… Done
βœ“
Logout clears auth session only (Drive tokens persist)
βœ… Fixed today
βœ“
Delete account wipes everything (App Store requirement)
βœ… Done
βœ“
Microsoft login (placeholder β†’ real implementation)
Currently shows "Coming Soon" in AuthModal. Wire up Microsoft OAuth when ready.
πŸ”΅ Future
πŸ”” Trial System
7-Day Trial + Plan Logic
βœ“
trialStore.ts β€” firstSeenAt, isTrialActive(), daysRemaining()
βœ… Done
βœ“
TrialBanner.tsx β€” shows countdown in last 2 days + after expiry
βœ… Done
βœ“
Topbar plan badge β€” shows "Trial Β· Xd" or "Free" pill
βœ… Done
βœ“
featureFlagStore.canAccess() respects trial/free/pro hierarchy
βœ… Done
βœ“
Phase 2: Backend device fingerprint tracking (anti-abuse)
Currently trial is purely client-side (localStorage). Phase 2 will add device fingerprint + backend tracking to prevent resetting trial by clearing localStorage.
πŸ”΅ Phase 2
⚑ Upgrade & Payments (Frontend)
Upgrade Flow
βœ“
app/system/upgrade/page.tsx β€” plan cards + Razorpay checkout
βœ… Done
βœ“
Shows auth modal if not signed in before payment
βœ… Done
βœ“
Pro plan badge shown in topbar + AccountDropdown after payment
βœ… Done
βœ“
Single payment page β€” used by all CTAs (sidebar, banner, ProGate)
βœ… Done
βœ“
USD pricing option for international users
Add currency toggle (INR / USD) to upgrade page. Backend already supports different amounts.
πŸ”΄ Required for global
🚦 Admin Dashboard
Admin UI Pages (at /admin)
βœ“
Admin login gate (ADMIN_KEY entered in browser, validated against /api/admin/stats)
βœ… Done
βœ“
/admin β€” KPI dashboard (users, revenue, conversion)
βœ… Done
βœ“
/admin/users β€” user search, plan change, ban, delete
βœ… Done
βœ“
/admin/subscriptions, /revenue, /logs, /settings pages
βœ… Done
βœ“
/admin/feature-flags β€” FIXED (was rendering inside AppShell)
Fixed in today's delivery. The page was importing AppShell from the main app causing the whole app to render inside admin. Now uses only admin-style components.
βœ… Fixed todayfixes/app/admin/feature-flags/page.tsx
βœ“
Wire /api/admin/flags/bulk PUT endpoint in worker
Feature flags save button calls this endpoint but it's not yet mounted in the worker routes.
πŸ”΄ Required
// In asaros-worker/src/routes/admin.ts: // Add these routes (from featureFlags.ts): admin.put('/flags/bulk', async (c) => { // ... update multiple flags }); admin.put('/flags/:id', async (c) => { // ... update single flag });
☁️ Google Drive & Cloud Sync
Drive Token Persistence
βœ“
useDriveToken.ts β€” URL param stashing, token apply, restore from localStorage
βœ… Done
βœ“
Drive token survives logout β€” only clears on manual disconnect or account delete
βœ… Fixed today
βœ“
resetDriveTokenBridge() resets memory state only (not localStorage)
βœ… Fixed today
βœ“
disconnectDriveForUser() β€” manual disconnect, clears localStorage + mode
βœ… Done
βœ“
backup/page.tsx uses authStore userId (not old userStore)
βœ… Done
βœ“
Google Drive access_token refresh (token expires in ~1 hour)
Current tokens are short-lived. Need to store refresh_token and auto-refresh when access_token expires. The callback route already returns refresh_token β€” needs to be stored and used.
🟑 Required for production
βœ“
Dropbox + OneDrive token persistence (same pattern as GDrive)
πŸ”΅ Future
πŸ”’ PRO Feature Gates
Apply ProGate component to each page β€” 2 lines per file
How to gate any page (2 lines)
// 1. Add import at top of page.tsx: import ProGate from '@/components/layout/ProGate'; // 2. Wrap the return in AppShell: export default function FinancePage() { return ( <ProGate feature="Finance Tracker" flagId="app_finance"> <AppShell> ... </AppShell> </ProGate> ); }
Free β€” always accessible
βœ“
Dashboard β€” no gate needed
βœ… Openapp/dashboard/page.tsx
βœ“
Pomodoro Timer β€” no gate needed
βœ… Open
Trial β€” available during 7-day trial + Pro
βœ“
Habit Tracker β€” flagId: app_habits
🟑 TODOapp/personal/habits/page.tsx
βœ“
Mood Journal β€” flagId: app_journal
🟑 TODOapp/personal/journal/page.tsx
βœ“
My Diary β€” flagId: app_diary
🟑 TODOapp/personal/diary/page.tsx
βœ“
Smart Notes β€” flagId: app_notes
🟑 TODOapp/tools/notes/page.tsx
βœ“
Personal Growth β€” flagId: app_growth
🟑 TODOapp/personal/growth/page.tsx
βœ“
Daily Standup β€” flagId: app_standup
🟑 TODOapp/work/standup/page.tsx
βœ“
Study & Learning β€” flagId: app_study
🟑 TODOapp/work/study/page.tsx
βœ“
Time Budget β€” flagId: app_time_budget
🟑 TODOapp/tools/time-budget/page.tsx
βœ“
Archive β€” flagId: app_archive
🟑 TODOapp/system/archive/page.tsx
Pro β€” Pro subscribers only
βœ“
Finance Tracker β€” flagId: app_finance
πŸ”΄ TODOapp/personal/finance/page.tsx
βœ“
Password Manager β€” flagId: app_passwords
πŸ”΄ TODOapp/tools/passwords/page.tsx
βœ“
Health Monitor β€” flagId: app_health
πŸ”΄ TODOapp/personal/health/page.tsx
βœ“
Life Goals β€” flagId: app_life_goals
πŸ”΄ TODOapp/personal/goals/page.tsx
βœ“
Work Goals β€” flagId: app_work_goals
πŸ”΄ TODOapp/work/goals/page.tsx
βœ“
Life Kanban β€” flagId: app_life_kanban
πŸ”΄ TODOapp/personal/kanban/page.tsx
βœ“
Work Kanban β€” flagId: app_work_kanban
πŸ”΄ TODOapp/work/kanban/page.tsx
βœ“
Project Manager β€” flagId: app_projects
πŸ”΄ TODOapp/work/projects/page.tsx
βœ“
Book Reader β€” flagId: app_book_reader
πŸ”΄ TODOapp/tools/book-reader/page.tsx
βœ“
Career Plan β€” flagId: app_career
πŸ”΄ TODOapp/work/career/page.tsx
βœ“
Relationships / Contacts β€” flagId: app_contacts
πŸ”΄ TODOapp/personal/contacts/page.tsx
πŸ“± Mobile UI & Polish
Mobile Optimizations
βœ“
App Drawer β€” mobile sidebar as full-width drawer with dark header
βœ… Done
βœ“
Font size Aβˆ’/A+ controls in drawer header
βœ… Done
βœ“
Bottom nav β€” 5 tabs: Menu, Home, Notes, Search, Vault
βœ… Done
βœ“
44px touch targets, 16px inputs (no iOS zoom)
βœ… Done
βœ“
Safe area insets (iPhone notch / Dynamic Island)
βœ… Done
βœ“
Swipe to open drawer (left edge only, ignores vertical scroll)
βœ… Done
βœ“
Themes & Fonts page (theme, font size, font family, density)
βœ… Done
βœ“
Anti-flash script for theme (no white flash on dark theme)
βœ… Done
βœ“
InstallPrompt floating bubble removed (topbar button handles it)
βœ… Done
βœ“
Test all pages on real Android device (Chrome DevTools mobile view β‰  real device)
🟑 TODO before store submission
πŸ“¦ Capacitor Setup
Install & Configure Capacitor
βœ“
capacitor.config.ts created (appId: com.asaros.app)
βœ… Done
βœ“
next.config.ts: static export mode for BUILD_TARGET=capacitor
βœ… Done
βœ“
Package.json scripts: build:cap, cap:sync, cap:android, cap:ios
βœ… Done
βœ“
Install Capacitor packages
πŸ”΄ Next step
cd asaros-app npm install @capacitor/core @capacitor/cli @capacitor/android @capacitor/ios npm install @capacitor/status-bar @capacitor/splash-screen @capacitor/haptics @capacitor/keyboard
βœ“
Run setup script
πŸ”΄ Next step
chmod +x scripts/setup-mobile.sh ./scripts/setup-mobile.sh # This installs Capacitor, builds static export, adds platforms, syncs
βœ“
Add deep link redirect URI for Google OAuth in Capacitor
Google OAuth redirect flow breaks in WebView. Add deep link handler or use custom tab.
πŸ”΄ Required for Google login in app
// In Google Cloud Console β†’ Credentials β†’ Your OAuth Client: // Add: asaros://auth/callback // In capacitor.config.ts add: server: { androidScheme: 'asaros' } // In AndroidManifest.xml add intent-filter for asaros:// scheme
βœ“
Fix Razorpay payment in WebView (Capacitor)
Razorpay web SDK loads in WebView. Test payment flow in Android emulator and real device before release.
🟑 Test required
πŸ€– Android Build
Android Studio + Play Store
βœ“
Install Android Studio (if not already installed)
Download from developer.android.com/studio. Install with default SDK settings.
πŸ”΄ Required
βœ“
Open Android project and run on emulator
πŸ”΄ Required
npx cap open android # Android Studio opens # Run β†’ Run 'app' on Emulator (create Pixel 7 API 34 emulator if needed)
βœ“
Generate release keystore (one-time, keep forever)
πŸ”΄ Required β€” DO NOT LOSE THIS FILE
cd android keytool -genkeypair -v -keystore release.keystore \ -alias asaros -keyalg RSA -keysize 2048 -validity 10000 # BACK UP release.keystore + passwords securely
βœ“
Build signed AAB for Play Store
πŸ”΄ Required
./scripts/build-android-release.sh # Output: android/app/build/outputs/bundle/release/app-release.aab
βœ“
Create app in Google Play Console
play.google.com/console β†’ Create app β†’ Fill details β†’ Internal testing β†’ Upload AAB
πŸ”΄ Required
βœ“
Play Store assets
Required: 512Γ—512 icon PNG, 1024Γ—500 feature graphic, 2+ screenshots (1080Γ—1920), privacy policy URL, content rating questionnaire, short/full description.
🟑 Required before store review
🍎 iOS Build
Xcode + App Store Connect
βœ“
Mac with Xcode 15+ (required β€” no workaround)
πŸ”΄ Prerequisite
βœ“
Apple Developer Program ($99/year)
πŸ”΄ Required
βœ“
Open iOS project in Xcode and configure signing
πŸ”΄ Required
npx cap open ios # Xcode β†’ Select project β†’ Signing & Capabilities # Set Team: your Apple Developer account # Bundle ID: com.asaros.app
βœ“
App Store Connect β€” create new app record
appstoreconnect.apple.com β†’ My Apps β†’ + New App β†’ iOS β†’ Bundle ID: com.asaros.app
πŸ”΄ Required
βœ“
iOS App Store assets
Required: 1024Γ—1024 icon (no transparency), 6.7" screenshots (1290Γ—2796) β€” MANDATORY, 5.5" optional, description, keywords (100 chars), support URL, privacy policy URL.
🟑 Required
βœ“
iOS IAP decision β€” web-only payments or Apple IAP
Apple takes 15–30% of in-app purchases. Recommended for MVP: web-only payments. Show "Subscribe at asaros.app" β€” legal per App Store guidelines (Section 3.1.3a).
πŸ”΄ Decision required before submission
βœ“
Archive & upload to App Store Connect via Xcode
πŸ”΄ Final step
// Xcode: Product β†’ Archive β†’ Distribute App // β†’ App Store Connect β†’ Upload β†’ Submit for Review
🌍 Environment & Secrets
Worker Secrets (via wrangler secret put)
βœ“
GOOGLE_CLIENT_ID + GOOGLE_CLIENT_SECRET β€” Google OAuth
βœ… Set
βœ“
JWT_SECRET β€” token signing (64-char hex)
βœ… Set
βœ“
ADMIN_SECRET β€” admin dashboard key
βœ… Set
βœ“
RAZORPAY_KEY_ID + RAZORPAY_KEY_SECRET β€” LIVE keys
Currently test keys. Must switch to live keys (rzp_live_xxx) before launch.
πŸ”΄ TODO
npx wrangler secret put RAZORPAY_KEY_ID npx wrangler secret put RAZORPAY_KEY_SECRET
βœ“
GOOGLE_DRIVE_CLIENT_ID + GOOGLE_DRIVE_CLIENT_SECRET + REDIRECT_URI β€” Drive OAuth
🟑 Verify set correctly
βœ“
App env: NEXT_PUBLIC_WORKER_URL set correctly in Pages
Verify in Cloudflare Pages dashboard β†’ Settings β†’ Environment variables.
🟑 Verify
🌐 Domain Migration
aos.documateo.com β†’ asaros.app
βœ“
Register asaros.app domain
πŸ”΄ TODO
βœ“
Update wrangler.toml routes to asaros.app
πŸ”΄ TODO
routes = [ { pattern = "asaros.app/api/*", zone_name = "asaros.app" } ]
βœ“
Update ALLOWED_ORIGINS in wrangler.toml
πŸ”΄ TODO
βœ“
Update Google OAuth authorized redirect URIs
In Google Cloud Console β†’ Credentials β†’ Your OAuth Client β†’ Add: https://asaros.app/api/auth/google/callback
πŸ”΄ TODO
βœ“
Update NEXT_PUBLIC_WORKER_URL in Cloudflare Pages to https://asaros.app
πŸ”΄ TODO
βœ“
Privacy policy & Terms of Service pages at asaros.app/privacy and /terms
Required for App Store and Play Store review. Simple HTML pages are sufficient.
πŸ”΄ Required for app stores
πŸ§ͺ Testing Checklist
Manual Test β€” Auth Flows
βœ“
Register new email account β†’ verify JWT returned β†’ verify logged in
🟑 Test
βœ“
Login with email β†’ logout β†’ login again β†’ app opens correctly
🟑 Test
βœ“
Connect Google Drive β†’ logout β†’ login β†’ verify Drive still connected
πŸ”΄ Test (key bug area)
βœ“
Forgot password flow β†’ receive reset email β†’ reset β†’ login with new pw
🟑 Test
βœ“
Delete account β†’ verify all data wiped β†’ verify can re-register
🟑 Test
Manual Test β€” Payments
βœ“
Complete test payment β†’ verify Pro badge appears in topbar
πŸ”΄ Test
βœ“
Verify payment logged in payment_events table
🟑 Test
βœ“
Admin override (grant Pro manually) β†’ verify plan updates
🟑 Test
Manual Test β€” Feature Gates
βœ“
Free user sees upgrade prompt on Pro-gated page
πŸ”΄ Test after gates applied
βœ“
Trial user (day 1) can access trial-gated features
πŸ”΄ Test
βœ“
Admin feature flag toggle takes effect after page refresh
πŸ”΄ Test