Commit Graph
392 Commits
Author SHA1 Message Date
maulanasdqnandClaude Opus 4.6 2944a2b98a chore: remove dead code and unused dependencies
Deleted:
- libs/utils/src/react-router/ — old file-based routing system (replaced by TanStack Router)
- next-themes dependency (unused since Astro migration)
- react-router-dom from vite external config

Cleaned:
- Removed react-router barrel export from utils/index.ts
- Kept landing data files (still used by Astro components)
- Kept QueryProvider and ModalLoginProvider (still used by apps)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 23:37:28 +07:00
maulanasdqn 79f087e2fc fix: replace beforeLoad redirect with client-side navigate on backoffice index route 2026-04-11 23:24:59 +07:00
maulanasdqnandClaude Opus 4.6 d5b267332f fix: generate route trees and fix build errors for all apps
- Generated routeTree.gen.ts for all 6 apps (was empty placeholder)
- Fixed className backtick syntax in roles create/edit pages
- Fixed unescaped quote in dimentorin settings FAQ
- Route trees enable proper SPA navigation (no more full page reloads)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:53:17 +07:00
maulanasdqnandClaude Opus 4.6 8cb7b592eb fix: smooth client-side sidebar navigation with useNavigate
Replaced <a> tags with button + useNavigate() for instant SPA
navigation without full page reloads. Sidebar now:
- Uses TanStack Router useNavigate for all menu items
- Closes mobile menu on navigation (onClose callback)
- No more page flicker when switching between sections
- Logout redirects to /auth/login via navigate

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:23:55 +07:00
maulanasdqnandClaude Opus 4.6 b2ed098067 feat: integrate dimentorin pages with real API, convert modals to pages
Roadmap: integrated with /v1/landing/cms/roadmap API (was dummy data)
- Created roadmap service layer (types, API, hooks)
- List page with search/filter, create/edit as dedicated pages

Session: converted modal detail to dedicated /session-dimentorin/$id page
Users: converted modal detail/delete to dedicated /users-dimentorin/$id page

Deleted all dimentorin modal components (roadmap, session, users).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:19:06 +07:00
maulanasdqnandClaude Opus 4.6 8749e83dad feat: convert all backoffice CRUD from modals to dedicated pages
Replaced modal-based create/edit/delete with dedicated TanStack Router
pages for 7 modules:

- Roles: /roles, /roles/create, /roles/$id
- Permissions: /permissions, /permissions/create, /permissions/$id
- CMS Events: /cms-events, /cms-events/create, /cms-events/$id
- CMS Testimonials: /cms-testimonials, /cms-testimonials/create, /cms-testimonials/$id
- Accounts: /accounts, /accounts/$id
- Gacha Dashboard: /dashboard, /dashboard/create, /dashboard/$id
- Gacha Rolls: /gacha-roll, /gacha-roll/create, /gacha-roll/$id

Each module now has:
- List page with DataTable + inline delete confirmation
- Dedicated create page with form + back navigation
- Dedicated edit page with pre-filled form + back navigation
- No more modals for CRUD operations

Deleted 21 modal component files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:02:57 +07:00
maulanasdqn 00b0997a9b chore: remove unused useSearch import from hackathon-users 2026-04-11 20:49:55 +07:00
maulanasdqn 05bdac6ee0 fix: auto-expand sidebar group containing current route on page load 2026-04-11 20:39:17 +07:00
maulanasdqn 5cbad2a996 fix: replace TanStack Router Link with plain <a> in shared sidebar to avoid route type issues 2026-04-11 18:29:41 +07:00
maulanasdqn e78002ff69 fix: handle nested data.data response from hackathon admin API 2026-04-11 18:11:07 +07:00
maulanasdqn b48f653a97 fix: replace all remaining react-router imports with @tanstack/react-router in shared UI and hackathon components 2026-04-11 17:54:04 +07:00
maulanasdqn 63da701b1b fix: resolve _hook import paths and signUpWithEmail type mismatch 2026-04-11 17:35:52 +07:00
maulanasdqn 7bef667e96 fix: import uploadUserFile from api/users instead of api/upload 2026-04-11 17:28:42 +07:00
maulanasdqn 82d1fae3d5 fix: resolve duplicate export errors in service lib (uploadUserFile, TLoginRequest, UserDetailResponseDto) 2026-04-11 17:24:00 +07:00
maulanasdqn 49d8419c1c fix: update npmDepsHash for TanStack Router deps 2026-04-11 17:11:25 +07:00
maulanasdqnandClaude Opus 4.6 4240e8eb51 feat: migrate all 5 Vite apps from react-router to TanStack Router
Migrated backoffice, hackathon, dimentorin, gacha, qrcampaign, and
infra from custom react-router file-based routing to TanStack Router
file-based routing following the tanstack-frontend-best-practice
convention.

