Commit graph

66 commits

Author SHA1 Message Date
Tracewebstudio Dev
f386b0c298 chore: checkpoint workspace updates 2026-04-26 23:58:43 +02:00
Tracewebstudio Dev
35abb6e7aa fix: add Authorization header to all dashboard apiFetch calls; change Buy Credits/Buy Now buttons to BTN_ORANGE 2026-04-22 01:32:43 +02:00
Tracewebstudio Dev
6a4688c854 style: match role dashboard UI to admin solid dashboard - card padding 14px radius 16px, input height 36px, label 11px uppercase, tab underline style, title 18px #111827 2026-04-22 01:26:36 +02:00
Tracewebstudio Dev
188de040ae fix: MyDashboardPage reads role from URL directly, skips stale prop closure; loadRoleBundle uses auth; no fallback config fetch 2026-04-22 01:13:56 +02:00
Tracewebstudio Dev
f1e46e35e7 fix: RequireAuth hydration mismatch using Show component
- Use module-level signal for clientReady to persist across re-renders
- Use Show component for reactive rendering instead of manual null returns
- createEffect handles redirect when client is ready but no token
- onMount sets clientReady after hydration completes
- Dashboard now shows correct TUTOR role sidebar with Leads/My Responses
- Playwright test verifies TUTOR dashboard renders with correct sidebar items
2026-04-22 00:54:08 +02:00
Tracewebstudio Dev
aa79b30465 fix: RequireAuth hydration mismatch and role resolution
- RequireAuth: use setTimeout to defer clientReady=true until after hydration completes, preventing SSR/client mismatch
- dashboard.tsx: add SSR guard to return empty div on server
- playwright tests for dashboard role verification
2026-04-22 00:36:12 +02:00
Tracewebstudio Dev
87a741540b fix: RequireAuth no fallback UI, client-only check 2026-04-21 23:58:09 +02:00
Tracewebstudio Dev
1990b5c99d fix: remove RequireAuth render-time loading spinner causing SSR/hydration mismatch
The loading spinner in RequireAuth caused a hydration error: on SSR the session was available so children rendered, but during client hydration session.loading was true so the spinner rendered instead, causing DOM mismatch (null nextSibling).

Also includes role resolution priority fixes from previous session:
- prefer preferredRole when backendRole is JOB_SEEKER but preferredRole is not
- pass role via URL param to dashboard
- urlRoleLocked signal prevents auth effects from overriding URL role
2026-04-21 23:56:19 +02:00
Tracewebstudio Dev
159b051ac8 fix: resolve role resolution priority - backend roles override localStorage
- login.tsx: pass role via URL param to dashboard instead of relying on localStorage
- dashboard.tsx: add urlRoleLocked signal to prevent auth effects from overriding URL-passed role
- auth.tsx: trust passed-in role over re-reading from localStorage in saveUser
2026-04-21 21:50:57 +02:00
Tracewebstudio Dev
bb6db6c166 fix: correct API endpoint paths from /api/gateway/api to /api
- signup.tsx: fix check-email, register, verify-email, resend-otp paths
- login.tsx: fix check-email, login, resend-otp, verify-email paths
- forgot-password.tsx: fix forgot-password, reset-password paths
- contact.tsx: fix support/tickets path

