PROGRAMMING PRACTICAL QUESTION As an application developer, you are assigned by the Public Service
Recruitment Secretariat to develop a simplified system that manages job
listings, applications, and application evaluations. Your system should
simulate the core features involved in connecting candidates with job
opportunities
PART 1. Authorization and Authentication
You are required to implement a secure
authentication and authorization service for a web application. The system
should support user registration, secure login, role-based access control,
session management. Additionally, APIs exposed to third-party services must be
secured using API key authentication.
Functional Requirements:
a)
User
Registration & Login
•
Implement a secure registration
endpoint that stores user credentials using password hashing (e.g., borypt)
•
Provide a login endpoint that returns a session
token or JWT on successful authentication
b)
Password
Reset Functionality
c)
Role-Based
Access Control (RBAC)
•
Users can have roles such as admin, editor, and
viewer
•
Access to specific routes or resources must be
restricted based on user roles
d)
Session
Management
•
Store session tokens securely.
•
Implement session expiration and logout
functionality.
e)
API Key
Authentication
PART 2: Job Recruitment System
Requirements:
Implement a program (in any
language of your choice) with the following functionalities:
I.
Job
Listings Management
•
Add jobs with details such as title, department,
location, ang salary
•
View all active job postings.
II.
Candidate
Application Handling
Allow a
candidate to apply for a specific job by submitting.
•
Name, Email, Position ID
•
Resume text or brief profile summary
•
Store applications in-memory
III.
Location
Based Priority
As part of the application review process, you are required to assign
additional priority points to candidates based on the location of the job they
are applying for (not the candidate's
location). This ensures a consistent and deterministic evaluation process during interviews or automated
scoring.
Scoring Rules Based on Job Location:
•
Jobs located in "Remote" settings: +3
points
•
Jobs based in "DAR ES SALAAM": +2 points
•
Jobs in any other location: +1 point
These
points are added to the candidate's resume score to compute a final evaluation score.
IV. Application Review
Simulate the evaluation of each candidate's applicant score based on
resume quality and job location-based priority
a)
Resume
Quality Score
Assign a score between 1 and 10 to evaluate the candidate’s resume. This
score can be mocked randomly or
fixed for simulation process.
b)
Location
Priority Score
Use the
job's location (not the candidate's location) to determine priority points:
•
Jobs located in "Remote" settings: +3
points
•
Jobs based in "DAR ES SALAAM": +2 points
•
Jobs in any other location: +1 point
c)
Final
Score Calculation
d)
Review
Summary Output
After
processing each application, display a summary that indicates:
i.
Candidate Name
ii.
Position Applied For
iii.
Resume Score
iv.
Location Priority Points
v.
Final Score
Constraits:
•
Use classes or modules for separation of concern
•
Store jobs and applications in-database.
•
Ensure each candidate can apply only once per job
Sample Input Flow:
1. Add Job
"Software Engineer", IT, Remote, Tsh 1,200,000.
2. Add Job:
"HR Officer", Human Resources, DAR
3. Apply:
Ally Mdoka, amdoka@example.com, Job Python and Java."
4. View
Summary
1. Software
Engineer (Remote) - Tsh. 1,200,000
2. HR
Officer (DAR ES SALAAM) – Tsh. 750,000
Application
Received: Name: Ally Mdoka Position:
Software Engineer Resume Score: 7 Location Priority: 3
Final
Score: 10
Application
processed successfully.
Implementation Guidelines:
•
Use any modern back-end franework
(e.g., Laravet, Django, Flask, Ex Spring Boot).
•
For Frontend use (Angular, React or Vue js)
•
Use a relational database (PostgreSQL or MySQL)
•
Passwords must be hashed and never stored in plain
text.
•
Provide proper error handling and logging for
authentication
____________________________________________________________________________
FOR ANY ENQUIRIES
👇
WhatsApp: +255 692 127 931
___________________________________________________________________________________
***ALL THE BEST***
NB: AM HERE FOR YOU.