Dashboard and Resume Management
Relevant source files
The following files were used as context for generating this wiki page:
- apps/frontend/app/(default)/dashboard/page.tsx
- apps/frontend/components/dashboard/resume-upload-dialog.tsx
- apps/frontend/hooks/use-file-upload.ts
- apps/frontend/lib/api/resume.ts
- AGENTS.md
- apps/frontend/app/(default)/tailor/page.tsx
- apps/frontend/messages/en.json
- apps/frontend/components/builder/resume-builder.tsx
The Dashboard is the central hub for managing all resumes within the Resume Matcher application. It serves as the primary interface for users to upload, view, edit, tailor, and delete their master and tailored resumes. From this page, users can initiate all key workflows related to resume creation and optimization.
The system is designed to handle a list of resumes, each with its own set of actions. The dashboard provides a clear overview of all existing documents, their modification dates, and their status. It also features an important state management mechanism where the resume list auto-refreshes upon window focus, ensuring that any changes (like deletions from other pages) are immediately reflected.
Sources: apps/frontend/app/(default)/dashboard/page.tsx, AGENTS.md
Dashboard UI Overview
The main dashboard page is responsible for fetching and rendering the list of user resumes. It presents a clean interface with options to create new resumes or manage existing ones.
The key UI elements on the dashboard are:
| Element | Description | Source File |
|---|---|---|
| My Resumes | The main list that displays all fetched resumes. | apps/frontend/app/(default)/dashboard/page.tsx:103-128 |
| Upload Resume | A button that opens a dialog to upload a new master resume. | apps/frontend/app/(default)/dashboard/page.tsx:98-100 |
| Resume Card | An individual entry for a resume, showing its name and modification date. | apps/frontend/app/(default)/dashboard/page.tsx:106-113 |
| Action Menu | A dropdown menu for each resume with actions like "View", "Edit", "Tailor", and "Delete". | apps/frontend/app/(default)/dashboard/page.tsx:114-126 |
Sources: apps/frontend/app/(default)/dashboard/page.tsx, apps/frontend/messages/en.json:16-29
Resume Listing and Data Structure
Resumes are fetched from the backend using the fetchResumeList function. This function calls the /api/v1/resumes/list endpoint and returns an array of ResumeListItem objects.
Sources: apps/frontend/lib/api/resume.ts:110-117
The following diagram illustrates the data fetching flow for the resume list.
The ResumeListItem interface defines the structure for each resume object displayed on the dashboard.
| Property | Type | Description |
|---|---|---|
resume_id | string | The unique identifier for the resume. |
filename | string | null | The original filename of the uploaded resume. |
is_master | boolean | Flag indicating if it is a master resume. |
parent_id | string | null | The ID of the master resume if this is a tailored version. |
processing_status | 'pending' | 'processing' | 'ready' | 'failed' | The current status of the resume processing. |
created_at | string | The creation timestamp. |
updated_at | string | The last modification timestamp. |
Sources: apps/frontend/lib/api/resume.ts:65-73
Core Workflows
Resume Upload
The resume upload process is initiated from the ResumeUploadDialog component. This flow is managed by the useFileUpload custom hook, which encapsulates the logic for file selection, validation, and API communication.
The upload process follows these steps:
- The user clicks the "Upload Resume" button, which opens the
ResumeUploadDialog. - The user selects a file (PDF or DOCX).
- The
useFileUploadhook validates the file type and size. - If valid, the hook initiates an API call to the
/api/v1/resumes/uploadendpoint. - Upon a successful upload, the dialog closes, and the dashboard refreshes its list to show the new resume.
Sources: apps/frontend/components/dashboard/resume-upload-dialog.tsx, apps/frontend/hooks/use-file-upload.ts
This sequence diagram shows the resume upload flow.
Resume Actions
For each resume listed, a set of actions is available through a dropdown menu.
| Action | Description | Target Page/Flow |
|---|---|---|
| View / Edit Resume | Navigates the user to the Resume Builder to view or edit the resume's content. | /resumes/{resume_id} |
| Tailor for Job | Initiates the resume tailoring workflow. It stores the selected resume's ID as the master_resume_id in localStorage and redirects the user to the Tailor page. | /tailor |
| Download PDF | Triggers a download of the resume as a PDF file by calling the downloadResumePdf API function. | API call to /resumes/{resume_id}/pdf |
| Delete Resume | Opens a confirmation dialog. If confirmed, it calls the deleteResume API function and removes the resume from the list. | API call to /resumes/{resume_id} |
Sources: apps/frontend/app/(default)/dashboard/page.tsx:60-89, apps/frontend/lib/api/resume.ts:153-191, 194-201, apps/frontend/messages/en.json:113-114
Tailor for Job Flow
The "Tailor for Job" action is a critical workflow that connects a master resume to a new job description.
Delete Resume Flow
The delete action includes a confirmation step to prevent accidental data loss.
State Management
A key feature of the dashboard is its ability to stay in sync with the application state. It uses a useEffect hook with a focus event listener on the window object. When the user navigates back to the dashboard tab or window, the fetchResumes function is re-triggered, ensuring the displayed list is always up-to-date. This is particularly useful after a resume has been deleted from the builder page.
Sources: apps/frontend/app/(default)/dashboard/page.tsx:50-57, AGENTS.md
Conclusion
The Dashboard and Resume Management system is the foundational component of the user experience in Resume Matcher. It provides a robust and intuitive interface for managing the lifecycle of resumes, from initial upload to final tailoring and export. The clear separation of concerns between UI components, API services, and custom hooks results in a maintainable and scalable system for handling all resume-related operations.