A comprehensive recruitment management platform built with React, Node.js, Express, and PostgreSQL that streamlines the entire hiring process for both recruiters and candidates.
- Multi-User Role System: Separate interfaces for recruiters, candidates, and administrators
- Job Management: Create, edit, and manage job postings
- Candidate Portal: Profile creation, skills management, and application tracking
- Application Processing: End-to-end application lifecycle management
- Interview Scheduling: Coordinate and track interviews
- Analytics Dashboard: Recruitment metrics and pipeline visualization
- Activity Tracking: Comprehensive audit trail of system activities
- Frontend: React, TypeScript, Tailwind CSS, Shadcn UI
- Backend: Node.js, Express
- Database: PostgreSQL
- ORM: Drizzle ORM
- Authentication: Passport.js, express-session
- State Management: TanStack Query (React Query)
- Form Handling: React Hook Form with Zod validation
- Node.js (v16.0.0 or higher)
- npm (v7.0.0 or higher)
- PostgreSQL (v13.0 or higher) OR Supabase account
-
Clone the repository
git clone https://github.com/Yuva1024/Recruitment_System.git cd Recruitment_System -
Install dependencies
npm install
-
Set up PostgreSQL database
- Install PostgreSQL on your machine if not already installed
- Create a new database:
createdb recruitment_system
-
Create a .env file in the project root
DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/recruitment_system SESSION_SECRET=your_secure_random_stringReplace
yourpasswordwith your actual PostgreSQL password. -
Install missing packages for Windows compatibility
npm install pg @types/pg dotenv connect-pg-simple @types/connect-pg-simple
-
For Windows compatibility, modify server/db.ts
If you're on Windows and encounter connection issues, change your db.ts file to this:
import 'dotenv/config'; import { drizzle } from 'drizzle-orm/node-postgres'; import * as schema from "@shared/schema"; import pg from 'pg'; if (!process.env.DATABASE_URL) { throw new Error("DATABASE_URL must be set. Did you forget to provision a database?"); } // Use standard PostgreSQL client for local development const { Pool } = pg; export const pool = new Pool({ connectionString: process.env.DATABASE_URL }); export const db = drizzle(pool, { schema });
-
Push database schema
npm run db:push
-
Start the development server
npm run dev
-
Clone the repository
git clone https://github.com/Yuva1024/Recruitment_System.git cd Recruitment_System -
Install dependencies
npm install
-
Create a Supabase account and project
- Sign up at supabase.com
- Create a new project
- Get your PostgreSQL connection string from the dashboard (Settings → Database)
-
Create a .env file in the project root
DATABASE_URL=your_supabase_connection_string SESSION_SECRET=your_secure_random_stringReplace
your_supabase_connection_stringwith the connection string from Supabase. -
Install postgres.js (better Windows compatibility)
npm install postgres
-
Modify server/db.ts for Supabase
import 'dotenv/config'; import { drizzle } from 'drizzle-orm/postgres-js'; import postgres from 'postgres'; import * as schema from "@shared/schema"; if (!process.env.DATABASE_URL) { throw new Error("DATABASE_URL must be set. Did you forget to provision a database?"); } // Configure postgres.js with the right SSL settings for Supabase const connectionString = process.env.DATABASE_URL; const client = postgres(connectionString, { ssl: 'require', max: 10, // Connection pool size }); export const db = drizzle(client, { schema }); // Export a pool interface that mimics pg for session store compatibility export const pool = { query: async (text, params = []) => { try { const result = await client.unsafe(text, params); return { rows: result }; } catch (error) { console.error('Database query error:', error); throw error; } } };
-
Update drizzle.config.ts for SSL
import type { Config } from "drizzle-kit"; import 'dotenv/config'; if (!process.env.DATABASE_URL) { throw new Error("DATABASE_URL is not set"); } export default { schema: "./shared/schema.ts", out: "./drizzle", driver: 'pg', dbCredentials: { connectionString: process.env.DATABASE_URL, ssl: true, }, } satisfies Config;
-
Push database schema
npm run db:push
-
Start the development server
npm run dev
The application follows a structured organization:
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utility functions
│ │ ├── pages/ # Page components
│ │ ├── types/ # TypeScript type definitions
│ │ ├── App.tsx # Main application component
│ │ └── main.tsx # Entry point
│ └── index.html # HTML template
├── server/ # Backend Express server
│ ├── auth.ts # Authentication configuration
│ ├── db.ts # Database connection
│ ├── index.ts # Server entry point
│ ├── routes.ts # API routes
│ ├── storage.ts # Data access layer
│ └── vite.ts # Vite integration
├── shared/ # Shared code between client and server
│ └── schema.ts # Database schema and types
├── documentation/ # Project documentation
├── .env # Environment variables (create this)
├── drizzle.config.ts # Drizzle ORM configuration
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite build configuration
The system has three user roles with different access levels:
- Username: admin
- Password: admin123
- Access to user management and system activity logs
- Username: recruiter
- Password: recruiter123
- Access to job posting, candidate management, and interview scheduling
- Create your own account through the registration page
- Access to job search, application submission, and profile management
- Ensure PostgreSQL service is running
- Verify your DATABASE_URL is correct in .env
- For Windows users, try the Supabase option for easier setup
If you encounter SSL errors with PostgreSQL on Windows, try:
- Edit your pg_hba.conf file to allow local connections without SSL
- Use the Supabase option which handles SSL properly
If you encounter errors about missing modules:
npm installIf port 5000 is already in use:
- Change the port in server/index.ts
- Or kill the process using that port:
npx kill-port 5000
-
Frontend Development
- React components are in
client/src/components - Pages are in
client/src/pages - Global state is managed with React Query and context
- React components are in
-
Backend Development
- API endpoints are defined in
server/routes.ts - Authentication logic is in
server/auth.ts - Database operations are in
server/storage.ts
- API endpoints are defined in
-
Database Schema Changes
- Update the schema in
shared/schema.ts - Run
npm run db:pushto update the database
- Update the schema in
-
Adding New Features
- Update schema if needed
- Add backend endpoints
- Create frontend components
- Connect with React Query
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.