Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Endpoint to Enable Users Submit Job Application #232

Open
9 tasks
oderahub opened this issue Jul 24, 2024 · 0 comments
Open
9 tasks

Feat: Endpoint to Enable Users Submit Job Application #232

oderahub opened this issue Jul 24, 2024 · 0 comments

Comments

@oderahub
Copy link
Contributor

oderahub commented Jul 24, 2024

Description
Develop backend logic to handle job applications, including validation, storage, and management.

Endpoint Feature
This endpoint enables users to submit job applications, ensuring efficient handling, validation, and management.

Acceptance Criteria

  • The endpoint should be accessible at POST /api/v1/jobs/{job-id}/applications.

  • The endpoint should accept HTTP POST requests.

  • The endpoint should validate applications against job requirements stored in the database.

  • The endpoint should prevent duplicate applications from the same candidate for the same job.

Purpose

  • To streamline the job application process on the careers page, ensuring efficient handling, validation, and management of job applications.

Requirements

  • Develop server-side logic to handle job applications.

  • Securely store application details in the database.

  • Ensure compliance with security standards for handling applicant information.

Expected Outcome

  • Backend handles job applications efficiently.

  • Applications are validated and stored correctly.

Endpoints
Submit Job Application
Description: Submit a job application for a specific job.
Endpoint: POST /api/v1/jobs/{job-id}/applications

Request Body:

{
  "applicant_name": "John Doe",
  "email": "johndoe@example.com",
  "resume": "https://example.com/resume.pdf",
  "cover_letter": "Cover letter text here"
}

Response:
On successful addition of a new Application to the Database, the API should return a 201 Created status code. The response body should contain the newly created application details, including the ID.

{
  "status": "success",
   "status_code": 201,
  "message": "Application submitted successfully",
  "application_id: "string",
  "created_at: "date"
  
}

Data Validation
Input Validation:

  • Validate that all required fields are provided and correctly formatted.

  • If any required field is missing or invalid, return a 400 Bad Request status code with appropriate validation error messages.


{
  "status": "unsuccessful",
  "status_code": 400,
  "message": ["applicant_name is required", "email is required", "resume is required", "cover_letter is required"]
}

Duplicate Application Handling
Response:

  • If the same applicant tries to apply for the same job more than once, the API should return a 409 Conflict status code with a duplicate application message.
{
  "status": "unsuccessful",
  "status_code": 409,
  "message": "Duplicate application."
}

Tasks

  • Validate the input data for required fields.

  • Check for duplicate applications based on applicant email and job ID.

  • Store the application details in the database securely.

  • Ensure applicant details are encrypted.

  • Implement logic to prevent the same applicant from applying more than once to the same job.

Testing Requirements
Unit Tests:

  • Write unit tests for backend validation and transaction handling.

Security Testing:

  • Perform security testing to ensure data protection and compliance.

Scenario Testing:

  • Test various scenarios for submitting job applications, including successful submissions, missing fields, and duplicate applications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant