Skip to content

NSTKrishna/JobStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

77 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ JobStack - Job Portal Platform

CI Pipeline

A modern full-stack job portal connecting students with companies for career opportunities in the development industry.

✨ Features

For Students

  • πŸ” User Authentication - Secure signup/login with JWT tokens
  • πŸ’Ό Job Search - Browse and filter available job opportunities
  • πŸ“ Easy Applications - Apply to jobs with cover letters
  • πŸ“„ CV Management - Upload and manage resumes
  • πŸ‘€ Profile Management - Create and update professional profiles
  • οΏ½ Application Tracking - Monitor application status in real-time
  • πŸ”” Real-time Notifications - Get instant updates via WebSocket

For Companies

  • 🏒 Company Portal - Dedicated dashboard for recruiters
  • πŸ’Ό Job Posting - Create and manage job listings
  • οΏ½ Dashboard Analytics - Track active jobs, applications, and metrics
  • πŸ‘₯ Candidate Management - View applicant profiles and resumes
  • βœ… Application Processing - Shortlist, reject, or hire candidates
  • οΏ½ Email Notifications - Automated welcome emails
  • πŸ”” Real-time Updates - Instant notifications for new applications

General Features

  • 🎨 Modern UI - Beautiful, responsive design with Tailwind CSS
  • πŸŒ“ Dark Mode Support - Eye-friendly interface options
  • πŸ“± Mobile Responsive - Works seamlessly on all devices
  • πŸ”„ Real-time Updates - WebSocket-powered notifications
  • πŸ”’ Secure - JWT authentication and bcrypt password hashing
  • ⚑ Fast - Optimized performance with React 18 and Vite

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern React with hooks
  • Vite - Lightning-fast build tool
  • Tailwind CSS - Utility-first CSS framework
  • Zustand - Lightweight state management
  • React Router v6 - Client-side routing
  • Axios - HTTP client with interceptors
  • Socket.io-client - Real-time WebSocket communication
  • Lucide React - Beautiful icon library

Backend

  • Node.js & Express - Server framework
  • Prisma ORM - Type-safe database client
  • PostgreSQL - Relational database
  • JWT - Secure authentication tokens
  • bcryptjs - Password hashing
  • Socket.io - WebSocket server
  • Nodemailer - Email sending
  • Cookie-parser - Cookie handling
  • CORS - Cross-origin resource sharing

DevOps

  • GitHub Actions - CI/CD pipeline
  • ESLint - Code linting
  • Prettier - Code formatting

πŸ“‹ Prerequisites

  • Node.js 18+ installed
  • PostgreSQL database (local or hosted)
  • Git installed
  • Gmail account (for email notifications)

πŸš€ Quick Start

Installation

  1. Clone the repository
git clone https://github.com/YOUR_USERNAME/JobStack.git
cd JobStack
  1. Setup Backend
cd Server
npm install

# Create .env file
cp .env.example .env
# Edit .env with your configuration:
# - DATABASE_URL="postgresql://user:password@localhost:5432/jobstack"
# - JWT_SECRET="your-secret-key"
# - EMAIL_USER="your-email@gmail.com"
# - EMAIL_PASS="your-app-password"

# Run database migrations
npx prisma generate
npx prisma migrate dev

# Start the server
npm run dev
  1. Setup Frontend
cd Client
npm install

# Create .env file (optional)
cp .env.example .env

# Install socket.io-client for real-time notifications
npm install socket.io-client clsx tailwind-merge

# Start the development server
npm run dev
  1. Access the application

πŸ“ Project Structure

