### Install Dependencies Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Install all necessary project dependencies using npm. This command should be run after cloning the repository. ```bash npm install ``` -------------------------------- ### Clone and Run JobSync with Docker Compose Source: https://github.com/gsync/jobsync/blob/main/README.md Use these commands to clone the JobSync repository and start the application using Docker Compose. Ensure Docker is installed and running before execution. ```sh git clone https://github.com/Gsync/jobsync.git cd jobsync docker compose up ``` -------------------------------- ### Branch Naming Convention Examples Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Examples of branch names adhering to the project's naming convention. Prefixes indicate the type of change. ```bash feat/add-resume-export fix/automation-rate-limit docs/update-api-routes refactor/ai-provider-cleanup test/task-actions-coverage ``` -------------------------------- ### Set Up Environment Variables Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Copy the example environment file to create your local environment configuration. You will need to fill in your specific values. ```bash cp .env.example .env ``` -------------------------------- ### POST /api/activity/create Source: https://context7.com/gsync/jobsync/llms.txt Creates a new activity record and starts tracking its duration. ```APIDOC ## POST /api/activity/create ### Description Creates a new activity record with duration tracking. ### Method POST ### Endpoint /api/activity/create ### Parameters #### Request Body - **activityName** (string) - Required - The name of the activity. - **activityType** (string) - Required - The ID of the activity type. - **startTime** (DateTime) - Required - The start time of the activity. - **endTime** (DateTime) - Optional - The end time of the activity. If not provided, the activity is considered ongoing. - **duration** (integer) - Optional - The duration of the activity in minutes. Calculated if endTime is provided. - **description** (string) - Optional - A description of the activity. ### Request Example ```json { "activityName": "Applied to jobs", "activityType": "activity-type-uuid", "startTime": "2024-01-20T09:00:00.000Z", "endTime": "2024-01-20T11:30:00.000Z", "duration": 150, "description": "Applied to 5 software engineering positions" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **activity** (object) - The created activity record, including its ID. #### Response Example ```json { "success": true, "activity": { "id": "activity-uuid", "/* ... other activity details */" } } ``` ``` -------------------------------- ### Conventional Commits Examples Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Examples of commit messages following the Conventional Commits specification. Use these to ensure consistency in commit history. ```bash feat(automations): add rate limiting for manual runs fix(tasks): prevent deletion of tasks with linked activities docs: update environment variable list in README refactor(ai): extract preprocessing into dedicated module test(job-actions): add coverage for edge cases ``` -------------------------------- ### Start Development Server Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Launch the local development server to run JobSync. This command is used for active development and testing changes. ```bash npm run dev ``` -------------------------------- ### POST /api/activity/start/:previousActivityId Source: https://context7.com/gsync/jobsync/llms.txt Starts a new activity timer by copying the name and type from a previous activity. ```APIDOC ## POST /api/activity/start/:previousActivityId ### Description Starts a new activity timer based on a previous activity (copies name and type). ### Method POST ### Endpoint /api/activity/start/:previousActivityId ### Parameters #### Path Parameters - **previousActivityId** (string) - Required - The ID of the previous activity to base the new one on. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **newActivity** (object) - The newly created and started activity record. #### Error Response (400) - **success** (boolean) - Indicates failure. - **message** (string) - Error message, e.g., "An activity is already in progress. Stop it before starting a new one." #### Response Example (Success) ```json { "success": true, "newActivity": { "id": "new-activity-uuid", "activityName": "Applied to jobs", "startTime": "2024-01-20T14:00:00.000Z", "endTime": null, "activityType": { "label": "Job Search", "value": "job-search" } } } ``` #### Response Example (Error) ```json { "success": false, "message": "An activity is already in progress. Stop it before starting a new one." } ``` ``` -------------------------------- ### GET /gsync/user-settings Source: https://context7.com/gsync/jobsync/llms.txt Retrieves the current user's settings, including AI preferences and display options. ```APIDOC ## GET /gsync/user-settings ### Description Retrieves user settings including AI and display preferences. ### Method GET ### Endpoint /gsync/user-settings ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains the user's settings. - **userId** (string) - The unique identifier of the user. - **settings** (object) - The user's configuration settings. - **ai** (object) - AI-related settings. - **provider** (string) - The AI provider (e.g., "ollama"). - **model** (string) - The AI model being used (e.g., "llama3.2"). - **temperature** (number) - The temperature setting for AI generation. - **display** (object) - Display-related settings. - **theme** (string) - The UI theme (e.g., "system"). - **recordsPerPage** (number) - The number of records to display per page. #### Response Example ```json { "success": true, "data": { "userId": "user-uuid", "settings": { "ai": { "provider": "ollama", "model": "llama3.2", "temperature": 0.3 }, "display": { "theme": "system", "recordsPerPage": 10 } } } } ``` ``` -------------------------------- ### Create New Activity Record Source: https://context7.com/gsync/jobsync/llms.txt Logs a new activity with start and end times, and calculates duration. Requires activity name, type, and time range. ```typescript import { createActivity } from "@/actions/activity.actions"; const activity = { activityName: "Applied to jobs", activityType: "activity-type-uuid", // ActivityType ID startTime: new Date("2024-01-20T09:00:00"), endTime: new Date("2024-01-20T11:30:00"), duration: 150, // minutes description: "Applied to 5 software engineering positions" }; const result = await createActivity(activity); // Response { success: true, activity: { id: "activity-uuid", ... } } ``` -------------------------------- ### GET /gsync/jobsync/notes/{jobId} Source: https://context7.com/gsync/jobsync/llms.txt Retrieves all notes associated with a specific job application. ```APIDOC ## GET /gsync/jobsync/notes/{jobId} ### Description Retrieves all notes for a specific job. ### Method GET ### Endpoint /gsync/jobsync/notes/{jobId} ### Path Parameters - **jobId** (string) - Required - The unique identifier of the job application. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (array) - A list of note objects. - **id** (string) - The unique identifier of the note. - **content** (string) - The content of the note. - **createdAt** (string) - The timestamp when the note was created. - **updatedAt** (string) - The timestamp when the note was last updated. - **isEdited** (boolean) - Flag indicating if the note has been edited. #### Response Example ```json { "success": true, "data": [ { "id": "note-uuid-1", "content": "Technical interview went well", "createdAt": "2024-01-22T10:00:00.000Z", "updatedAt": "2024-01-22T10:00:00.000Z", "isEdited": false }, { "id": "note-uuid-2", "content": "Initial phone screen notes (updated)", "createdAt": "2024-01-20T15:30:00.000Z", "updatedAt": "2024-01-21T09:00:00.000Z", "isEdited": true } ] } ``` ``` -------------------------------- ### GET /gsync/companies Source: https://context7.com/gsync/jobsync/llms.txt Retrieves a paginated list of companies, sorted by the number of job applications associated with them. ```APIDOC ## GET /gsync/companies ### Description Retrieves paginated companies sorted by number of job applications. ### Method GET ### Endpoint /gsync/companies ### Query Parameters - **page** (number) - Required - The page number for pagination. - **limit** (number) - Required - The number of items per page. - **sortBy** (string) - Required - The field to sort by (e.g., "applied"). ### Response #### Success Response (200) - **data** (array) - A list of company objects. - **id** (string) - The unique identifier of the company. - **label** (string) - The display name of the company. - **value** (string) - A normalized value for the company name. - **logoUrl** (string) - The URL of the company's logo. - **_count** (object) - Contains counts related to the company. - **jobsApplied** (number) - The number of job applications for this company. - **total** (number) - The total number of companies available. #### Response Example ```json { "data": [ { "id": "company-uuid", "label": "Acme Corporation", "value": "acme corporation", "logoUrl": "https://example.com/acme-logo.png", "_count": { "jobsApplied": 5 } } ], "total": 25 } ``` ``` -------------------------------- ### GET /api/activity/current Source: https://context7.com/gsync/jobsync/llms.txt Retrieves the currently running activity for the authenticated user. ```APIDOC ## GET /api/activity/current ### Description Retrieves the currently running activity (if any) for the authenticated user. ### Method GET ### Endpoint /api/activity/current ### Response #### Success Response (200) - **success** (boolean) - Indicates if an activity is running. - **activity** (object) - The currently running activity details (if success is true). #### Response Example (Activity Running) ```json { "success": true, "activity": { "id": "activity-uuid", "activityName": "Code review", "startTime": "2024-01-20T14:00:00.000Z", "activityType": { "label": "Development", "value": "development" } } } ``` #### Response Example (No Activity Running) ```json { "success": false } ``` ``` -------------------------------- ### Sync Fork with Upstream Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Update your local `dev` branch with the latest changes from the upstream repository. This should be done before starting new work. ```bash git fetch upstream git checkout dev git merge upstream/dev ``` -------------------------------- ### GET /gsync/jobsync/activity/top-types Source: https://context7.com/gsync/jobsync/llms.txt Retrieves the top 3 activity types based on total duration over a specified period. ```APIDOC ## GET /gsync/jobsync/activity/top-types ### Description Gets the top 3 activity types by total duration for a period. ### Method GET ### Endpoint /gsync/jobsync/activity/top-types ### Query Parameters - **periodDays** (number) - Required - The number of past days to consider for calculating top activities. ### Response #### Success Response (200) - **label** (string) - The name of the activity type. - **hours** (number) - The total duration in hours for that activity type. #### Response Example ```json [ { "label": "Job Search", "hours": 45.5 }, { "label": "Interview Prep", "hours": 22.0 }, { "label": "Networking", "hours": 15.5 } ] ``` ``` -------------------------------- ### GET /api/activity/list Source: https://context7.com/gsync/jobsync/llms.txt Fetches a paginated list of completed activities, with optional filtering by activity type. ```APIDOC ## GET /api/activity/list ### Description Retrieves paginated list of completed activities. ### Method GET ### Endpoint /api/activity/list ### Parameters #### Query Parameters - **page** (integer) - Required - The page number to retrieve. - **limit** (integer) - Required - The number of activities per page. - **activityTypeFilter** (string) - Optional - A filter for activity type (e.g., "job search"). ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (array) - An array of completed activity objects. - **total** (integer) - The total number of activities available. #### Response Example ```json { "success": true, "data": [ { "id": "activity-uuid", "activityName": "Job search and applications", "startTime": "2024-01-20T09:00:00.000Z", "endTime": "2024-01-20T11:30:00.000Z", "duration": 150, "description": "Applied to multiple positions", "activityType": { "id": "type-uuid", "label": "Job Search", "value": "job-search" } } ], "total": 25 } ``` ``` -------------------------------- ### Start Activity Timer from Previous Source: https://context7.com/gsync/jobsync/llms.txt Initiates a new activity timer by copying the name and type from a specified previous activity ID. Useful for resuming or continuing similar tasks. ```typescript import { startActivityById } from "@/actions/activity.actions"; const result = await startActivityById("previous-activity-uuid"); // Response on success { success: true, newActivity: { id: "new-activity-uuid", activityName: "Applied to jobs", startTime: "2024-01-20T14:00:00.000Z", endTime: null, // running activityType: { label: "Job Search", value: "job-search" } } } // Response if another activity is running { success: false, message: "An activity is already in progress. Stop it before starting a new one." } ``` -------------------------------- ### Get Currently Running Activity Source: https://context7.com/gsync/jobsync/llms.txt Retrieves the details of the activity that is currently active for the user. Returns success: false if no activity is running. ```typescript import { getCurrentActivity } from "@/actions/activity.actions"; const result = await getCurrentActivity(); // Response when activity is running { success: true, activity: { id: "activity-uuid", activityName: "Code review", startTime: "2024-01-20T14:00:00.000Z", activityType: { label: "Development", value: "development" } } } // Response when no activity is running { success: false } ``` -------------------------------- ### Start Timer from Task Source: https://context7.com/gsync/jobsync/llms.txt Initiates a new activity timer linked to a specific task. This function will return an error if the task already has an active linked activity or if another activity is currently running. ```typescript import { startActivityFromTask } from "@/actions/task.actions"; const result = await startActivityFromTask("task-uuid"); // Response on success { success: true, data: { id: "activity-uuid", activityName: "Update resume", startTime: "2024-01-20T14:00:00.000Z", endTime: null, taskId: "task-uuid", activityType: { label: "Resume Work" } } } // Response if task already has linked activity { success: false, message: "Task already has a linked activity." } // Response if another activity is running { success: false, message: "You already have a running activity. Please stop it before starting a new one." } ``` -------------------------------- ### Initialize and Migrate Database Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Set up the database schema using Prisma. This command applies migrations to your local database. ```bash npx prisma migrate dev ``` -------------------------------- ### Clone and Set Up JobSync Repository Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Clone your fork of the JobSync repository and set up the upstream remote. This is the initial step for local development. ```bash git clone https://github.com//jobsync.git cd jobsync git remote add upstream https://github.com/Gsync/jobsync.git ``` -------------------------------- ### Create New User Account with signup Source: https://context7.com/gsync/jobsync/llms.txt Use this action to create a new user account. It requires name, email, and password. Returns success or an error message for duplicate emails. ```typescript import { signup } from "@/actions/auth.actions"; // Create a new user account const result = await signup({ name: "John Doe", email: "john@example.com", password: "securePassword123" }); // Response on success { success: true } // Response on error (duplicate email) { error: "An account with this email already exists." } ``` -------------------------------- ### Database Schema Changes Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Commands to generate Prisma client and apply database migrations. Run these after any schema modification. ```bash npx prisma generate ``` ```bash npx prisma migrate dev ``` -------------------------------- ### GET /gsync/jobsync/activity/calendar Source: https://context7.com/gsync/jobsync/llms.txt Retrieves job application and activity data for the past year, formatted for calendar heatmap visualization. ```APIDOC ## GET /gsync/jobsync/activity/calendar ### Description Gets job application and activity data for the past year, suitable for calendar heatmap visualization. ### Method GET ### Endpoint /gsync/jobsync/activity/calendar ### Response #### Success Response (200) - **[Year]** (object) - An object where keys are years (e.g., "2024"). - **day** (string) - The date in YYYY-MM-DD format. - **value** (number) - A metric representing activity on that day (e.g., number of applications). - **hours** (number) - Total hours spent on activities for that day. #### Response Example ```json { "2024": [ { "day": "2024-01-15", "value": 3, "hours": 4.5 }, { "day": "2024-01-16", "value": 5, "hours": 6.0 } // ... all days with activity ], "2023": [ // ... ] } ``` ``` -------------------------------- ### Run Linting and Tests Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Execute linting and unit tests to ensure code quality. A PR failing these checks will not be reviewed. ```bash npm run lint ``` ```bash npm run test ``` ```bash npm run test:e2e ``` -------------------------------- ### Create New Resume Source: https://context7.com/gsync/jobsync/llms.txt Creates a new resume profile. Can be used with or without a file upload. If uploading a file, ensure it's handled and the path is provided. ```typescript import { createResumeProfile, uploadFile } from "@/actions/profile.actions"; // Without file upload const result = await createResumeProfile("My New Resume", "", undefined); // With file upload (handle file separately) const file = formData.get("file") as File; const dir = "/app/uploads/resumes"; const filePath = `${dir}/${file.name}`; await uploadFile(file, dir, filePath); const resultWithFile = await createResumeProfile( "My New Resume", file.name, filePath ); // Response { success: true, data: { id: "new-resume-uuid", profileId: "profile-uuid", title: "My New Resume" } } ``` -------------------------------- ### Export Jobs to CSV Source: https://context7.com/gsync/jobsync/llms.txt Exports all job data to CSV format. This endpoint is available via a GET request. ```typescript // GET /api/jobs/export const response = await fetch("/api/jobs/export"); const csvData = await response.text(); // Response (CSV format) // id,createdAt,jobTitle,company,location,source,status,jobType,applied,appliedDate,dueDate // "abc-123","2024-01-20","Software Engineer","Acme Corp","Remote","LinkedIn","Applied","full-time",true,"2024-01-20","" // ... ``` -------------------------------- ### POST /gsync/companies Source: https://context7.com/gsync/jobsync/llms.txt Creates a new company record for job tracking purposes. ```APIDOC ## POST /gsync/companies ### Description Creates a new company record for job tracking. ### Method POST ### Endpoint /gsync/companies ### Request Body - **company** (string) - Required - The name of the company. - **logoUrl** (string) - Optional - The URL of the company's logo. ### Request Example ```json { "company": "Acme Corporation", "logoUrl": "https://example.com/acme-logo.png" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains the details of the newly created company. - **id** (string) - The unique identifier of the company. - **label** (string) - The display name of the company. - **value** (string) - A normalized value for the company name. - **logoUrl** (string) - The URL of the company's logo. #### Response Example ```json { "success": true, "data": { "id": "company-uuid", "label": "Acme Corporation", "value": "acme corporation", "logoUrl": "https://example.com/acme-logo.png" } } ``` ``` -------------------------------- ### PUT /gsync/user-settings/ai Source: https://context7.com/gsync/jobsync/llms.txt Updates the user's AI preferences, including the provider, model, and temperature settings. ```APIDOC ## PUT /gsync/user-settings/ai ### Description Updates AI provider and model settings. ### Method PUT ### Endpoint /gsync/user-settings/ai ### Request Body - **provider** (string) - Required - The AI provider to set (e.g., "openai"). - **model** (string) - Required - The AI model to use (e.g., "gpt-4o-mini"). - **temperature** (number) - Required - The temperature setting for AI generation. ### Request Example ```json { "provider": "openai", "model": "gpt-4o-mini", "temperature": 0.3 } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains the updated user settings. - **userId** (string) - The unique identifier of the user. - **settings** (object) - The user's configuration settings, including updated AI settings. #### Response Example ```json { "success": true, "data": { "userId": "user-uuid", "settings": { "ai": { "provider": "openai", "model": "gpt-4o-mini", "temperature": 0.3 }, "display": { /* unchanged */ } } } } ``` ``` -------------------------------- ### Create a New Task Source: https://context7.com/gsync/jobsync/llms.txt Use this to create a new task with a title, description, status, priority, and optional activity type. Priority ranges from 1-10, with higher numbers indicating greater importance. A due date can also be specified. ```typescript import { createTask } from "@/actions/task.actions"; const result = await createTask({ title: "Update resume for tech roles", description: "Add recent project experience and update skills section", status: "in-progress", // "in-progress" | "complete" | "cancelled" priority: 8, // 1-10, higher is more important percentComplete: 0, dueDate: new Date("2024-02-01"), activityTypeId: "activity-type-uuid" // optional }); // Response { success: true, data: { id: "task-uuid", title: "Update resume for tech roles", status: "in-progress", priority: 8, activityType: { label: "Resume Work", value: "resume-work" } } } ``` -------------------------------- ### Get Yearly Activity Calendar Data Source: https://context7.com/gsync/jobsync/llms.txt Fetches job application and activity data for the past year, formatted for calendar heatmap visualization. ```typescript import { getActivityCalendarData } from "@/actions/dashboard.actions"; const result = await getActivityCalendarData(); // Response grouped by year { "2024": [ { day: "2024-01-15", value: 3, hours: 4.5 }, { day: "2024-01-16", value: 5, hours: 6.0 }, // ... all days with activity ], "2023": [ // ... ] } ``` -------------------------------- ### Create Job Automation Source: https://context7.com/gsync/jobsync/llms.txt Sets up an automated job search that runs on a schedule. Specify search criteria, resume ID for matching, and a match threshold. ```typescript import { createAutomation } from "@/actions/automation.actions"; const result = await createAutomation({ name: "React Developer Jobs - SF", jobBoard: "jsearch", // Job board source keywords: "react developer senior", location: "San Francisco, CA", resumeId: "resume-uuid", // Resume for AI matching matchThreshold: 75, // Minimum match score to save scheduleHour: 8 // Hour (0-23) to run daily }); // Response { success: true, data: { id: "automation-uuid", name: "React Developer Jobs - SF", status: "active", nextRunAt: "2024-01-21T08:00:00.000Z", resume: { id: "resume-uuid", title: "Main Resume" } } } ``` -------------------------------- ### GET /gsync/jobsync/activity/period Source: https://context7.com/gsync/jobsync/llms.txt Retrieves weekly activity duration data, grouped by type, for the last 7 days. This data is suitable for generating bar charts. ```APIDOC ## GET /gsync/jobsync/activity/period ### Description Gets activity duration data grouped by type for the last 7 days. ### Method GET ### Endpoint /gsync/jobsync/activity/period ### Response #### Success Response (200) - **day** (string) - The day of the week and date (e.g., "Mon, Jan 15"). - **[Activity Type]** (number) - The duration in hours for a specific activity type on that day (e.g., "Job Search": 2.5). #### Response Example ```json [ { "day": "Mon, Jan 15", "Job Search": 2.5, "Resume Work": 1.0, "Networking": 0.5 }, { "day": "Tue, Jan 16", "Job Search": 3.0, "Interview Prep": 2.0 }, { "day": "Wed, Jan 17", "Job Search": 1.5 } // ... 7 days total ] ``` ``` -------------------------------- ### Get Jobs Applied Statistics Source: https://context7.com/gsync/jobsync/llms.txt Retrieves statistics on the number of jobs applied for within a specified period and the percentage change compared to the previous period. ```typescript import { getJobsAppliedForPeriod } from "@/actions/dashboard.actions"; // Get stats for last 7 days const result = await getJobsAppliedForPeriod(7); // Response { count: 12, // jobs applied in last 7 days trend: 25 // percentage change from previous period } ``` -------------------------------- ### Fetch User Resumes Source: https://context7.com/gsync/jobsync/llms.txt Retrieves a paginated list of resumes for the authenticated user. Requires page number and items per page. ```typescript import { getResumeList } from "@/actions/profile.actions"; const result = await getResumeList(1, 10); // Response { success: true, data: [ { id: "resume-uuid", profileId: "profile-uuid", FileId: "file-uuid", createdAt: "2024-01-15T00:00:00.000Z", updatedAt: "2024-01-20T00:00:00.000Z", title: "Software Engineer Resume", _count: { Job: 5 } } ], total: 3 } ``` -------------------------------- ### Get Weekly Activity Data Source: https://context7.com/gsync/jobsync/llms.txt Retrieves activity duration data grouped by type for the last 7 days, suitable for bar chart visualization. ```typescript import { getActivityDataForPeriod } from "@/actions/dashboard.actions"; const result = await getActivityDataForPeriod(); // Response - ready for bar chart [ { day: "Mon, Jan 15", "Job Search": 2.5, "Resume Work": 1.0, "Networking": 0.5 }, { day: "Tue, Jan 16", "Job Search": 3.0, "Interview Prep": 2.0 }, { day: "Wed, Jan 17", "Job Search": 1.5 }, // ... 7 days total ] ``` -------------------------------- ### Get Top Activity Types by Duration Source: https://context7.com/gsync/jobsync/llms.txt Retrieves the top 3 activity types by total duration for a specified period. Requires a number of days as input. ```typescript import { getTopActivityTypesByDuration } from "@/actions/dashboard.actions"; // Get top activities for last 30 days const result = await getTopActivityTypesByDuration(30); // Response [ { label: "Job Search", hours: 45.5 }, { label: "Interview Prep", hours: 22.0 }, { label: "Networking", hours: 15.5 } ] ``` -------------------------------- ### Fetch Complete Resume by ID Source: https://context7.com/gsync/jobsync/llms.txt Retrieves a resume with all its sections, including contact information, summary, experience, and education. Requires a resume ID. ```typescript import { getResumeById } from "@/actions/profile.actions"; const result = await getResumeById("resume-uuid"); // Response { success: true, data: { id: "resume-uuid", title: "Software Engineer Resume", ContactInfo: { firstName: "John", lastName: "Doe", headline: "Senior Software Engineer", email: "john@example.com", phone: "+1-555-123-4567", address: "San Francisco, CA" }, File: { fileName: "resume.pdf", filePath: "/uploads/resume.pdf" }, ResumeSections: [ { id: "section-uuid", sectionTitle: "Professional Summary", sectionType: "summary", summary: { content: "Experienced software engineer..." } }, { id: "section-uuid-2", sectionTitle: "Work Experience", sectionType: "experience", workExperiences: [ { jobTitle: { label: "Senior Developer" }, Company: { label: "Tech Corp" }, location: { label: "San Francisco, CA" }, startDate: "2020-01-01", endDate: null, description: "Led development of..." } ] } ] } } ``` -------------------------------- ### Get Discovered Jobs Source: https://context7.com/gsync/jobsync/llms.txt Retrieves jobs discovered by automations, with options for filtering by automation ID, discovery status, pagination, and sorting by match score or discovery date. ```typescript import { getDiscoveredJobs } from "@/actions/automation.actions"; const result = await getDiscoveredJobs({ automationId: "automation-uuid", // optional filter discoveryStatus: "pending", // "pending" | "accepted" | "dismissed" page: 1, limit: 20, sortBy: "matchScore", // "matchScore" | "discoveredAt" sortOrder: "desc" }); // Response { success: true, data: [ { id: "job-uuid", matchScore: 88, discoveryStatus: "pending", discoveredAt: "2024-01-20T08:15:00.000Z", JobTitle: { label: "Senior React Developer" }, Company: { label: "TechStartup Inc" }, Location: { label: "San Francisco, CA" }, automation: { id: "automation-uuid", name: "React Developer Jobs - SF" } } ], total: 15 } ``` -------------------------------- ### Update JobSync with Deploy Script Source: https://github.com/gsync/jobsync/blob/main/README.md Execute this command to pull the latest changes and rebuild the JobSync application. This script requires sudo privileges. ```sh curl -fsSL https://raw.githubusercontent.com/Gsync/jobsync/main/deploy.sh | sudo bash -s ``` -------------------------------- ### POST /api/profile/experience Source: https://context7.com/gsync/jobsync/llms.txt Adds a work experience entry to a specified resume section. If no sectionId is provided, a new section can be created using sectionTitle. ```APIDOC ## POST /api/profile/experience ### Description Adds a work experience entry to a resume section. ### Method POST ### Endpoint /api/profile/experience ### Parameters #### Request Body - **resumeId** (string) - Required - The ID of the resume. - **sectionId** (string) - Optional - The ID of the existing section. If null, a new section will be created. - **sectionTitle** (string) - Required if sectionId is null - The title for the new section. - **title** (string) - Required - The ID of the job title. - **company** (string) - Required - The ID of the company. - **location** (string) - Optional - The ID of the location. - **startDate** (Date) - Required - The start date of the employment. - **endDate** (Date) - Optional - The end date of the employment. Null indicates current employment. - **jobDescription** (string) - Optional - A rich text description of the job responsibilities and achievements. ### Request Example ```json { "resumeId": "resume-uuid", "sectionId": "existing-section-uuid", "sectionTitle": "Work Experience", "title": "job-title-uuid", "company": "company-uuid", "location": "location-uuid", "startDate": "2020-01-01T00:00:00.000Z", "endDate": null, "jobDescription": "

