Commit Graph
381 Commits
Author SHA1 Message Date
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
maulanasdqnandClaude Opus 4.6 aef8d59c9f ci: simplify deploy - SSH into server and nixos-rebuild
Server pulls pre-built packages from Cachix, no need to build
the NixOS closure in CI. Just update flake.lock and trigger
a remote rebuild.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:30:13 +07:00
maulanasdqnandClaude Opus 4.6 e14f6d4ef7 ci: replace update-infra with clan deploy
- Update flake.lock in imphnen-infrastructure
- Deploy to Hetzner server using clan machines update
- Requires SERVER_SSH_KEY secret for server access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:27:31 +07:00
maulanasdqnandClaude Opus 4.6 aa3e935fee docs: restore logo in README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:20:40 +07:00
maulanasdqnandClaude Opus 4.6 1100d6f417 docs: update README to reflect current project structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:13:04 +07:00
maulanasdqnandClaude Opus 4.6 54ebcf1a1e docs: update CLAUDE.md with project architecture and conventions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:04:03 +07:00
maulanasdqnandClaude Opus 4.6 9dabbb625d fix(nix): update npmDepsHash after dependency upgrades
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:00:29 +07:00
maulanasdqnandClaude Opus 4.6 3f4461c65c chore: upgrade dependencies, restructure shared libs, and fix UI
- Upgrade Nx 22.1.1 → 22.6.3 and all patch/minor dependencies
- Restructure shared libs: move business logic from utils to service
- Consolidate shadcn-ui into ui lib with atomic design pattern
- Fix container centering for landing app (Tailwind v4 compatibility)
- Fix button styling by updating @source directive in globals.css
- Fix SiCss3 → SiCss rename in react-icons 5.6
- Fix duplicate useSession export conflict
- Remove dead code, comments, and unused files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 01:44:17 +07:00
maulanasdqnandClaude Opus 4.6 f68d97188c ci: only build affected apps using nx affected + matrix strategy
Skip unchanged apps to speed up CI. Uses nx affected to detect
which apps need rebuilding, then runs nix builds in parallel
via GitHub Actions matrix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 23:32:18 +07:00
maulanasdqnandClaude Opus 4.6 f882668e7f ci: update infra flake.lock on merge to develop
After building and pushing to Cachix, the CI now clones
imphnen-infrastructure and updates its flake.lock to point
to the latest frontend service commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 23:21:58 +07:00
Maulana SodiqinandGitHub dab4fa4941 Delete .direnv directory 2026-03-30 23:10:03 +07:00
maulanasdqnandClaude Opus 4.6 bbb1bae909 chore: migrate to Nix flakes, remove Docker and legacy configs
Remove all Docker files, Vercel config, Verdaccio, and old CI workflow.
Standardize on nodejs_22 across devShell and nix build helpers.
Update CI to build all packages and push to Cachix on merge to develop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 23:05:37 +07:00