Skip to content

This is the Node.js/Express backend for "JobCard", a full-stack project, currently under development. It allows service providers (repair shops, tailors, bakeries, etc.) to manage job cards for their customers and keep them updated in real-time.

Notifications You must be signed in to change notification settings

HimanthaMarasinghe/JobCard---BackEnd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JobCard – Backend API 👷 👩‍🍳 👨‍🔧

  • This is the Node.js/Express backend for "JobCard", a full-stack project, currently under development.
  • It allows service providers (repair shops, tailors, bakeries, etc.) to manage job cards for their customers and keep them updated in real-time.

📝 Problem & Solution

The Problem 😖

  • In many small service businesses (e.g.: repair shops, tailors, cake shops, etc.), work is taken in, noted down in a book or remembered by staff. Customers receive little or no written record of the job.
  • If customers want an update on progress, they must call or message the shop.
  • When the shop finishes the work, they also have to call or message each customer to let them know.
  • This process is slow, unorganized, and easy to lose track of, especially when handling many jobs.

The Solution – JobCard 😇

JobCard turns this messy process into a simple digital workflow:

  • Service Providers

    • Create a digital “job card” for each new job.
    • Assign it to an existing customer using their phone number, or create it with basic customer details (name, phone number) if customer is not registerd.
    • Record required services and estimated costs. e.g. :
      • Auto Repair shop - oil change, Brake pad replacement, Tire alignment and balancing
      • Tailor shop - 2 white shirts
      • Cake shop - birthday cake
    • Update the job card status as work progresses. e.g :
      • ✅ oil change - Done
      • ⌛ Break pad replacement - In Progress
      • ❌ Tire alignment - Pending
  • Customers

    • Register with their phone number and log in to view all their job cards in one place.
    • See real-time updates on the progress of each job without needing to call the shop.
    • Get notified when work is completed and ready for pickup.

This system helps service providers stay organized, reduces missed information, and gives customers clear visibility into their orders and progress.

🛠️ Tech Stack

  • Node.js + Express.js for the API.
  • MongoDB with Mongoose for data storage.
  • JWT authentication (access & refresh tokens).
  • Cookie-based refresh tokens for secure sessions.
  • CORS and cookie-parser middlewares for web/mobile support.

🚀 Getting Started

Follow these steps to clone and run the project locally:

1. Clone the Repository

git clone https://github.com/HimanthaMarasinghe/JobCard---BackEnd.git

2. Navigate to the Project Folder

cd JobCard---BackEnd

3. Install Dependencies

npm install

4. Set Environment Variables

Create a .env file in the project root. See the below example

ACCESS_TOKEN_SECRET='#####################'
REFRESH_TOKEN_SECRET='#####################'

5. Generate 2 secrets and replace above ### with them.

node
require('crypto').randomBytes(64).toString('hex)
require('crypto').randomBytes(64).toString('hex)

6. Start the Development Server

npm run dev

Server will be running on port 5000

Important

Curently this project uses a local MongoDB instance, so make sure MongoDB is running on your machine.


About

This is the Node.js/Express backend for "JobCard", a full-stack project, currently under development. It allows service providers (repair shops, tailors, bakeries, etc.) to manage job cards for their customers and keep them updated in real-time.

Topics

Resources

Stars

Watchers

Forks