Key responsibilities and achievements...

" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains the updated resume section details. #### Response Example ```json { "success": true, "data": { "/* updated resume section */" } } ``` ``` -------------------------------- ### Job Match API - AI Resume-Job Matching Source: https://context7.com/gsync/jobsync/llms.txt Streams an AI analysis comparing a resume against a job description with match scoring. ```APIDOC ## POST /api/ai/resume/match ### Description Streams an AI analysis comparing a resume against a job description with match scoring. ### Method POST ### Endpoint /api/ai/resume/match ### Request Body - **resumeId** (string) - Required - The ID of the resume to match. - **jobId** (string) - Required - The ID of the job description to match against. - **selectedModel** (object) - Required - The AI model to use for matching. - **provider** (string) - Required - The provider of the AI model (e.g., "openai"). - **model** (string) - Required - The specific model name (e.g., "gpt-4o-mini"). ### Request Example ```json { "resumeId": "resume-uuid", "jobId": "job-uuid", "selectedModel": { "provider": "openai", "model": "gpt-4o-mini" } } ``` ### Response #### Success Response (200) - **overallMatch** (integer) - The overall match score between the resume and job. - **skillsMatch** (object) - Analysis of skill matching. - **score** (integer) - The score for skill matching. - **matched** (array of strings) - Skills present in the resume that match the job requirements. - **missing** (array of strings) - Skills required by the job but missing in the resume. - **transferable** (array of strings) - Skills that can be considered transferable to the job requirements. - **experienceMatch** (object) - Analysis of experience matching. - **score** (integer) - The score for experience matching. - **analysis** (string) - A textual analysis of the experience match. - **gaps** (array of strings) - Identified gaps in experience. - **educationMatch** (object) - Analysis of education matching. - **score** (integer) - The score for education matching. - **analysis** (string) - A textual analysis of the education match. - **recommendations** (array of strings) - Suggestions for improving the resume or application. - **applicationAdvice** (string) - General advice for the application. #### Response Example ```json { "overallMatch": 82, "skillsMatch": { "score": 85, "matched": ["JavaScript", "React", "Node.js", "PostgreSQL"], "missing": ["Kubernetes", "GraphQL"], "transferable": ["Docker experience applicable to K8s"] }, "experienceMatch": { "score": 78, "analysis": "5 years experience meets 3+ year requirement", "gaps": ["No direct team lead experience mentioned"] }, "educationMatch": { "score": 90, "analysis": "CS degree exceeds requirements" }, "recommendations": [ "Highlight containerization experience more prominently", "Add any team leadership or mentoring examples" ], "applicationAdvice": "Strong candidate - customize cover letter to address K8s gap" } ``` ``` -------------------------------- ### POST /gsync/jobsync/notes Source: https://context7.com/gsync/jobsync/llms.txt Adds a new note associated with a specific job application. ```APIDOC ## POST /gsync/jobsync/notes ### Description Adds a note to a specific job application. ### Method POST ### Endpoint /gsync/jobsync/notes ### Request Body - **jobId** (string) - Required - The unique identifier of the job application. - **content** (string) - Required - The text content of the note. ### Request Example ```json { "jobId": "job-uuid", "content": "Had a great phone screen. Interviewer mentioned they're looking for React expertise. Follow up scheduled for next week." } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - Contains the details of the newly created note. - **id** (string) - The unique identifier of the note. - **jobId** (string) - The ID of the associated job. - **content** (string) - The content of the note. - **createdAt** (string) - The timestamp when the note was created. #### Response Example ```json { "success": true, "data": { "id": "note-uuid", "jobId": "job-uuid", "content": "Had a great phone screen...", "createdAt": "2024-01-20T15:30:00.000Z" } } ``` ``` -------------------------------- ### Fetch User Settings Source: https://context7.com/gsync/jobsync/llms.txt Retrieves user settings, including AI preferences (provider, model, temperature) and display preferences (theme, records per page). ```typescript import { getUserSettings } from "@/actions/userSettings.actions"; const result = await getUserSettings(); // Response { success: true, data: { userId: "user-uuid", settings: { ai: { provider: "ollama", model: "llama3.2", temperature: 0.3 }, display: { theme: "system", recordsPerPage: 10 } } } } ``` -------------------------------- ### Run E2E Tests Source: https://github.com/gsync/jobsync/blob/main/CONTRIBUTING.md Execute end-to-end tests using Playwright. This requires a running development server. ```bash npm run test:e2e ```