The gateway expects /api/auth/... but frontend was calling /api/gateway/api/auth/...
2026-04-17 17:00:10 +02:00
Tracewebstudio Dev
34f46f09bd fix: route auth register via gateway proxy 2026-04-17 11:56:08 +02:00
Tracewebstudio Dev
152f918a7b fix(auth): correct resend-otp API endpoint path
- Change from /api/gateway/api/auth/resend-otp to /api/auth/resend-otp
- Fix in signup.tsx and login.tsx
- Gateway already proxies /api/auth/* to users service
2026-04-16 17:29:46 +02:00
Tracewebstudio Dev
6f31fb06a5 fix(signup): send first_name and last_name instead of full_name
- Backend now expects first_name and last_name separately
- Remove full_name field from registration payload
2026-04-16 10:35:40 +02:00
Tracewebstudio Dev
fe81ce54c7 feat: add floating AI chat widget to all pages
- Add AiChatWidget component with floating button in bottom-right
- Routes to /api/ai/chat/message for chat, ticket, form, cover letter intents
- Quick action buttons for common tasks
- Appears on all public pages via app.tsx root layout
- Appears on all dashboard pages via DashboardShell
2026-04-15 20:03:47 +02:00
Tracewebstudio Dev
4c9ce597f8 fix: remove duplicate/malformed fields in ProfilePage BASIC_FIELDS 2026-04-15 14:35:19 +02:00
Tracewebstudio Dev
5922b98c93 fix: update forms to match DB schema - first_name/last_name, role keys 2026-04-15 06:23:28 +02:00
Tracewebstudio Dev
c2cbafc159 Wire external runtime preview mode and backend data in dashboard preview 2026-04-15 00:15:11 +02:00
Tracewebstudio Dev
a94498e3bf fix: update vitest config and msw v2 API, remove orphaned tests 2026-04-13 01:36:15 +02:00
Tracewebstudio Dev
e2b09c7a8b fix(frontend): preserve leading slash in gatewayUrl path reconstruction 2026-04-12 17:59:50 +02:00
Ashwin Kumar
e2c91fb413 fix(build): restore dashboard layout + api client compatibility 2026-04-10 20:20:00 +02:00
Ashwin Kumar
f32cefeab9 feat(frontend): add lead requests, accepted leads, checkout, invoice detail, notification bell
- Add Lead Requests page with filters and cancel functionality
- Add Accepted Leads page with contact details and WhatsApp integration
- Add Buy Tracecoins checkout flow with Beeceptor payment
- Add Invoice Detail page with GST breakdown
- Add NotificationBell component with 30s polling
- Add manual E2E test script
- Update Playwright tests for company verification flow
2026-04-10 03:36:26 +02:00
Ashwin Kumar
6f88aa9627 fix: Chrome rendering and scrolling issues
- Changed overflow-x: clip to overflow-x: hidden for better Chrome support
- Changed auth-layout align-items from center to start to prevent clipping
- Added overflow-y: auto and overflow-x: hidden to body for consistent scrolling

Fixes issues where header and signup form were not visible in Chrome
and users were unable to scroll.
2026-04-10 02:48:46 +02:00
Ashwin Kumar
4795ef2910 feat: wire Credits page to pricing management and payment APIs
Updated CreditsPage with full pricing and transaction support:
- Load pricing packages from /api/packages (role-specific)
- Create payment orders via /api/payments/create-order
- Display transaction history from wallet ledger + payments
- New tabbed interface: Overview, Buy Credits, Transactions
- Shows package details: name, price, tracecoins amount
- Format currency in INR with proper locale

Data sources:
- Packages: GET /api/packages?role={role_key}
- Wallet: GET /api/{prefix}/wallet/me
- Ledger: GET /api/{prefix}/wallet/me/ledger
- Payments: POST /api/payments/create-order
2026-04-10 01:38:44 +02:00
Ashwin Kumar
b242161fd7 docs: add API endpoint documentation for all role dashboard pages
Documented real backend API connections for:
- Company: Jobs, Applications, Shortlisted Candidates
- Customer: Requirements, Responses
- Professional: Leads, Responses (all profession types)
- Job Seeker: Jobs, Applications, Saved Jobs

All pages already wired to real data from backend.
2026-04-10 01:25:49 +02:00
Ashwin Kumar
30750f3797 docs: clarify real data implementations are wired to backend APIs
All job seeker pages are already connected to real APIs:
- Jobs: /api/jobseeker/jobs (real company job postings)
- Applications: /api/jobseeker/applications (my applied jobs)
- Saved Jobs: Custom data storage for bookmarked jobs
- Apply: POST /api/jobseeker/jobs/{id}/apply

Dashboard shows real data from backend, not mock preview.
2026-04-10 01:21:36 +02:00
Ashwin Kumar
7671ad8e55 feat: improve Help Center UI with mixed dark/light theme and structured content
- Updated Help Center with dark hero and light content sections
- Added ArticleContent component for rendering structured content blocks
- Updated seed data with detailed articles matching admin KB categories
- Fixed article alignment and spacing issues
- Uses ContentBlock[] instead of HTML strings for type-safe content
2026-04-09 21:52:16 +02:00
Ashwin Kumar
b8faf752e9 feat: align external dashboards, profile settings split, and role flows 2026-04-08 22:40:43 +02:00
Ashwin Kumar
f990b9a9e0 feat: comprehensive testing infrastructure (without workflow pending token scope)
- Add vitest, Playwright, ESLint, Prettier configs
- Add unit tests and e2e accessibility/visual tests
- Add MSW mocks and test setup
- Update scripts and .gitignore
- Install required dev dependencies

Note: GitHub Actions workflow will be added after token scope is granted.
2026-04-08 02:43:29 +02:00
Ashwin Kumar
86e1bbd268 fix: resolve solid-markdown build error
- Update solid-markdown from ^0.5.0 to ^2.1.1 (old version no longer exists)
- Replace Markdown component with innerHTML rendering for help center articles
- Build now succeeds without errors
2026-04-07 12:55:15 +02:00
Ashwin Kumar
d3630dbaa8 feat: use solid-markdown for Help Center article rendering
- Added solid-markdown dependency
- Replaced manual paragraph splitting with Markdown component
- Articles now render proper markdown (headings, lists, links, etc.)
- Improves readability and matches reference implementation
2026-04-06 18:39:32 +02:00
Ashwin Kumar
eee2c367ca feat: add notification bell polling to dashboard shell
- Poll /api/me/notifications/unread-count every 30 seconds
- Show orange dot badge when unread count > 0
- Matches PRD requirement for real-time notifications
2026-04-06 18:23:12 +02:00
Ashwin Kumar
bbf11b91e1 feat(dashboard): real My Profile, My Portfolio, Verification pages
- DashboardShell: sticky sidebar + header wrapper with shared style tokens
- ProfilePage: 3-tab form (Basic, Documents, Settings) per role, save/submit-for-verification
- PortfolioPage: full CRUD wired to /api/:prefix/portfolio/me endpoints
- VerificationStatusPage: 7-state status display with progress timeline and resubmit flow
- dashboard.tsx: REAL_PAGES routing intercepts these three sidebar items and renders
  real components instead of DashboardDesignPreview mock

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 17:20:48 +02:00
Ashwin Kumar
ed68a636f5 feat(dashboard): add notification bell with unread count polling
- Add unreadCount state and polling interval (30s) to DashboardDesignPreview
- Fetch from GET /api/me/notifications/unread-count with auth
- Display orange dot badge on bell when unreadCount > 0
- Uses existing bell icon in header; integrates with notifications page

Implements PRD item: Notification bell on dashboard
2026-04-06 15:06:29 +02:00
Ashwin Kumar
3703d66df5 feat: auth provider, route guards, forgot password, API client
- Add AuthProvider context, RequireAuth guard
- Create API client with endpoint helpers
- Add forgot-password route wired to backend
- Remove dummy login button, add forgot-password link
- Dashboard: RequireAuth, auth context integration
- DashboardDesignPreview: replace Beeceptor with internal payments API
- DashboardDesignPreview: add coupon state, validation, apply
- DashboardDesignPreview: credit wallet on verify, ledger entry
- DashboardDesignPreview: adjust total with discount
- misc: getToken import, API constant
- fix: token storage (use getToken)
2026-04-06 08:24:22 +02:00
Ashwin Kumar
e5406a0061 feat: add auth context, route guards, password reset, and API client
- Add AuthProvider context and RequireAuth route guard
- Create API client with all endpoint helpers
- Add forgot-password route wired to backend reset endpoints
- Remove dummy login button from login page
- Wire dashboard to auth context for user data
- Enhance profile save to send all fields
- Wire profile submit-for-verification to backend API
2026-04-06 06:19:23 +02:00
Ashwin Kumar
19a0850c49 feat: integrate dynamic help center with runtime-configured knowledge base 2026-04-06 03:33:29 +02:00
Ashwin Kumar
d008cd184d feat: improve public role pages and help center content 2026-04-06 01:47:05 +02:00
Ashwin Kumar
564a383a10 Wire user dashboard to real APIs — profile, credits, leads, requirements, jobs
- dashboard.tsx: fetch session for real user name/ID/role, fallback to
  localStorage; show dashboard with role defaults when runtime config unavailable
- DashboardDesignPreview: add liveData prop; createResource for credits,
  marketplace, lead requests, customer requirements, jobs, and profile
- Profile form: inputs now track state via profileFormData signal; pre-filled
  from GET /api/${prefix}/profile/me; Save Changes PATCHes real endpoint
- Lead actions: Send Request POSTs to /api/${prefix}/leads/request; Cancel
  DELETEs /api/${prefix}/leads/requests/{id}; both refetch after completion
- Requirement submit: POSTs to /api/customers/requirements then submits for approval
- Replace hardcoded "Alex" with real session name; credits from wallet balance API
- Fix launch.json PATH so npm is found in sh shell

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 21:13:54 +02:00
Ashwin Kumar
a8ad2b0620 chore: sync latest dashboard and role flow updates 2026-04-05 16:52:02 +02:00
Ashwin Kumar
9ba3adda64 Add form validation to all dashboard forms
- form-validation.ts: new validators (isValidPhone, isValidTitle, isValidDescription,
  isValidLocation, isValidPrice, isValidBudget, isValidSalaryRange, isValidDuration,
  isValidTags, isValidFullName)
- portfolio/index.tsx: title (3–255), description (optional 10+), tags (≤40 chars, max 20)
- settings.tsx: full_name, phone (Indian 10-digit), location, bio (≤500), password strength meter
- jobs/create.tsx: title (5–200), description (20+), location, salary range, experience, skills
- requirements/index.tsx: title, description, location, budget (optional), preferred date
- services/index.tsx: name (3–255), price (positive), duration (optional 1–1440), description (≤1000)
- All forms: VNote inline component (✓ orange / • gray), submitted signal prevents premature errors,
  red borders on invalid fields post-submit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 22:55:56 +02:00
Ashwin Kumar
64ec515393 Add wallet invoices page
- wallet/invoices.tsx: table of invoices with download link; uses role-specific API prefix; handles loading/empty states

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 18:14:10 +02:00
Ashwin Kumar
f5d294abbf Add unread notification badge and poll to dashboard layout
- Import onCleanup, getAuthHeader in DashboardLayout
- Poll /api/me/notifications every 60s for unread_count
- Show orange badge on bell icon when unread > 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 18:13:14 +02:00
Ashwin Kumar
bcb940f3f1 Update buy and packages pages to load real data from API
- wallet/buy.tsx: createResource fetches /api/packages?role= instead of hardcoded bundles
- packages.tsx: replaced stub with real package list from API; shows type badge, price, tracecoin amount

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 18:11:54 +02:00
Ashwin Kumar
3209d13011 feat: wire help center and article pages to live KB API
- help-center.ts: replace static HELP_ARTICLES array with async fetch* functions (fetchHelpCenterArticles, fetchHelpCenterCategories, fetchArticleBySlug); legacy sync shims kept for safety
- support/index.tsx: switched from createMemo(static) to createResource(async API) with loading states
- help-center/article/[slug].tsx: now fetches article from API via createResource; renders paragraphs split by double-newline; proper loading and not-found states
- New server-side API routes: /api/kb/articles, /api/kb/categories, /api/kb/articles/[slug] (proxy to Rust gateway, no auth required)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 13:36:16 +02:00
Ashwin Kumar
055dcd4175 feat(admin): wire management modules to live backend and add UGC role 2026-04-02 13:09:45 +02:00
Ashwin Kumar
8d7cd3b9ef Refactor admin routes and add Storybook/Vitest setup 2026-03-26 06:18:07 +01:00
Ashwin Kumar
c14bf111a8 chore: cleanup — remove legacy redirect shims and localStorage token storage
- Delete 19 redirect alias pages (sign-in/signin/sign-up/signup, /users/* aliases,
  /companies/* aliases, /users/onboarding/* aliases) — legacy Next.js migration
  artifacts that are no longer needed
- Remove localStorage token functions (getAccessToken, setTokens, clearTokens,
  fetchWithAuth) from lib/http.ts — violates memory-only token strategy
- Fix auth/verification: replace setTokens + manual fetch with login() from auth.ts
- Fix ProfileWidget: replace fetchWithAuth with plain fetch (calls server routes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 23:42:43 +01:00
Ashwin Kumar
f16c7eb4dd feat: add users and companies dashboard route surfaces 2026-03-25 22:13:11 +01:00
Ashwin Kumar
0996f12227 Wire department and designation management to module CRUD backend 2026-03-25 21:32:03 +01:00
Ashwin Kumar
94d4623248 feat(admin): implement figma-aligned admin shell and management modules 2026-03-25 15:45:14 +01:00