A full-stack campus recruitment website project with a static frontend and a Node.js + Express backend.
- Student registration and login
- Job listing and company pages
- Personal center for profile and application records
- Local resume upload/download (stored in browser
localStorage) - SQL Server-backed user authentication
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express
- Database: SQL Server (
mssql) - Password hashing:
bcryptjs
.
├── index.html
├── job_list.html
├── companies.html
├── personal_center.html
├── company_a01.html
├── company_a02.html
├── company_a03.html
├── navbar.html
├── css/
├── js/
├── server.js
├── package.json
└── README.md
- Node.js 18+ (recommended)
- SQL Server (local or remote)
- npm
npm installRun the following SQL in SQL Server Management Studio:
IF DB_ID('campus_recruitment') IS NULL
BEGIN
CREATE DATABASE campus_recruitment;
END
GO
USE campus_recruitment;
GO
IF OBJECT_ID('dbo.users', 'U') IS NULL
BEGIN
CREATE TABLE dbo.users (
id INT IDENTITY(1,1) PRIMARY KEY,
username NVARCHAR(255) NOT NULL UNIQUE,
[password] NVARCHAR(255) NOT NULL,
created_at DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME()
);
END
GOOpen server.js and update the SQL Server config:
const config = {
user: 'your_username',
password: 'your_password',
server: 'localhost', // or localhost\\SQLEXPRESS
database: 'campus_recruitment',
options: {
encrypt: false,
trustServerCertificate: true
}
};npm startThen open:
http://localhost:3000/
POST /register- Body:
username,password - Creates a new user with hashed password
- Body:
POST /login- Body:
username,password - Validates user credentials
- Body:
- Do not commit secrets (DB credentials) to GitHub.
node_modules/is ignored via.gitignore.- Profile data, resume file data, and application records are currently stored in browser
localStorage.
- Move DB credentials to environment variables (
.env) - Add server-side session/JWT auth
- Persist applications and profile data in database
- Add input validation and rate limiting
- Add deployment config (Docker / cloud)