Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

1, 2, Job!

This repository contains a full-stack job board web application built for team development.
It includes a frontend (React + Vite), a backend (Node.js + Express), authentication system, and a MySQL database.


πŸš€ Project Overview

A modern job board platform that allows users to browse jobs, apply for positions, manage their profiles, and view company information. The project features user authentication, protected routes, and a complete CRUD system for jobs, users, applications, and companies.


πŸ—‚οΈ Project Structure

T-WEB-501-LYO_15/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”‚   └── connection.js           # MySQL database connection
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ application.controller.js
β”‚   β”‚   β”‚   β”œβ”€β”€ company.controller.js
β”‚   β”‚   β”‚   β”œβ”€β”€ job.controller.js
β”‚   β”‚   β”‚   └── user.controller.js
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”‚   └── auth.middleware.js      # JWT authentication
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”‚   β”œβ”€β”€ Application.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Company.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Job.js
β”‚   β”‚   β”‚   └── User.js
β”‚   β”‚   └── routes/
β”‚   β”‚       β”œβ”€β”€ application.routes.js
β”‚   β”‚       β”œβ”€β”€ company.routes.js
β”‚   β”‚       β”œβ”€β”€ job.routes.js
β”‚   β”‚       └── user.routes.js
β”‚   β”œβ”€β”€ scripts/
β”‚   β”‚   └── reset-db.js                 # Database reset utility
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── logos/                      # Company logos storage
β”‚   β”œβ”€β”€ server.js                       # Main server file
β”‚   β”œβ”€β”€ schema.sql                      # Database schema
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env.sample
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── 12jobLogo.png
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ application/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ApplicationForm.jsx
β”‚   β”‚   β”‚   β”‚   └── ApplicationsList.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AuthProvider.jsx
β”‚   β”‚   β”‚   β”‚   └── ProtectedRoute.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ company/
β”‚   β”‚   β”‚   β”‚   └── FirstSection.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ home/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HeroSection.jsx
β”‚   β”‚   β”‚   β”‚   └── TitleSection.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ job/
β”‚   β”‚   β”‚   β”‚   └── JobSection.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/
β”‚   β”‚   β”‚   β”‚   └── Header.jsx
β”‚   β”‚   β”‚   └── profile/
β”‚   β”‚   β”‚       β”œβ”€β”€ DetailProfil.jsx
β”‚   β”‚   β”‚       β”œβ”€β”€ EditProfile.jsx
β”‚   β”‚   β”‚       β”œβ”€β”€ FirstSection.jsx
β”‚   β”‚   β”‚       └── SecondSection.jsx
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”‚   └── axiosConfig.js          # Axios configuration
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”‚   └── useAuth.js              # Authentication hook
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ private/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ApplyJobPage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CompanyPage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EditProfilePage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MyApplicationsPage.jsx
β”‚   β”‚   β”‚   β”‚   └── ProfilePage.jsx
β”‚   β”‚   β”‚   └── public/
β”‚   β”‚   β”‚       β”œβ”€β”€ AuthenticationPage.jsx
β”‚   β”‚   β”‚       └── LandingPage.jsx
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   └── main.jsx                    # Router configuration
β”‚   β”œβ”€β”€ .env.sample
β”‚   β”œβ”€β”€ .prettierrc
β”‚   β”œβ”€β”€ eslint.config.js
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ tailwind.config.js
β”‚   β”œβ”€β”€ vite.config.js
β”‚   └── package.json
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
└── package.json                        # Root package for concurrent scripts

βš™οΈ Tech Stack

Frontend

Backend


🧩 API Routes

Jobs

Method Endpoint Description Auth Required
GET /api/jobs Retrieve all job listings No
GET /api/jobs/:id Retrieve a single job by ID No
POST /api/jobs Create a new job entry Yes
PATCH /api/jobs/:id Update an existing job Yes
DELETE /api/jobs/:id Delete a job Yes

Users

Method Endpoint Description Auth Required
POST /api/users/login User authentication No
POST /api/users Create a new user account No
GET /api/users Retrieve all users Yes
GET /api/users/:id Retrieve user by ID Yes
PATCH /api/users/:id Update user information Yes
DELETE /api/users/:id Delete user account Yes

Applications

Method Endpoint Description Auth Required
GET /api/applications/user/:id Get applications for a specific user Yes
POST /api/applications Submit a new job application Yes
DELETE /api/applications/:id Delete an application Yes

Companies

Method Endpoint Description Auth Required
GET /api/companies Retrieve all companies No
GET /api/companies/:id Retrieve company by ID No
POST /api/companies Create a new company No
PATCH /api/companies/:id Update company information No
DELETE /api/companies/:id Delete a company No

πŸ›£οΈ Frontend Routes

Public Routes

  • / - Landing page with job listings
  • /authentication - Login/Register page

Protected Routes (Require Authentication)

  • /home - User dashboard
  • /jobs/:jobId/apply - Job application form
  • /my-applications - User's job applications
  • /companies/:companyId? - Company details
  • /profile - User profile view
  • /profile/edit - Edit user profile

🧰 Installation & Setup

1. Clone the repository

git clone [email protected]:EpitechMscProPromo2028/T-WEB-501-LYO_15.git
cd T-WEB-501-LYO_15

2. Install dependencies

Root (required)

npm install

Frontend

cd frontend
npm install

Backend

cd backend
npm install

3. Environment Configuration

Frontend

Create a .env file in the frontend/ directory:

cd frontend
cp .env.sample .env

Update the values:

VITE_API_URL=http://localhost:4000
VITE_PORT=3000

Backend

Create a .env file in the backend/ directory:

cd backend
cp .env.sample .env

Update the values with your database credentials:

PORT=4000
DB_HOST=localhost
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=ntwJob
JWT_SECRET=your_jwt_secret_key

4. Database Setup

  1. Create your MySQL database:
CREATE DATABASE ntwJob;
  1. Run the SQL schema:
mysql -u <user> -p ntwJob < backend/schema.sql

Or use the reset script:

node backend/scripts/reset-db.js

5. Run the project

Start both frontend and backend concurrently from the root:

npm run dev

This will start:

Then open http://localhost:3000 to access the application.


πŸ” Authentication System

The application uses JWT (JSON Web Tokens) for authentication:

  • Registration: Users can create accounts with email/password
  • Login: Authentication returns a JWT token
  • Protected Routes: Frontend routes are protected using ProtectedRoute component
  • API Protection: Backend routes use authenticateToken middleware
  • Auto-redirect: Unauthenticated users are redirected to /authentication

πŸ§‘β€πŸ’» Development Guidelines

  • Use feature branches derived from dev
  • Create Pull Requests to merge into main
  • Follow the Conventional Commits format:
<type>(<scope>): <description>

Examples:

feat(auth): add JWT authentication system
fix(jobs): resolve job listing pagination issue
chore(deps): update dependencies to latest versions

πŸ—„οΈ Database Schema

The application uses MySQL with the following main tables:

  • users - User accounts and profiles
  • companies - Company information and logos
  • jobs - Job listings linked to companies
  • applications - User job applications with resumes

πŸ“œ License

This project is part of an Epitech Master of Science coursework and is intended for educational and collaborative use.


🧠 Authors

  • Warith DIMIA
  • Nadir AMMI SAID
  • Toni SAGE

Epitech Master of Science – Lyon 2028 Cohort

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages