Skip to content

oba-md/GOODWORK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GOODWORK

A simple job board application (backend + frontend) to post, edit and manage job listings.

Project Overview

GOODWORK is a full-stack job board application with a Node.js/Express backend and a React + Vite frontend. It provides user authentication and CRUD operations for job postings. The repository contains two main folders:

  • BACKEND/ - Express API, controllers, models, and middleware.
  • FRONTEND/ - React (Vite) single-page application.

Key Features

  • User registration and login (JWT-based authentication).
  • Create, read, update, and delete job postings.
  • Protected routes for job management.
  • Separation of concerns: controllers, routes, models, and middleware.

Tech Stack

  • Backend: Node.js, Express, Mongoose (MongoDB), JWT
  • Frontend: React, Vite, Axios (for API calls)
  • Dev tools: nodemon (backend dev), Vite dev server (frontend)

Repository Structure (top-level)

  • BACKEND/
    • src/ - source files
      • app.js, server.js - app/server entry points
      • config/db.js - database connection
      • controllers/ - authController.js, jobController.js
      • middlewares/ - authMiddleware.js
      • models/ - User.js, Job.js
      • routes/ - authRoutes.js
      • routes/ - jobRoutes.js
  • FRONTEND/
    • src/ - React app
      • App.jsx, main.jsx
      • pages/ - Home.jsx, Login.jsx, Register.jsx, PostJob.jsx, EditJob.jsx
      • components/ - Navbar.jsx, JobCard.jsx
      • api/ - jobs.js (API helpers)

Environment Variables

Do not commit real secrets. Use local .env files and commit only .env.example.

  • Backend (BACKEND/.env)

    • MONGO_URI - MongoDB connection string
    • JWT_SECRET - secret for signing JWTs
    • PORT - backend server port (optional)
  • Frontend (FRONTEND/.env)

    • VITE_API_URL - base URL for the backend API (e.g., http://localhost:5000/api)

Setup & Run (Windows PowerShell)

  1. Backend
cd c:\Users\Administrator\Documents\Boomerange\GOODWORK\BACKEND
npm install
# For development (if the project has nodemon):
npm run dev
# Or start directly:
node src/server.js
  1. Frontend
cd c:\Users\Administrator\Documents\Boomerange\GOODWORK\FRONTEND
npm install
npm run dev

Open the frontend dev server URL (usually http://localhost:5173 or shown by Vite) and ensure the VITE_API_URL points to the backend API.

API Endpoints (examples)

These are typical endpoints based on project routes - confirm exact paths in BACKEND/src/routes/:

  • Auth
    • POST /api/auth/register - create a new user
    • POST /api/auth/login - authenticate and receive a JWT
  • Jobs
    • GET /api/jobs - list jobs
    • POST /api/jobs - create a job (protected)
    • GET /api/jobs/:id - get job details
    • PUT /api/jobs/:id - update a job (protected)
    • DELETE /api/jobs/:id - delete a job (protected)

Use an Authorization: Bearer <token> header for protected routes.

Documentation

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages