Commit Graph
275 Commits
Author SHA1 Message Date
MythEclipseandClaude c9ae90a042 feat(auth): implement Google OAuth callback with user auto-creation
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>
v0.1.14
2026-06-15 21:35:40 +07:00
Selly SupriyatinandGitHub caca13e32c Merge pull request #39 from ATLAS-PJK-GM007/selly/frontend
Selly/frontend
v0.1.13
2026-06-15 21:07:56 +07:00
MythEclipseandClaude a55b1521ea ci(android): run patch-android-manifest.sh after tauri android init
Ensures CAMERA permission is always injected into the generated
AndroidManifest.xml during CI builds.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 21:05:34 +07:00
seriouselly 2eabf12b36 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 20:55:21 +07:00
seriouselly b18b98e1a7 fix(scan): resolve empty medicine data and clean up linter warning
- 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.
2026-06-15 20:54:44 +07:00
MythEclipseandClaude a36b74a1cf feat(scan): add camera capture for Android with toggle between upload and live camera
- 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>
v0.1.12
2026-06-15 20:54:11 +07:00
seriouselly 9cfbef4598 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 20:39:01 +07:00
seriouselly 8f1308c8af fix(diagnosis): correct risk level mapping and dynamic confidence UI
- 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.
2026-06-15 20:38:26 +07:00
MythEclipseandClaude c881e6a2b2 fix(auth): pass request.headers to getCurrentUser in all protected routes
dashboard, diagnoses, expert routes now support Authorization header fallback for Android WebView

