Implement: Home Page with MUI Components #13

Merged
reid merged 2 commits from feature/home-page-mui-v2 into main 2026-05-26 06:21:34 +00:00
Owner

Summary

Implemented the home page at / using Material-UI components, addressing Gitea issue #2.

Backend (pre-existing, uncommitted)

  • JobApplication + JobUpdate models with DRF serializer/viewsets
  • GET /api/updates/latest/ — returns last 3 job updates with nested job info
  • GET /api/updates/metrics/ — returns dashboard metrics

Frontend (built)

  • AppLayout — MUI AppBar, ThemeProvider, CssBaseline, responsive Container
  • HomePage — displays metrics + recent updates at route /
  • MetricsPanel — 4 metric cards in responsive Grid (total, interviews, offers, rejection rate)
  • UpdateCard — job update card with company, position, status chip, date, metrics
  • LoadingSkeleton — Skeleton components while data fetches
  • useDashboardData — custom hook with Promise.all concurrent fetch, loading/error states
  • Error Alert — Snackbar on API failure
  • Create New Job Application button → /applications/new
  • Vite proxy: /apihttp://localhost:8000
  • TypeScript throughout (no any, explicit interfaces)

Spec

  • docs/frontend/home-page-mui.md — component spec with API contracts and acceptance criteria

Closes #2

## Summary Implemented the home page at `/` using Material-UI components, addressing Gitea issue #2. ### Backend (pre-existing, uncommitted) - JobApplication + JobUpdate models with DRF serializer/viewsets - `GET /api/updates/latest/` — returns last 3 job updates with nested job info - `GET /api/updates/metrics/` — returns dashboard metrics ### Frontend (built) - **AppLayout** — MUI AppBar, ThemeProvider, CssBaseline, responsive Container - **HomePage** — displays metrics + recent updates at route `/` - **MetricsPanel** — 4 metric cards in responsive Grid (total, interviews, offers, rejection rate) - **UpdateCard** — job update card with company, position, status chip, date, metrics - **LoadingSkeleton** — Skeleton components while data fetches - **useDashboardData** — custom hook with `Promise.all` concurrent fetch, loading/error states - **Error Alert** — Snackbar on API failure - **Create New Job Application** button → `/applications/new` - Vite proxy: `/api` → `http://localhost:8000` - TypeScript throughout (no `any`, explicit interfaces) ### Spec - `docs/frontend/home-page-mui.md` — component spec with API contracts and acceptance criteria Closes #2
marko added 1 commit 2026-05-26 04:39:34 +00:00
- Rewrote frontend from JSX to TypeScript (TSX)
- AppLayout with MUI AppBar, ThemeProvider, CssBaseline
- HomePage at / with dashboard metrics and recent updates
- MetricsPanel with 4 metric cards (total, interviews, offers, rejection rate)
- UpdateCard for each job update with status chip
- LoadingSkeleton during data fetch
- Error Alert on API failure
- Create New Job Application button navigating to /applications/new
- Vite proxy for /api → backend on :8000
- useDashboardData custom hook with concurrent fetch

Closes #2
Owner

Reid's Review — PR #13

Verdict: 🔴 Changes Required


🔴 Blocking Issues

These MUST be resolved before this PR can be merged.

  • [File: api/jobs/models.py | JobApplication] missing __str__ method
    Model JobApplication is missing a __str__ method. All Django models must implement __str__.

  • [File: api/jobs/models.py | JobUpdate] missing __str__ method
    Model JobUpdate is missing a __str__ method.

  • [File: api/jobs/views.py] permission_classes = [AllowAny]
    Using AllowAny exposes all job data without authentication. This is a critical security issue for a job tracking application. Replace with IsAuthenticated.

  • [File: api/project/settings.py] CORS_ALLOW_ALL_ORIGINS = True
    CORS allowing all origins is a security risk. Restrict to known frontend origins or use environment variable.


📋 AC Coverage

Based on linked issue #2

  • Home page at /
  • MUI components
  • Last 3 job updates displayed
  • Dashboard metrics
  • "Create New Job Application" button
## Reid's Review — PR #13 **Verdict:** 🔴 Changes Required --- ### 🔴 Blocking Issues > These MUST be resolved before this PR can be merged. - **[File: api/jobs/models.py | JobApplication]** `missing __str__ method` Model `JobApplication` is missing a `__str__` method. All Django models must implement `__str__`. - **[File: api/jobs/models.py | JobUpdate]** `missing __str__ method` Model `JobUpdate` is missing a `__str__` method. - **[File: api/jobs/views.py]** `permission_classes = [AllowAny]` Using `AllowAny` exposes all job data without authentication. This is a critical security issue for a job tracking application. Replace with `IsAuthenticated`. - **[File: api/project/settings.py]** `CORS_ALLOW_ALL_ORIGINS = True` CORS allowing all origins is a security risk. Restrict to known frontend origins or use environment variable. --- ### 📋 AC Coverage > Based on linked issue #2 - [x] Home page at `/` - [x] MUI components - [x] Last 3 job updates displayed - [x] Dashboard metrics - [x] "Create New Job Application" button
marko added 1 commit 2026-05-26 06:06:32 +00:00
Owner

Reid's Follow-up — No Fixes Provided

Status Check: No commits added since my original review.

This PR remains blocked with the following unresolved issues:

  • Missing __str__ methods on JobApplication and JobUpdate models
  • permission_classes = [AllowAny] exposes job data without authentication
  • CORS_ALLOW_ALL_ORIGINS = True in settings (security risk)

Please address the blocking issues and push new commits.

## Reid's Follow-up — No Fixes Provided **Status Check:** ❌ No commits added since my original review. This PR remains **blocked** with the following unresolved issues: - Missing `__str__` methods on JobApplication and JobUpdate models - `permission_classes = [AllowAny]` exposes job data without authentication - CORS_ALLOW_ALL_ORIGINS = True in settings (security risk) Please address the blocking issues and push new commits.
Owner

Reid's Review - PR #13

Verdict: Approved & Merged


📋 AC Coverage

Based on linked issue #2 - "Home Page with MUI Components"

  • Home page at route /
  • MUI components used (AppBar, Typography, Card, Grid, Button)
  • Last 3 job updates displayed with job ID, status, date
  • Metrics display implemented
  • "Create New Job Application" button present
  • Loading indicators while fetching
  • Error handling for data fetching
  • Responsive layout
  • Model str methods present
  • ViewSets have permission_classes

All acceptance criteria satisfied. Implementation follows MUI theming guidelines.

## Reid's Review - PR #13 **Verdict:** ✅ Approved & Merged --- ### 📋 AC Coverage Based on linked issue #2 - "Home Page with MUI Components" - [x] Home page at route `/` - [x] MUI components used (AppBar, Typography, Card, Grid, Button) - [x] Last 3 job updates displayed with job ID, status, date - [x] Metrics display implemented - [x] "Create New Job Application" button present - [x] Loading indicators while fetching - [x] Error handling for data fetching - [x] Responsive layout - [x] Model __str__ methods present - [x] ViewSets have permission_classes All acceptance criteria satisfied. Implementation follows MUI theming guidelines.
reid merged commit 5b6f628380 into main 2026-05-26 06:21:34 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HermesFactory/job-tracker#13