Key changes per app:
- New routes/ directory with __root.tsx, _public.tsx, _authenticated.tsx
- Auth guards via beforeLoad (replaces old middleware.ts)
- createFileRoute pattern for all page components
- TanStackRouterVite plugin in vite.config for auto route generation
- _components/_hooks folders colocated with routes (ignored by router)
- routeTree.gen.ts auto-generated on dev/build

Convention:
- _public/* routes redirect to dashboard if authenticated
- _authenticated/* routes redirect to /auth/login if not authenticated
- $param for dynamic segments (was [param] in old convention)
- _layout suffix for pathless layout routes

Removed:
- Old src/app/ directories from all apps
- Old src/middleware.ts files
- Custom convertPagesToRoute utility (no longer needed)
- react-router dependency usage (kept in package.json for shared libs)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:04:14 +07:00
maulanasdqnandClaude Opus 4.6 86d9e759a6 fix: route groups (public)/(protected) should be pathless layouts
The file-based router was converting (group) segments to 'group?'
optional parameters, which broke all SPA routes (404 on every page).
Now (group) segments map to empty path '' which creates pathless
layout wrapper routes in react-router, matching Next.js behavior.

e.g. (public)/auth/login/page.tsx → route path '/auth/login'
     (protected)/dashboard/page.tsx → route path '/dashboard'

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 15:58:36 +07:00
maulanasdqnandClaude Opus 4.6 6b3faf2a21 fix: remove dev-only CSS links from index.html in all Vite apps
The <link rel="stylesheet" href="/src/..."> tags reference source
paths that only exist in dev mode. In production builds, Vite injects
CSS through the JS bundle. These broken links caused 404 errors and
unstyled pages in production.

Affected: backoffice, dimentorin, gacha, hackathon, infra

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 15:40:03 +07:00
maulanasdqnandClaude Opus 4.6 bcfac70e2a fix: remove all dark mode styles from shared UI components
Stripped dark: classes from Input, Textarea, Button, and InputField
components. These were causing black/dark backgrounds in modals and
forms across all apps (backoffice, gacha, dimentorin, etc).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:44:04 +07:00
maulanasdqn cb32146daa fix: update npmDepsHash after removing next.js 2026-04-11 10:17:28 +07:00
maulanasdqn b82b03a8a2 fix: remove @nx/next plugin references from nx.json 2026-04-11 10:14:20 +07:00
maulanasdqn 0e0ca9720a chore: update npmDepsHash after security fixes 2026-04-11 10:10:49 +07:00
maulanasdqnandClaude Opus 4.6 964dd009cc security: fix Dependabot alerts - remove next.js, update vulnerable deps
Resolved alerts:
- #158, #159: Removed next.js entirely (landing migrated to Astro)
- #157: Updated axios to 1.15.0 (NO_PROXY SSRF bypass)
- #154, #152, #150: Updated vite to 7.3.1+ (file read, path traversal, fs.deny bypass)
- #156, #155: lodash updated via audit fix
- #148: defu updated via audit fix
- #146: picomatch partially fixed (transitive dep still at 4.0.2 in some paths)
- #140: serialize-javascript updated via audit fix

Removed @nx/next as no longer needed after Astro migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:07:59 +07:00
maulanasdqn a7ec622925 fix: center navbar links in landing page header 2026-04-11 10:00:55 +07:00
maulanasdqn 931355e64e chore: force landing Astro deploy 2026-04-10 22:37:10 +07:00
maulanasdqn 58fbfcd0d8 chore: trigger landing deploy with updated infra config 2026-04-10 22:34:54 +07:00
maulanasdqn 063587aca9 fix: update landing project.json for Nx affected detection and correct build output 2026-04-10 22:27:00 +07:00
maulanasdqn 7576b2557d fix: update npmDepsHash for Astro migration 2026-04-10 22:14:47 +07:00
maulanasdqnandClaude Opus 4.6 95bf09c2fa feat: migrate landing page from Next.js to Astro
Replaces the heavy Next.js SSR app with Astro static site:
- Zero JS shipped for static pages (hero, community, CTA, footer)
- Server-side data fetching in Astro frontmatter (events, hackathon, testimonials)
- Only 4 React islands for interactive parts (mobile menu, roadmap voting, testimonials home, feature request)
- Google Fonts via <link> instead of next/font
- Nix build changed from Node.js systemd service to static nginx (mkStaticAppModule)
- npmDepsHash needs update (set to fake hash, CI will provide correct one)

Performance gains:
- No Node.js server process needed (was using ~10MB RAM)
- No Next.js runtime JS (~200KB+ saved)
- No framer-motion bundle (~130KB saved)
- Static HTML served directly by nginx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 22:10:52 +07:00
maulanasdqnandClaude Opus 4.6 0ade3c3e50 perf: optimize landing page - remove framer-motion, use Google Fonts
Performance improvements:
- Replaced framer-motion animations with CSS @keyframes in hero,
  testimonial, and community sections (saves ~130KB bundle)
- Switched from local Poppins/BaiJamjuree font files (750KB) to
  next/font/google with auto-subsetting
- Deleted 10 local .ttf font files
- Community section is now a server component (no 'use client')
- Removed scroll parallax effect from hero (was causing repaints)
- Hero image marked as priority for LCP optimization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 21:53:04 +07:00
maulanasdqnandClaude Opus 4.6 e945da4b7f feat: integrate landing with real APIs, remove auth pages
Landing page changes:
- Removed entire (auth) directory — landing doesn't need login/signup
- Removed auth buttons (Masuk/Daftar) from header navigation
- Hackathon page now fetches teams + winners from real API
- Roadmap page now fetches from /v1/landing/cms/roadmap API with
  real-time voting via POST /roadmap/vote/{id}
- Deleted dummy JSON files: events.json, testimonials.json, hackathons.json
- Kept static config: hero-content, hero-stats, navigations, socials

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 21:42:43 +07:00
maulanasdqnandClaude Opus 4.6 61b650bb25 feat: add react-hook-form + zod validation to all login forms
All login pages now use react-hook-form with zod resolver for
real-time validation:
- Email validated as proper email format on each keystroke
- Password required validation
- Red border + error message shown inline below invalid fields
- Submit button disabled until all fields are valid
- Input type="text" instead of type="email" to avoid browser tooltip

Also fixed:
- Gacha API trailing slash on /items/ and /credits/ causing 404s

Apps updated: hackathon, dimentorin, backoffice, qrcampaign, gacha

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 19:47:03 +07:00
maulanasdqnandClaude Opus 4.6 e61c003e07 fix: convert landing events/testimonials to client components
Server-side fetch fails during Nix build due to SSL cert issues in
the sandbox. Converted to client components with useEffect+fetch
so data loads at runtime instead of build time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:34:37 +07:00
maulanasdqn 8fff0df753 chore: force dimentorin redeploy 2026-04-10 15:10:47 +07:00
maulanasdqn 054f16053d chore: trigger deploy with updated infra flake inputs 2026-04-10 15:07:49 +07:00
maulanasdqnandClaude Opus 4.6 0193245551 fix: replace ugly Loading... text with spinner across all apps
- Updated default HydrateFallback in file-based-routing to show a
  centered blue spinner instead of bare "Loading..." text
- Added inline spinner to all index.html root divs so users see a
  spinner immediately while JS bundles load (instead of blank white)
- Affects: dimentorin, hackathon, backoffice, gacha, qrcampaign, infra

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:47:24 +07:00
maulanasdqnandClaude Opus 4.6 7f5948724b fix: remove dark mode from all login UIs, redesign gacha login modal
- Stripped all dark: classes from hackathon, dimentorin, backoffice,
  and qrcampaign login pages — light mode only
- Rewrote gacha login modal to match the unified clean design:
  clean typography, native inputs with eye toggle, proper spacing,
  removed old IMPHNEN logo header and Indonesian text

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:44:32 +07:00
maulanasdqnandClaude Opus 4.6 2cba806cd5 feat: integrate landing page with real API and add CMS to backoffice
Landing page:
- Events page now fetches from /v1/landing/cms/events (was hardcoded JSON)
- Testimonials section and page fetch from /v1/landing/cms/testimonials
- Removed dummy data, uses ISR with 60s revalidation
- Replaced thumbnail images with text-based cards (API has no thumbnails)
- Avatar initials for testimonials instead of placeholder images

Backoffice CMS:
- Added Events management page (/cms-events) with full CRUD
- Added Testimonials management page (/cms-testimonials) with full CRUD
- Both follow existing backoffice patterns (DataTable, modals, search, pagination)
- Added CMS section to sidebar navigation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:42:24 +07:00
maulanasdqnandClaude Opus 4.6 414e4d19b8 feat: add dimentorin dashboard and settings pages (#42, #43, #54)
Dashboard (/dashboard):
- Welcome header with user name
- Stats cards: upcoming sessions, completed, role (mentor/mentee)
- Mentor registration CTA for non-mentors
- Upcoming sessions list with status badges
- Profile card with avatar and gradient header

Settings (/dashboard/settings):
- Account Details: displays user info and role
- Privacy & Security: 2FA (coming soon), change password, active sessions
- Preferences: email notifications, language, theme
- FAQ & Support: expandable FAQ accordion with contact info

Dashboard Layout:
- Top nav with Dimentorin branding
- Navigation links: Dashboard, Settings
- Auth guard redirects to login if not authenticated
- Logout button

Closes #42, #43, #54

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:31:49 +07:00
maulanasdqnandClaude Opus 4.6 7268403ca4 fix: add image upload size limits for hackathon (#63)
- useUploadFile: add 5MB limit + image type validation for team
  logo/banner uploads (was unrestricted)
- useUploadAvatar: tighten limit from 5MB to 2MB per issue request
- Submit page: switch from useUploadFile to useUploadSubmission
  which has proper 50MB limit + broader file type support

Size limits:
  - Profile avatar: 2MB (JPEG, PNG, WebP, GIF)
  - Team logo/banner: 5MB (JPEG, PNG, WebP, GIF)
  - Team files: 20MB (images + PDF)
  - Submissions: 50MB (images, PDF, ZIP, video)

Closes #63

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:24:18 +07:00
maulanasdqnandClaude Opus 4.6 651fd65ccb feat: unify login UI across all apps to match hackathon design
- Dimentorin: replaced anime-themed login with clean dark-mode design,
  removed Google login, uses shared useLogin hook
- Backoffice: replaced custom hook login with unified design, clean
  admin-only layout (no signup link)
- QR Campaign: added dark mode support to match hackathon style

All login pages now share consistent:
- Dark/light mode support
- Email + password fields with show/hide toggle
- GitHub OAuth button
- Error handling UI
- Same Tailwind class patterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:18:04 +07:00
maulanasdqnandClaude Opus 4.6 4e9d110bb0 fix: set default API base URL to https://api.imphnen.dev
VITE_API_URL was never set in the Nix build, so getBaseURL() returned
empty string causing all API calls to hit the current origin (e.g.
hackathon.imphnen.dev) instead of api.imphnen.dev. This caused 405
errors on login since the frontend server doesn't handle POST.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:15:27 +07:00
maulanasdqnandClaude Opus 4.6 c6719b19e5 feat: align frontend types with unified /me API response
- Add THackathonProfile, TQrProfile, TMentorProfile, TSessionProfile
  and TUsersMeResponse types matching the backend unified /me endpoint
- getUserMe() now accepts optional include[] param for selective
  module loading (?include=hackathon,qr,mentor,sessions)
- useSessionQuery() accepts include[] to control which modules load
- Fix SessionUser storage to use optional fields matching backend
- Remove hardcoded fallback values in useLogin (birthdate, gender)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:31:32 +07:00
maulanasdqnandClaude Sonnet 4.6 53ad40f3fd feat: integrate all backend APIs into frontend apps
- Fix API service paths to use /v1/iam/, /v1/dimentorin/, /v1/gacha/, /v1/hackathon/ prefixes
- Add roles, permissions, events, testimonials, sessions API services and hooks
- Rewrite gacha service with full CRUD + roll/claim endpoints
- Replace all mock data in backoffice pages with real API calls (accounts, roles, permissions, gacha-roll, dashboard, sessions, users-dimentorin, feedback-review, settings)
- Wire dimentorin mentoring list to useMentorList with search + pagination
- Wire dimentorin mentor detail page to useMentorById, pass real data to all sections
- Wire appointment modal to useBookSession with controlled schedule inputs
- Wire gacha app Spin Now to useExecuteGachaRoll, show credits and real items

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 17:08:58 +07:00
Maulana SodiqinandGitHub 8d2aaf5188 Update URLs for Backoffice, Hackathon, QR Campaign, and Infra 2026-04-02 18:10:13 +07:00
Maulana SodiqinandGitHub 3f27e8d622 Create SECURITY.md for security policy
Added a security policy document outlining supported versions and vulnerability reporting.
2026-04-02 13:57:25 +07:00
maulanasdqnandClaude Opus 4.6 629d609792 chore: remove tools/ai-migrations generated by nx migrate
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:29:00 +07:00
maulanasdqnandClaude Opus 4.6 8439c5d5e0 ci: make deploy step optional so builds don't fail if server is down
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:13:28 +07:00
maulanasdqnandClaude Opus 4.6 1afd7c014c ci: trigger test build for landing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:09:13 +07:00
maulanasdqnandClaude Opus 4.6 419335d6b3 ci: use single INFRA_DEPLOY_KEY for both GitHub and server SSH
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:06:50 +07:00