JobStack/
β”œβ”€β”€ Client/                          # Frontend React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ Api/                    # API integration layer
β”‚   β”‚   β”‚   β”œβ”€β”€ api.js              # Axios instance & API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ hooks.js            # Custom React hooks
β”‚   β”‚   β”‚   β”œβ”€β”€ store.js            # Zustand state management
β”‚   β”‚   β”‚   └── socket.js           # WebSocket client
β”‚   β”‚   β”œβ”€β”€ components/             # Reusable components
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/          # Dashboard components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardLayout.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx
β”‚   β”‚   β”‚   β”‚   └── Topbar.jsx
β”‚   β”‚   β”‚   └── grid.jsx            # UI components
β”‚   β”‚   β”œβ”€β”€ page/                   # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Landing.jsx         # Landing page
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx           # Login page
β”‚   β”‚   β”‚   β”œβ”€β”€ Signup.jsx          # Registration
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentDash.jsx     # Student dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ CompanyDash.jsx     # Company dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ Jobs.jsx            # Job listings
β”‚   β”‚   β”‚   β”œβ”€β”€ application.jsx     # Applications view
β”‚   β”‚   β”‚   β”œβ”€β”€ Userprofile.jsx     # User profile
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ App.jsx                 # Main app component
β”‚   β”‚   └── main.jsx                # Entry point
β”‚   β”œβ”€β”€ public/                     # Static assets
β”‚   β”œβ”€β”€ .env.example                # Environment variables template
β”‚   β”œβ”€β”€ tailwind.config.js          # Tailwind configuration
β”‚   β”œβ”€β”€ vite.config.js              # Vite configuration
β”‚   └── package.json
β”‚
β”œβ”€β”€ Server/                          # Backend Node.js application
β”‚   β”œβ”€β”€ controllers/                # Route controllers
β”‚   β”‚   β”œβ”€β”€ Auth/                   # Authentication controllers
β”‚   β”‚   β”œβ”€β”€ Company_Dashboard/      # Company-specific controllers
β”‚   β”‚   β”‚   β”œβ”€β”€ job.controllers.js
β”‚   β”‚   β”‚   β”œβ”€β”€ application.controllers.js
β”‚   β”‚   β”‚   └── profile.controllers.js
β”‚   β”‚   β”œβ”€β”€ User_Dashboard/         # User-specific controllers
β”‚   β”‚   β”‚   β”œβ”€β”€ application.controllers.js
β”‚   β”‚   β”‚   β”œβ”€β”€ profile.controllers.js
β”‚   β”‚   β”‚   └── cv.controllers.js
β”‚   β”‚   └── Jobs/                   # Job-related controllers
β”‚   β”œβ”€β”€ routes/                     # API routes
β”‚   β”‚   β”œβ”€β”€ Auth/                   # Authentication routes
β”‚   β”‚   β”œβ”€β”€ Dashboard/              # Dashboard routes
β”‚   β”‚   β”œβ”€β”€ Jobs/                   # Job routes
β”‚   β”‚   └── mainRoute.js            # Main router
β”‚   β”œβ”€β”€ middlewares/                # Express middlewares
β”‚   β”‚   β”œβ”€β”€ auth.Middleware.js      # JWT authentication
β”‚   β”‚   └── upload.Middleware.js    # File upload handling
β”‚   β”œβ”€β”€ prisma/                     # Database schema & migrations
β”‚   β”‚   β”œβ”€β”€ schema.prisma           # Prisma schema
β”‚   β”‚   └── migrations/             # Database migrations
β”‚   β”œβ”€β”€ utils/                      # Utility functions
β”‚   β”‚   β”œβ”€β”€ email.js                # Email configuration
β”‚   β”‚   β”œβ”€β”€ sendEmail.js            # Email sending utility
β”‚   β”‚   └── validator.js            # Input validation
β”‚   β”œβ”€β”€ db/                         # Database configuration
β”‚   β”‚   └── config.js               # Prisma client
β”‚   β”œβ”€β”€ websocket.js                # Socket.io configuration
β”‚   β”œβ”€β”€ server.js                   # Express server entry point
β”‚   β”œβ”€β”€ .env.example                # Environment variables template
β”‚   └── package.json
β”‚
└── .github/
    └── workflows/                   # CI/CD pipelines
        └── ci.yml                   # GitHub Actions workflow

πŸ” Database Schema

Models

  • User - Student accounts with profile information
  • Company - Company accounts with organization details
  • Job - Job postings created by companies
  • Applications - Job applications from users
  • Profile_user - Extended user profile information
  • Profile_companies - Extended company profile information
  • Document - User uploaded CVs and resumes
  • College - College/University information

πŸ”„ API Endpoints

Authentication

  • POST /api/auth/signup/user - User registration
  • POST /api/auth/signup/company - Company registration
  • POST /api/auth/login/user - User login
  • POST /api/auth/login/company - Company login

Jobs (Public)

  • GET /api/jobs - Get all jobs
  • GET /api/jobs/:id - Get job by ID

User Dashboard (Protected)

  • GET /api/User_dashboard/profile - Get user profile
  • POST /api/User_dashboard/profile - Update user profile
  • POST /api/User_dashboard/cv - Upload CV
  • POST /api/User_dashboard/apply/:jobId - Apply to job
  • GET /api/User_dashboard/applications - Get user applications

