Header: Find Jobs, About, Post Job, (Sign up & Login will decide) Home page will think of it. Background color of my choice of about 40% (used)
Has all jobs available Search by keywords category or role (shows all jobs with that keyword) one can filter by location, roles and (Remote, hybrid or on-site) should have apply button Some jobs preview page when the job is clicked should have apply button
application should be sent automatically to the company....
The owner should sign up and have some sort of a company account... on the account the owner can click post a Job and a form appears and the owner puts the job description post button below the form or rich text editor which ever The owner can bring down the application or disabled the button after some time or a certain number of applicants are reached. The company can view all the jobs they have posted using there accounts.
Implement messages where the recruiter can reach for a candidate they interested at....(add on)
Initialize your project:
npm init -y
Install essential packages:
npm install express pg sequelize bcryptjs jsonwebtoken dotenv cors
npm install --save-dev nodemon
- Express: Backend framework for REST APIs.
- pg: PostgreSQL client for connecting to your database.
- Prisma: Modern ORM for managing PostgreSQL database.
- bcryptjs: For password hashing. jsonwebtoken: For authentication.
- dotenv: For environment variables. cors: To handle cross-origin requests.
Set up Prisma: Initialize Prisma in your project:
npx prisma init
This creates a .env
file and a prisma
folder with a schema.prisma
file.
Open your .env
file and set up your PostgreSQL database connection:
DATABASE_URL="postgresql://username:password@localhost:5432/job_board"
Replace username
, password
, and job_board
with your actual PostgreSQL credentials.
Edit your prisma/schema.prisma
file to define the tables using Prisma's schema syntax:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
name String
email String @unique
password String
role Role
profile Profile?
jobs Job[]
messages Message[]
@@map("users")
}
model Profile {
id Int @id @default(autoincrement())
bio String
skills String[]
userId Int @unique
user User @relation(fields: [userId], references: [id])
}
model Company {
id Int @id @default(autoincrement())
name String
description String
location String
contactEmail String
jobs Job[]
}
model Job {
id Int @id @default(autoincrement())
title String
description String
location String
type JobType
salary Float?
category String
deadline DateTime
companyId Int
company Company @relation(fields: [companyId], references: [id])
applications Application[]
}
model Application {
id Int @id @default(autoincrement())
status AppStatus @default(APPLIED)
appliedDate DateTime @default(now())
userId Int
jobId Int
user User @relation(fields: [userId], references: [id])
job Job @relation(fields: [jobId], references: [id])
}
model Message {
id Int @id @default(autoincrement())
senderId Int
receiverId Int
content String
timestamp DateTime @default(now())
sender User @relation("SentMessages", fields: [senderId], references: [id])
receiver User @relation("ReceivedMessages", fields: [receiverId], references: [id])
}
enum Role {
EMPLOYER
JOB_SEEKER
}
enum JobType {
REMOTE
HYBRID
ONSITE
}
enum AppStatus {
APPLIED
INTERVIEW
HIRED
REJECTED
}
User
table stores user information (both employers and job seekers).Company
stores details about employers.Job
is for job listings.Application
tracks job applications.Message
handles communication between users.
After defining your schema, generate the Prisma client:
npx prisma generate
Run migrations to apply the schema to your PostgreSQL database:
npx prisma migrate dev --name init
- Register a user:
/api/auth/register
- Login:
/api/auth/login
- Get user profile:
/api/auth/profile
-
Get all job listings:
/api/jobs
- Supports filtering by keywords, location, category, and job type.
-
Get job details:
/api/jobs/:id
-
Post a job (employers only):
/api/jobs
-
Update job listing:
/api/jobs/:id
-
Delete job listing:
/api/jobs/:id
- Apply for a job:
/api/applications
- View applications (for employers and job seekers):
/api/applications
- Send a message:
/api/messages
- Get messages:
/api/messages/:userId
Adjust your React app to connect with the new Prisma-powered backend. You can use Axios to make HTTP requests to the backend APIs.
src/
├── components/
│ ├── Navbar.js
│ ├── JobList.js
│ ├── JobDetails.js
│ ├── PostJob.js
│ ├── Register.js
│ ├── Login.js
│ └── Profile.js
├── pages/
│ ├── Home.js
│ ├── About.js
│ ├── FindJobs.js
│ ├── Messages.js
│ └── Dashboard.js
├── utils/
│ ├── axiosInstance.js
│ └── auth.js
├── App.js
└── index.js
- Navbar: Navigation links (
Home, Find Jobs, Post Job, About, Sign Up/Login
). - Home: Introduction, hero section, and call-to-action buttons.
- FindJobs: Display all job listings with search and filtering functionality.
- JobDetails: Detailed view of a job listing with an
Apply
button. - PostJob: Form for employers to post a new job.
- Messages: Messaging interface for employers and job seekers.
- Profile: User dashboard to manage jobs, applications, and profile settings.
- Use Postman to test your backend endpoints.
- Start by creating a new user (registration).
- Test login, job posting, applying for jobs, and sending messages.
- Deploy your PostgreSQL database using services like Supabase or Render.
- Deploy your backend server (Express + Prisma) to Railway or Vercel.
- Deploy your React frontend to Netlify or Vercel.
- Authentication: Create a registration and login system with JWT authentication. Use bcryptjs to hash passwords before storing them in the database.
- Job Listings: Employers can post jobs via a form. Jobs are displayed in the FindJobs page, where users can filter by keywords, category, location, and job type (remote, hybrid, on-site). Implement pagination for job listings.
- Search & Filtering: Use a combination of frontend filtering (in React) and backend querying (PostgreSQL) to optimize search performance. Optionally, integrate Elasticsearch for more advanced search capabilities if needed.
- Job Applications: Job seekers can click the "Apply" button, which automatically sends their profile and resume to the employer. Employers can close job applications or set a limit on the number of applicants.
- Notifications & Messaging: Implement notifications for new job matches and application status updates. Add a messaging feature where employers can reach out to job seekers directly.
- Start with the backend:
- Set up your Express server, PostgreSQL database, and Sequelize models.
- Build and test your API endpoints using Postman.
- Move to the frontend:
- Create your React components and pages.
- Implement authentication, job listings, and filtering.
- Add advanced features like messaging, notifications, and Elasticsearch integration (if needed).