LWS Job Portal runs as two separate processes — an Express 5 backend API and a React 19 + Vite frontend — both of which must be started before you can use the application. This guide walks you through every step required to get a fully functional local environment, from cloning the repository to registering your first account.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/iDevRanjan/lws-ra-b4-assignment-five/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure the following are available on your machine:| Requirement | Minimum Version | Notes |
|---|---|---|
| Node.js | 18+ | Required by both frontend and backend |
| npm | Bundled with Node.js | pnpm or yarn also work |
| Git | Any recent version | For cloning the repository |
Both the backend API server and the frontend Vite dev server must be running simultaneously. Open two separate terminal windows — one for each process — before navigating to the app in your browser.
Setup Steps
Clone the Repository
Clone the project to your local machine and navigate into the project directory.
Configure and Start the Backend
The backend lives in the Create a Start the backend with nodemon for automatic restarts on file changes:You should see the following output when the server starts successfully:
/backend subdirectory. Install its dependencies, create its environment file, and start the development server..env file inside the backend/ directory:Configure and Start the Frontend
Open a new terminal window and navigate back to the project root (not the Create a Start the Vite development server:Vite will print a local URL once it is ready:
backend/ subdirectory). Install frontend dependencies and create the frontend environment file..env file in the project root directory:Open the Application
Open your browser and navigate to:The LWS Job Portal home page will load, showing the public job listings feed. If the page is blank or shows an API error, confirm that the backend server is running on port 5000 and that
VITE_API_BASE_URL matches the backend address.Register Your First Account
Click Register in the navigation bar to choose your account type.
- Job Seeker
- Company
Navigate to
/jobseeker-register or click “Register as Job Seeker” on the login page. Fill in your name, email, and password to create a USER-role account. After registration you will be redirected to the Job Seeker Dashboard.The two roles —
USER and COMPANY — have entirely separate dashboards and feature sets. A single email address can only be registered under one role.Environment Variables
Frontend (project root .env)
| Variable | Required | Default | Description |
|---|---|---|---|
VITE_API_BASE_URL | ✅ Yes | — | Full base URL of the backend API, e.g. http://localhost:5000 |
Backend (backend/.env)
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | No | 5000 | Port the Express server listens on |
NODE_ENV | No | development | Controls error verbosity in the global error handler |
JWT_SECRET | Yes | — | Secret key used to sign and verify JSON Web Tokens |
Available npm Scripts
Frontend (project root)
| Script | Command | Description |
|---|---|---|
dev | npx kill-port 5173 && vite | Kills any existing process on port 5173, then starts the Vite dev server |
build | vite build | Compiles and bundles the app for production |
lint | eslint . | Runs ESLint across all source files |
preview | vite preview | Serves the production build locally for testing |
Backend (backend/)
| Script | Command | Description |
|---|---|---|
dev | nodemon server.js | Starts the Express server with hot-reload via nodemon |
What to Do Next
Architecture
Understand the monorepo layout, frontend folder structure, and backend routing patterns.
API Reference
Browse all available REST endpoints with request and response schemas.