Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SponsorMe — Job Board for Visa-Sponsored UK Roles

A RESTful backend API for a job board platform that connects job seekers with UK employers who offer visa sponsorship. Built to solve a real problem, finding sponsored roles in the UK is time consuming and scattered across multiple platforms. SponsorMe puts them all in one place.


About the Project

SponsorMe is a full-featured job board API built for the UK market. It focuses specifically on roles that meet the £38,700 Skilled Worker visa salary threshold, helping international job seekers quickly identify which opportunities are eligible for visa sponsorship. Employers can post jobs, job seekers can apply and save roles, and admins can manage the entire platform.

The project is currently live with the backend deployed on Render and the frontend being built separately.


Live Demo


Features

Authentication and Security

  • User registration and login with JWT authentication
  • Password hashing with bcrypt
  • Role-based access control with three roles — job seeker, employer and admin
  • Ownership checks on all protected routes
  • Environment variables for all sensitive configuration

Jobs

  • Employers can create, update and delete job listings
  • Jobs include salary, location, job type and sponsorship eligibility
  • Automatic flagging of roles that meet the £38,700 Skilled Worker visa threshold
  • Pagination and dynamic filtering on job listings
  • View count tracking on individual job posts

Applications

  • Job seekers can apply for roles
  • Employers can update application status
  • Job seekers can view and manage their own applications

Profiles and Resumes

  • Job seekers can create and update their profile
  • Resume upload supported via Multer

Companies

  • Employers can create and manage their company profile
  • Company profiles linked to job listings

Saved Jobs

  • Job seekers can save and unsave job listings
  • View all saved jobs with pagination

Analytics

  • Employer analytics on job listing performance

Notifications

  • Email notifications via Nodemailer
  • In-app notification system

Admin

  • Admin signup via protected route
  • Full platform management capabilities

Tech Stack

Technology Purpose
Node.js Runtime environment
Express.js Web framework
PostgreSQL Database
JWT Authentication
bcrypt Password hashing
Multer File uploads
Nodemailer Email notifications
Winston Logging
dotenv Environment variable management

Database Schema

The API is built around 7 tables:

  • users — stores all user accounts with role-based access
  • jobs — job listings with sponsorship eligibility flag
  • applications — job applications linking job seekers to jobs
  • seeker_profile — job seeker profiles and resume information
  • companies — employer company profiles
  • saved_jobs — job seeker saved job listings
  • notifications — in-app notification system

Architecture

The project follows a clean three layer architecture:

Route → Controller → Service
  • Routes handle incoming HTTP requests and direct them to controllers
  • Controllers handle request validation and call the appropriate service
  • Services contain the business logic and all database queries

API Endpoints

Authentication

Method Endpoint Description
POST /auth/signup Register as job seeker or employer
POST /auth/signin Login and receive JWT token
POST /admin/signup Register as admin

Jobs

Method Endpoint Description
POST /jobs Create a job listing (employer only)
GET /jobs Get all jobs with pagination and filtering
GET /jobs/:id Get a single job and increment view count
PATCH /jobs/:id Update a job listing (owner only)
DELETE /jobs/:id Delete a job listing (owner only)

Applications

Method Endpoint Description
POST /jobs/:id/apply Apply for a job
GET /applications/mine Get my applications with pagination
PATCH /applications/:id/status Update application status (employer only)

Profiles

Method Endpoint Description
POST /profile Create seeker profile
GET /profile Get my profile
PATCH /profile Update profile and upload resume

Companies

Method Endpoint Description
POST /companies Create company profile
GET /companies/:id Get company profile
PATCH /companies/:id Update company profile

Saved Jobs

Method Endpoint Description
POST /saved-jobs/:id Save a job
DELETE /saved-jobs/:id Unsave a job
GET /saved-jobs Get all saved jobs with pagination

Analytics

Method Endpoint Description
GET /analytics Get job performance analytics (employer only)

Notifications

Method Endpoint Description
GET /notifications Get my notifications
PATCH /notifications/:id/read Mark notification as read

Getting Started

Prerequisites

  • Node.js v18 or higher
  • PostgreSQL

Installation

  1. Clone the repository
git clone https://github.com/Sefinah/sponsorme.git
cd sponsorme
  1. Install dependencies
npm install
  1. Create a .env file in the root directory
PORT=3000
DATABASE_URL=your_postgresql_connection_string
JWT_SECRET=your_jwt_secret
EMAIL_HOST=smtp.gmail.com
EMAIL_USER=your_email
EMAIL_PASS=your_email_password
  1. Run the database migrations
psql -U your_user -d your_database -f migrations/schema.sql
  1. Start the server
npm start

Environment Variables

Variable Description
PORT Port the server runs on
DATABASE_URL PostgreSQL connection string
JWT_SECRET Secret key for JWT signing
EMAIL_HOST SMTP host for email sending
EMAIL_USER Email address for sending notifications
EMAIL_PASS Email password

What I Learned

SponsorMe is my second backend project and a significant step up from TBlog in complexity. Building it taught me how to implement file uploads with Multer, send automated emails with Nodemailer, design a more complex relational database with seven tables, implement dynamic filtering and pagination, handle ownership checks properly across multiple routes and structure a larger codebase cleanly using the route, controller, service pattern. I also went through a thorough code review process that taught me the importance of secure configuration, consistent response patterns and defensive programming.


Author

Sefinat Hussein

About

A RESTful job board API for visa-sponsored UK roles, built with Node.js, Express and PostgreSQL. Live on Render.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages