- Remove local image imports for the background in login and register pages.
- Update background-image styles to use external URL links for easier asset management.
On Android, the app navigates to the live production URL immediately
after setup. The APK becomes a thin shell — bundled frontend is only
a placeholder for the ~1 second before redirect. All web updates
(deploy web) take effect instantly on all installed APKs.
Co-Authored-By: Claude <noreply@anthropic.com>
Replace custom zeavisedu:// scheme in callback HTML with Chrome's
native intent:// protocol which directly opens the target Android app
by package name. Includes browser_fallback_url for non-app scenarios.
Also updates the HTML page with better UX: auto-redirect via JS,
fallback button, and copyable URL for manual paste.
Co-Authored-By: Claude <noreply@anthropic.com>
Login-page won't auto-process token on deep link return because
the WebView stays on the page it was on. Added setupDeepLinkHandler()
which listens for zeavisedu:// scheme URLs and navigates the WebView
to the correct path+query.
Co-Authored-By: Claude <noreply@anthropic.com>
On Tauri Android, window.location.origin = http://tauri.localhost
which is the embedded dev server URL, not the API server.
Use VITE_API_BASE_URL env var which points to the production API.
Co-Authored-By: Claude <noreply@anthropic.com>
- Root README redesigned as landing page with 7 sub-chapters
- Each child README gets navigation header + footer linking back to root
- Cross-links between Machine_Learning, ml-service, and infra READMEs
- Reduced duplication: root summarizes, children provide full detail
- Net -207 lines, cleaner structure
Co-Authored-By: Claude <noreply@anthropic.com>
Background: Google blocks OAuth in embedded WebView (403 disallowed_useragent).
Solution: open Google login in the Android system browser, then deep-link
back to the Tauri app via custom scheme after callback.
Changes:
- Tauri: add tauri-plugin-opener + tauri-plugin-deep-link to Cargo.toml
- Tauri: register plugins in lib.rs, add capabilities
- Web: auth-form.tsx Google button uses openUrl() via @tauri-apps/plugin-opener
on Tauri (opens in system browser), falls back to window.location.href
- Web: add lib/tauri.ts for isTauri() detection + lazy opens
- API: /auth/google accepts ?platform=tauri → encodes into OAuth state param
- API: /auth/google/callback decodes state → if tauri, renders HTML page
that deep-links back via zeavisedu:// scheme; if web, 302 redirect
- Android: patch script adds deep link intent filter for zeavisedu:// scheme
Co-Authored-By: Claude <noreply@anthropic.com>
Inline SVG with official Google brand colors (blue, green, yellow, red)
placed before the label text with gap-2.5 spacing.
Co-Authored-By: Claude <noreply@anthropic.com>
- useSearchParams can lose params during re-renders, causing blank page
- Use native window.location.search + URLSearchParams instead (always accessible)
- Add oauthProcessing spinner state so user sees 'Menyelesaikan login...'
instead of blank page while /auth/me is being called
Co-Authored-By: Claude <noreply@anthropic.com>
Elysia's set.redirect returns 200 OK instead of 302 redirect on the
current version. Use set.status = 302 + set.headers['Location'] instead
for both /auth/google (Google OAuth redirect) and /auth/google/callback
(all redirect paths: errors, success token delivery).
Co-Authored-By: Claude <noreply@anthropic.com>
Add GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REDIRECT_URI
to the deploy workflow so the API can use Google OAuth on production.
Co-Authored-By: Claude <noreply@anthropic.com>
API (apps/api/src/routes/auth.ts):
- Exchange authorization code for tokens via Google's token endpoint
- Decode id_token payload (JWT) to extract sub, email, name
- Find user by googleId → fall back to email match (link accounts)
- Auto-create user if neither found (role: 'user', no password)
- Create session + set cookie, redirect to /login?token=<token>
Web (apps/web/src/pages/login-page.tsx):
- Consume ?token= query param from OAuth redirect
- Store token in localStorage for future API calls
- Fetch /auth/me to hydrate Zustand store, then navigate to dashboard
- Show OAuth errors from ?error= query param
Co-Authored-By: Claude <noreply@anthropic.com>
- Add local fallback using `diseaseCatalogSeed` to populate medicine recommendations in the diagnosis preview modal when API data is missing.
- Remove unused `diagnosesQuery` assignment to resolve SonarLint warning while preserving the background prefetching logic.
- Add CameraCapture component with live viewfinder via getUserMedia
- Support rear/environment camera (default) with switch to front/user
- Capture to JPEG 92% quality via canvas, reuse existing upload flow
- Toggle between 'Unggah' (file upload) and 'Kamera' (live capture) modes
- Error handling for denied/not found/not readable in Bahasa Indonesia
- Add patch script for AndroidManifest CAMERA permission (gen/ is gitignored)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix `getRiskLevelKey` to properly recognize English risk level values ("low", "high"), preventing "Healthy Leaf" from incorrectly defaulting to medium risk.
- Update confidence bar text and colors to dynamically show warning alerts when AI confidence falls below the 75% threshold.
Android WebView blocks third-party cookies by default. This patch:
- Returns session token in login/register response body
- Stores token in localStorage, sends via Authorization: Bearer header
- Backend getCurrentUser supports Authorization header fallback
Co-Authored-By: Claude <noreply@anthropic.com>
- Cookie SameSite now dynamic: None;Secure when behind HTTPS proxy, Lax otherwise
- AuthGuard useEffect no longer overwrites Zustand store with null from background refetch
- AuthInitializer: add staleTime 30s
Co-Authored-By: Claude <noreply@anthropic.com>
- Set VITE_API_BASE_URL default to production API URL in api-client.ts
so fetch() uses absolute URLs instead of relative paths that fail on Tauri
- Add tauri://localhost and https://tauri.localhost to API CORS allowed origins
- Also fix .env WEB_APP_URL from stale .tech to .my.id
Co-Authored-By: Claude <noreply@anthropic.com>
All services route through Traefik via internal network labels.
No ports need to be exposed on the host.
Co-Authored-By: Claude <noreply@anthropic.com>
Containers need time to start after docker compose up -d. Replaced
instant grep check with up-to-60s retry loop.
Co-Authored-By: Claude <noreply@anthropic.com>
packages/shared has only devDependencies (typescript). After
bun install --production, packages/shared/node_modules does not
exist. Root node_modules contains all hoisted deps.
Co-Authored-By: Claude <noreply@anthropic.com>
Build and Deploy: workspace has 4 members (api/web/shared/tauri) but
Dockerfiles only copied 3 package.json files. Missing tauri workspace
member caused bun install --production to fail with frozen lockfile
error.
Build Android APK:
- Remove explicit NDK 28 install (runner has NDK 29 pre-installed, dual
NDK presence broke ANDROID_NDK_HOME resolution)
- Auto-pin NDK version from runner's SDK
- rm -rf gen/android before tauri android init (stale cache recovery)
- Remove gen/android/.gradle from Gradle cache (causes stale state)
- Use --apk flag for faster APK-only build
Co-Authored-By: Claude <noreply@anthropic.com>
Bun workspace symlinks (apps/api/node_modules/*) pointed to root
.bun cache but were never copied from deps→runner. Added bun.lock,
apps/api/node_modules, and packages/shared/node_modules to the
runner COPY chain so and resolve at runtime.
Also added bun.lock to web Dockerfile for deterministic installs.
Co-Authored-By: Claude <noreply@anthropic.com>
Cache Bun dependencies (install cache + node_modules) and Gradle caches
(wrapper, dependencies, build artifacts) to dramatically speed up CI builds.
Gradle key uses Cargo.lock since gradle files don't exist at checkout time.
Co-Authored-By: Claude <noreply@anthropic.com>
PostCSS plugin needs tailwindcss package available in node_modules
at build time. Adding it as a direct dependency ensures consistent
resolution.
Co-Authored-By: Claude <noreply@anthropic.com>
- Add "Kembali ke Riwayat" button to `diagnosis-detail-page.tsx` for better navigation flow.
- Update camera icon in `diagnose-result-view.tsx` to align with the new UI design.
- Resolve merge conflicts with main to sync latest workflow changes.
bun auto-enables --frozen-lockfile in CI by default. Use env var
BUN_INSTALL_FROZEN_LOCKFILE=0 to override this behavior. Also
regenerate lockfile fresh to ensure it is compatible with bun 1.3.14.
Co-Authored-By: Claude <noreply@anthropic.com>
bun defaults to --frozen-lockfile in CI environments, causing failures
when the lockfile format differs from the version used at build time.
Co-Authored-By: Claude <noreply@anthropic.com>
CI uses bun 1.3.14 (stable) but local dev uses canary. Lockfile
format can differ between versions causing spurious failures.
Co-Authored-By: Claude <noreply@anthropic.com>
Tag created by softprops/action-gh-release is the single source of truth.
Version bump in tauri.conf.json + Cargo.toml is local to the build only.
Co-Authored-By: Claude <noreply@anthropic.com>
- Compute version from latest git tag (bump patch)
- Update tauri.conf.json and Cargo.toml with new version
- Create GitHub Release with signed APK + AAB via softprops/action-gh-release
- Release name: v{version}, APK filename: zeavis-edu-v{version}.apk
Co-Authored-By: Claude <noreply@anthropic.com>