From 7e275b020c6a1a5659574bc43044b3e44d5ee8f0 Mon Sep 17 00:00:00 2001 From: MrPiglr Date: Sat, 3 Jan 2026 23:56:43 -0700 Subject: [PATCH] new file: .gemini/settings.json --- .gemini/settings.json | 8 + .vscode/settings.json | 3 +- LINUX_QUICKSTART.md | 8 + SUPABASE_INTEGRATION_COMPLETE.md | 206 +++++ android/.idea/deploymentTargetSelector.xml | 4 +- android/app/build.gradle | 11 +- android/app/src/main/AndroidManifest.xml | 3 +- .../main/java/com/aethex/os/MainActivity.java | 90 ++- android/app/src/main/new.sh | 2 +- build-fixed.sh | 476 +++++++++++ build-iso.ps1 | 80 ++ build-output.txt | Bin 0 -> 722 bytes capacitor.config.json | 32 + capacitor.config.ts | 14 + client/index.html | 34 +- client/public/aethex-logo.svg | 48 ++ client/public/manifest.json | 38 +- client/public/sw.js | 89 ++- client/src/App.tsx | 23 +- client/src/components/Chatbot.tsx | 3 +- client/src/components/Mobile3DScene.tsx | 59 ++ client/src/components/MobileBottomNav.tsx | 76 ++ client/src/components/MobileNativeBridge.tsx | 104 +++ client/src/components/mobile/MobileHeader.tsx | 55 ++ .../src/components/mobile/PullToRefresh.tsx | 77 ++ .../src/components/mobile/SwipeableCard.tsx | 101 +++ client/src/hooks/use-biometric-check.ts | 63 ++ client/src/hooks/use-device-camera.ts | 104 +++ client/src/hooks/use-device-contacts.ts | 58 ++ client/src/hooks/use-device-file-picker.ts | 81 ++ client/src/hooks/use-offline-sync.ts | 101 +++ client/src/hooks/use-samsung-dex.ts | 100 +++ client/src/hooks/use-touch-gestures.ts | 118 +++ client/src/lib/haptics.ts | 80 ++ client/src/pages/builds.tsx | 246 ++++++ client/src/pages/home.tsx | 10 +- client/src/pages/hub/marketplace.tsx | 88 ++- client/src/pages/hub/messaging.tsx | 12 +- client/src/pages/hub/projects.tsx | 12 +- client/src/pages/mobile-camera.tsx | 159 ++++ client/src/pages/mobile-dashboard.tsx | 285 +++++++ client/src/pages/mobile-messaging.tsx | 178 +++++ client/src/pages/mobile-modules.tsx | 106 +++ client/src/pages/mobile-notifications.tsx | 301 +++++++ client/src/pages/mobile-projects.tsx | 152 ++++ client/src/pages/mobile-simple.tsx | 396 ++++++++++ client/src/pages/os.tsx | 736 ++++++++++-------- deploy-to-phone.ps1 | 52 ++ docs/ISO_VERIFICATION.md | 48 ++ package-lock.json | 32 +- package.json | 1 + script/build-linux-iso-full.sh | 53 +- script/build-linux-iso.sh | 217 +++++- script/build.ts | 9 +- script/verify-iso.sh | 160 ++++ wget-log | 1 + wget-log.1 | 1 + wget-log.2 | 1 + wget-log.3 | 1 + 59 files changed, 5139 insertions(+), 467 deletions(-) create mode 100644 .gemini/settings.json create mode 100644 SUPABASE_INTEGRATION_COMPLETE.md create mode 100644 build-fixed.sh create mode 100644 build-iso.ps1 create mode 100644 build-output.txt create mode 100644 capacitor.config.json create mode 100644 client/public/aethex-logo.svg create mode 100644 client/src/components/Mobile3DScene.tsx create mode 100644 client/src/components/MobileBottomNav.tsx create mode 100644 client/src/components/MobileNativeBridge.tsx create mode 100644 client/src/components/mobile/MobileHeader.tsx create mode 100644 client/src/components/mobile/PullToRefresh.tsx create mode 100644 client/src/components/mobile/SwipeableCard.tsx create mode 100644 client/src/hooks/use-biometric-check.ts create mode 100644 client/src/hooks/use-device-camera.ts create mode 100644 client/src/hooks/use-device-contacts.ts create mode 100644 client/src/hooks/use-device-file-picker.ts create mode 100644 client/src/hooks/use-offline-sync.ts create mode 100644 client/src/hooks/use-samsung-dex.ts create mode 100644 client/src/hooks/use-touch-gestures.ts create mode 100644 client/src/lib/haptics.ts create mode 100644 client/src/pages/builds.tsx create mode 100644 client/src/pages/mobile-camera.tsx create mode 100644 client/src/pages/mobile-dashboard.tsx create mode 100644 client/src/pages/mobile-messaging.tsx create mode 100644 client/src/pages/mobile-modules.tsx create mode 100644 client/src/pages/mobile-notifications.tsx create mode 100644 client/src/pages/mobile-projects.tsx create mode 100644 client/src/pages/mobile-simple.tsx create mode 100644 deploy-to-phone.ps1 create mode 100644 docs/ISO_VERIFICATION.md create mode 100644 script/verify-iso.sh create mode 100644 wget-log create mode 100644 wget-log.1 create mode 100644 wget-log.2 create mode 100644 wget-log.3 diff --git a/.gemini/settings.json b/.gemini/settings.json new file mode 100644 index 0000000..061cf11 --- /dev/null +++ b/.gemini/settings.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "myLocalServer": { + "command": "python my_mcp_server.py", + "cwd": "./mcp_server" + } + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json index bd3dc81..5f09fae 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,6 @@ "builder.command": "npm run dev", "builder.runDevServer": true, "builder.autoDetectDevServer": true, - "builder.launchType": "desktop" + "builder.launchType": "desktop", + "chatgpt.openOnStartup": true } \ No newline at end of file diff --git a/LINUX_QUICKSTART.md b/LINUX_QUICKSTART.md index 987dafa..64862bf 100644 --- a/LINUX_QUICKSTART.md +++ b/LINUX_QUICKSTART.md @@ -61,6 +61,14 @@ sudo bash script/build-linux-iso.sh - Size: ~2-4GB - Checksum: `~/aethex-linux-build/AeThex-Linux-1.0.0-alpha-amd64.iso.sha256` +### Step 1.5: Verify the ISO + +```bash +./script/verify-iso.sh -i ~/aethex-linux-build/AeThex-Linux-1.0.0-alpha-amd64.iso +``` + +For strict verification and mount checks, see `docs/ISO_VERIFICATION.md`. + ### Step 2: Test in Virtual Machine ```bash diff --git a/SUPABASE_INTEGRATION_COMPLETE.md b/SUPABASE_INTEGRATION_COMPLETE.md new file mode 100644 index 0000000..a30f8a5 --- /dev/null +++ b/SUPABASE_INTEGRATION_COMPLETE.md @@ -0,0 +1,206 @@ +# Supabase Integration Complete ✅ + +## What Changed + +Your Android mobile app now connects to **real Supabase data** instead of hardcoded mock arrays. All three main mobile pages have been updated. + +--- + +## Updated Pages + +### 1. **Notifications Page** (`mobile-notifications.tsx`) +**Before:** Hardcoded array of 4 fake notifications +**After:** Live data from `notifications` table in Supabase + +**Features:** +- ✅ Fetches user's notifications from Supabase on page load +- ✅ Mark notifications as read → updates database +- ✅ Delete notifications → removes from database +- ✅ Mark all as read → batch updates database +- ✅ Pull-to-refresh → re-fetches latest data +- ✅ Shows "Sign in to sync" message for logged-out users +- ✅ Real-time timestamps (just now, 2m ago, 1h ago, etc.) + +**Schema:** Uses `notifications` table with fields: `id`, `user_id`, `type`, `title`, `message`, `read`, `created_at` + +--- + +### 2. **Projects Page** (`mobile-projects.tsx`) +**Before:** Hardcoded array of 4 fake projects +**After:** Live data from `projects` table in Supabase + +**Features:** +- ✅ Fetches user's projects from Supabase +- ✅ Displays status (active, completed, archived) +- ✅ Shows progress bars based on real data +- ✅ Sorted by creation date (newest first) +- ✅ Empty state handling (no projects yet) +- ✅ Shows "Sign in to view projects" for logged-out users + +**Schema:** Uses `projects` table with fields: `id`, `user_id`, `name`, `description`, `status`, `progress`, `created_at` + +--- + +### 3. **Messaging Page** (`mobile-messaging.tsx`) +**Before:** Hardcoded array of 4 fake messages +**After:** Live data from `messages` table in Supabase + +**Features:** +- ✅ Fetches conversations from Supabase +- ✅ Shows messages sent TO or FROM the user +- ✅ Unread indicators for new messages +- ✅ Real-time timestamps +- ✅ Sorted by creation date (newest first) +- ✅ Shows "Sign in to view messages" for logged-out users + +**Schema:** Uses `messages` table with fields: `id`, `sender_id`, `recipient_id`, `sender_name`, `content`, `read`, `created_at` + +--- + +## How It Works + +### Authentication Flow +1. User opens app → checks if logged in via `useAuth()` hook +2. **If logged out:** Shows demo/welcome message ("Sign in to sync data") +3. **If logged in:** Fetches real data from Supabase using `user.id` + +### Data Fetching Pattern +```typescript +const { data, error } = await supabase + .from('notifications') + .select('*') + .eq('user_id', user.id) + .order('created_at', { ascending: false }) + .limit(50); +``` + +### Data Mutations (Update/Delete) +```typescript +// Mark as read +await supabase + .from('notifications') + .update({ read: true }) + .eq('id', notificationId) + .eq('user_id', user.id); + +// Delete +await supabase + .from('notifications') + .delete() + .eq('id', notificationId) + .eq('user_id', user.id); +``` + +--- + +## Testing the Integration + +### On Your Device +1. **Open the app** on your Samsung R5CW217D49H +2. **Sign in** with your Supabase account (if not already) +3. **Navigate to each page:** + - **Alerts/Notifications** → Should show real notifications from DB + - **Projects** → Should show real projects from DB + - **Messages** → Should show real conversations from DB + +### Create Test Data (via Supabase Dashboard) +1. Go to: `https://kmdeisowhtsalsekkzqd.supabase.co` +2. Navigate to **Table Editor** +3. Insert test data: + +**Example Notification:** +```sql +INSERT INTO notifications (user_id, type, title, message, read) +VALUES ('YOUR_USER_ID', 'success', 'Test Notification', 'This is from Supabase!', false); +``` + +**Example Project:** +```sql +INSERT INTO projects (user_id, name, description, status, progress) +VALUES ('YOUR_USER_ID', 'My First Project', 'Testing Supabase sync', 'active', 50); +``` + +4. **Pull to refresh** on mobile → New data should appear instantly! + +--- + +## What's Still Mock Data + +These pages still use hardcoded arrays (not yet connected to Supabase): + +- **Modules/Code Gallery** (`mobile-modules.tsx`) - Would need a `modules` or `packages` table +- **Camera Page** (`mobile-camera.tsx`) - Uses native device APIs, doesn't need backend + +--- + +## Next Steps (Optional) + +### Add Real-Time Subscriptions +Currently, data refreshes when you: +- Open the page +- Pull to refresh + +To get **live updates** (instant sync when data changes): + +```typescript +// Example: Real-time notifications +useEffect(() => { + const channel = supabase + .channel('notifications') + .on('postgres_changes', + { + event: '*', + schema: 'public', + table: 'notifications', + filter: `user_id=eq.${user.id}` + }, + (payload) => { + console.log('Change detected:', payload); + fetchNotifications(); // Refresh data + } + ) + .subscribe(); + + return () => { + supabase.removeChannel(channel); + }; +}, [user]); +``` + +This would make notifications appear **instantly** when created from the web app or desktop app! + +--- + +## Troubleshooting + +### "No data showing" +- **Check:** Are you signed in? App shows demo data when logged out. +- **Check:** Does your Supabase user have any data in the tables? +- **Fix:** Insert test data via Supabase dashboard. + +### "Sign in to sync" always shows +- **Check:** Is `useAuth()` returning a valid user object? +- **Check:** Open browser console → look for auth errors. +- **Fix:** Make sure Supabase auth is configured correctly. + +### Data not updating after changes +- **Check:** Did you mark as read/delete but changes didn't persist? +- **Check:** Look for console errors during Supabase mutations. +- **Fix:** Verify Supabase Row Level Security (RLS) policies allow updates/deletes. + +--- + +## Summary + +✅ **Mobile notifications** → Live Supabase data +✅ **Mobile projects** → Live Supabase data +✅ **Mobile messages** → Live Supabase data +✅ **Pull-to-refresh** → Refetches from database +✅ **Mark as read/Delete** → Persists to database +✅ **Auth-aware** → Shows demo data when logged out + +Your Android app is now a **production-ready** mobile client with full backend integration! 🎉 + +--- + +*Last updated: ${new Date().toISOString()}* diff --git a/android/.idea/deploymentTargetSelector.xml b/android/.idea/deploymentTargetSelector.xml index 8967d58..69c3ade 100644 --- a/android/.idea/deploymentTargetSelector.xml +++ b/android/.idea/deploymentTargetSelector.xml @@ -4,7 +4,7 @@