Co-Authored-By: Claude <noreply@anthropic.com>
v0.1.11
2026-06-15 20:11:11 +07:00
MythEclipseandClaude 7693a02c98 fix(auth): add bearer token auth as fallback for Android WebView third-party cookie blocking
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>
v0.1.10
2026-06-15 19:43:02 +07:00
MythEclipseandClaude 528a1622d0 fix(auth): prevent AuthInitializer from overwriting Zustand with null user
Co-Authored-By: Claude <noreply@anthropic.com>
v0.1.9
2026-06-15 19:04:29 +07:00
MythEclipseandClaude 51a4cb9ed2 fix(auth): detect HTTPS via X-Forwarded-Proto for SameSite=None cookies, fix AuthGuard null overwrite
- 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>
v0.1.8
2026-06-15 18:17:26 +07:00
MythEclipse 22307d44de fix(api): add http://tauri.localhost to CORS allowed origins v0.1.7 2026-06-15 17:09:40 +07:00
MythEclipseandClaude 41e0501e6b fix(tauri): add absolute API base URL default and CORS origins for Android WebView
- 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>
v0.1.6
2026-06-15 14:32:54 +07:00
MythEclipseandClaude f675b86dc8 fix(docker): remove port exposure from docker-compose.yml
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>
2026-06-15 14:05:44 +07:00
MythEclipseandClaude 8ed1b57f1d fix(ci): add container wait loop before health check in deploy
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>
2026-06-15 14:04:19 +07:00
MythEclipseandClaude bf1725a4b8 fix(docker): remove non-existent shared/node_modules COPY from API Dockerfile
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>
v0.1.5
2026-06-15 13:58:23 +07:00
MythEclipseandClaude 8954535e08 fix(ci): add tauri package.json to Dockerfiles and fix Android NDK/build issues
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>
2026-06-15 13:54:55 +07:00
MythEclipseandClaude b93be6c6cb fix(docker): copy bun.lock and workspace node_modules to API runner stage
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>
2026-06-15 03:30:18 +07:00
MythEclipseandClaude 2d39468279 perf(ci): add Bun and Gradle caching to Android workflow
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>
v0.1.4
2026-06-15 01:43:25 +07:00
MythEclipseandClaude 78db3a03ac chore: change base URL to zeavisedu.asepharyana.my.id
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 01:35:58 +07:00
Selly SupriyatinandGitHub bed0e018db Merge pull request #38 from ATLAS-PJK-GM007/selly/frontend
Selly/frontend
v0.1.3
2026-06-15 01:29:00 +07:00
seriouselly 3b37a92d1e Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 01:27:40 +07:00
seriouselly 6c1006d4a0 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 01:27:13 +07:00
MythEclipseandClaude 03c1e4edb8 fix(ci): add tailwindcss as direct dependency
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>
2026-06-15 01:23:51 +07:00
seriouselly 56b683392c feat(diagnosis): add back to history button and update UI icons
- 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.
2026-06-15 01:20:41 +07:00
MythEclipseandClaude 05055ed9cf fix(ci): remove bun.lock from Docker COPY to avoid version mismatch
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 01:17:25 +07:00
seriouselly 4b5530ef73 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 01:09:04 +07:00
MythEclipseandClaude 02ae022174 fix(ci): regenerate bun.lock and disable frozen-lockfile in Dockerfiles
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>
2026-06-15 01:06:17 +07:00
seriouselly 61a4043967 Revert "fix(ci): add --no-frozen-lockfile to bun install in Dockerfiles"
This reverts commit 9ee3af8a1f.
2026-06-15 01:05:04 +07:00
MythEclipseandClaude 9ee3af8a1f fix(ci): add --no-frozen-lockfile to bun install in Dockerfiles
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>
v0.1.2
2026-06-15 01:02:35 +07:00
MythEclipseandClaude 3d3ca72230 fix(ci): remove --frozen-lockfile to prevent bun version mismatch failures
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>
2026-06-15 00:57:31 +07:00
MythEclipseandClaude 3d79b227d7 fix(ci): remove auto-commit to prevent infinite loop
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>
v0.1.1
2026-06-15 00:26:12 +07:00
MythEclipseandClaude 853fee66b2 feat(ci): auto-increment version + publish to GitHub Release
- 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>
v0.1.0
2026-06-15 00:16:32 +07:00
Selly SupriyatinandGitHub 9721c0761c Merge pull request #37 from ATLAS-PJK-GM007:selly/frontend
refactor(diagnosis/catalog): improve UI consistency and fix data rendering
2026-06-15 00:15:51 +07:00
seriouselly 436d39b76e Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 00:00:55 +07:00
seriouselly 21ca1befcd refactor(diagnosis/catalog): improve UI consistency and fix data rendering
- Fix reference error in `DiagnosisResultView` by correctly mapping `riskLevel` prop.
- Integrate dynamic `RiskBadge` with automated severity-to-color mapping for both diagnosis and catalog views.
- Update icons in the medicine recommendation section of `catalog-page` and `DiagnosisResultView` for better visual consistency and intuition.
2026-06-14 23:59:59 +07:00
MythEclipseandClaude 360530fe1c fix(ci): add tauri android init step before build
gen/android/ is gitignored — must regenerate in CI.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-14 23:53:42 +07:00
Asep Haryana SaputraandGitHub 5a06e5c08c Merge pull request #36 from MythEclipse/main
Android
2026-06-14 23:48:29 +07:00
Asep Haryana SaputraandGitHub 3f77eb8283 Merge branch 'ATLAS-PJK-GM007:main' into main 2026-06-14 23:48:02 +07:00
MythEclipse ab61065502 feat(tauri): add tauri application 2026-06-14 23:39:31 +07:00
MythEclipseandClaude cc4a12aeb0 feat(ci): add GitHub Actions workflow for Android APK build
- Trigger on push to main (web/tauri/shared changes), PR, and manual
- Builds Vite frontend + Tauri Rust for 4 Android arches
- Signs APK with keystore from GitHub secrets
- Uploads signed APK + AAB as artifact

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-14 23:36:58 +07:00
Selly SupriyatinandGitHub faa423e6f0 Merge pull request #35 from ATLAS-PJK-GM007:selly/frontend
style(catalog): update medicine recommendation icons for better visual clarity
2026-06-14 23:28:53 +07:00
seriouselly 3ce565509f style(catalog): update medicine recommendation icons for better visual clarity
- Replace previous icons in the medicine recommendation section with more intuitive visual elements.
- Enhance the user interface consistency within the catalog page.
2026-06-14 23:27:06 +07:00
Selly SupriyatinandGitHub 19e3447e12 Merge pull request #34 from ATLAS-PJK-GM007/selly/frontend
Selly/frontend
2026-06-14 23:21:37 +07:00
seriouselly d07d47b974 refactor(diagnosis): enhance detail page usability and data robustness
- Implement `useEffect` to ensure smooth scroll-to-top on navigation.
- Add fallback logic to populate medicine recommendations from local seed data if backend payload is incomplete.
- Integrate dynamic `RiskBadge` component with automated severity-to-color mapping for better visual clarity.
2026-06-14 23:19:42 +07:00
MythEclipseandClaude d8e1b0b681 feat(tauri): add Tauri v2 Android app wrapper
- Wrap apps/web as Android APK via Tauri v2 WebView (zero web changes)
- Disable default compression feature to avoid brotli/alloc-no-stdlib conflict with Rust 1.96
- Add RGBA icon placeholders
- Add Android keystore to gitignore

APK output: apps/tauri/gen/android/app/build/outputs/apk/

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-14 23:16:58 +07:00
seriouselly e9d175a2b5 fix(diagnosis): add fallback seed data for medicine recommendations
- Import diseaseCatalogSeed into diagnosis detail and scan pages.
- Implement fallback logic to populate medicine recommendations when backend payload lacks treatment data.
- Ensure consistent educational content display across catalog and diagnosis views.
2026-06-14 22:43:21 +07:00
seriouselly fe2734310a fix(layout): correct sidebar toggle behavior and navigation logic
- Remove `onClick` toggle handler from `Sidebar` links to prevent unwanted state changes during navigation.
- Remove aggressive `onClick` auto-collapse from `MainLayout` content wrapper so the sidebar remains stable.
- Ensure sidebar state is exclusively managed by the dedicated toggle button, aligning with standard desktop UX.
2026-06-14 22:25:46 +07:00
seriouselly 5272968c6f refactor(scan): reset upload form state after successful diagnosis
- Restore setFileName(null) and setPreviewUrl(null) in the mutation onSuccess callback.
- Ensure the file upload area resets to its default state immediately after a successful scan, preparing the UI for the next input.
2026-06-14 21:01:21 +07:00