Mechanic Setu

Mechanic Setu Backend

Express, PostgreSQL, JWT authentication, RBAC, and profile APIs for Mechanic Setu.

Mechanic Setu logo

Mechanic Setu is a backend platform for customers, mechanics, and administrators. The current documented modules cover password-based authentication, refresh-token rotation, role-based authorization, and authenticated user profile management.

Modules

Backend Shape

The backend uses a feature-folder Express architecture:

  • Routes define paths and middleware.
  • Controllers translate HTTP input and output.
  • Services enforce business rules.
  • Repositories own SQL.
  • DTOs shape public responses and prevent sensitive data leaks.

Main Capabilities

  • Password-based registration and login for CUSTOMER and MECHANIC users.
  • JWT access tokens and rotating JWT refresh tokens.
  • Refresh-token reuse detection with token-family revocation.
  • Role-based authorization with CUSTOMER, MECHANIC, and ADMIN roles.
  • Authenticated user profile read and update APIs.
  • PostgreSQL migrations for auth tables and profile columns.

On this page