Company Dashboard (Protected)

  • GET /api/Company_dashboard/overview - Get company overview
  • POST /api/Company_dashboard/post_job - Create job posting
  • GET /api/Company_dashboard/jobs - Get company jobs
  • GET /api/Company_dashboard/applications - Get all applications
  • PUT /api/Company_dashboard/applications/:id/status - Update application status
  • GET /api/Company_dashboard/profile - Get company profile
  • POST /api/Company_dashboard/profile - Update company profile

πŸ”„ CI/CD Pipeline

This project includes automated CI pipeline that:

  • βœ… Builds both frontend and backend
  • βœ… Runs linting checks
  • βœ… Executes tests
  • βœ… Verifies deployment readiness
  • βœ… Uploads build artifacts

Pipeline runs on every push and pull request to main/master/develop branches.

πŸ”” WebSocket Integration

Real-time Notifications

The application uses Socket.io for real-time notifications:

  • Automatic connection on user login
  • JWT-based authentication for WebSocket
  • Real-time job posting notifications
  • Application status updates
  • Browser notifications support

Implementation

// Client automatically connects on login
useNotifications(); // Custom hook handles connection

// Server sends notifications
notifyUser(userId, {
  title: "New Job Posted",
  message: "Check out the latest opportunities!",
  createdAt: new Date(),
});

πŸ“§ Email Notifications

Automated emails are sent for:

  • Welcome emails on signup (both students and companies)
  • Job application confirmations
  • Application status updates
  • Password reset (if implemented)

πŸ§ͺ Running Tests

# Frontend tests
cd Client
npm test

# Backend tests
cd Server
npm test

πŸ“ Environment Variables

Backend (.env)

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/jobstack"

# JWT
JWT_SECRET="your-super-secret-jwt-key"

# Server
PORT=3000
NODE_ENV=development

# Email (Gmail)
EMAIL_USER="your-email@gmail.com"
EMAIL_PASS="your-app-password"  # Use App Password, not regular password

# Frontend URL (for CORS)
FRONTEND_URL="http://localhost:5173"

Frontend (.env)

# API URL
VITE_API_URL="http://localhost:3000/api"

# WebSocket URL
VITE_SOCKET_URL="http://localhost:3000"

πŸš€ Deployment

Frontend (Vercel/Netlify)

  1. Build the project: npm run build
  2. Deploy the dist folder
  3. Set environment variables in your hosting platform

Backend (Railway/Render/Heroku)

  1. Set up PostgreSQL database
  2. Configure environment variables
  3. Run migrations: npx prisma migrate deploy
  4. Deploy the server

πŸ”’ Security Features

  • JWT-based authentication
  • Bcrypt password hashing (10 rounds)
  • Role-based access control (RBAC)
  • Protected routes with middleware
  • CORS configuration
  • Cookie-based session management
  • Input validation and sanitization

πŸ“Š Key Features Breakdown

Dashboard System

  • Student Dashboard: Track applications, manage profile, upload CV
  • Company Dashboard: Post jobs, view applications, hire candidates
  • Analytics: Real-time metrics and statistics
  • Responsive Design: Mobile-friendly interface

Application System

  • Easy Apply: One-click application with cover letter
  • Status Tracking: PENDING β†’ SHORTLISTED β†’ HIRED/REJECTED
  • Resume Viewing: Companies can view candidate resumes
  • Bulk Actions: Mark all as read, clear notifications

Job Management

  • Create Jobs: Post new opportunities
  • Edit Jobs: Update job details
  • Delete Jobs: Remove listings
  • Job Filters: Search and filter by criteria

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ› Known Issues

  • None at the moment. Please report issues on GitHub.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Authors

πŸ™ Acknowledgments

  • Built with ❀️ using React and Node.js
  • UI inspired by modern job portals like LinkedIn and Indeed
  • Icons by Lucide Icons
  • Animations and UI components inspired by Aceternity UI

πŸ“ž Support

For support, email krishnagehlot@example.com or open an issue on GitHub.

🎯 Roadmap

  • Add advanced search filters
  • Implement chat system between companies and candidates
  • Add video interview scheduling
  • Resume parsing with AI
  • Job recommendations based on user profile
  • Mobile app (React Native)
  • Advanced analytics dashboard
  • Multi-language support

Made with πŸ’™ by Krishna Gehlot

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors