Skip to content

Latest commit

 

History

278 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔧 TechFix

Electronic Repair Service Management System

Java 17 Android NestJS TypeScript PostgreSQL Prisma Supabase Google Maps

A full-stack platform for managing electronic repair services, customers, devices, branches, technicians, spare parts, inventory, service requests, payments, and service images.


📖 Overview

TechFix is an electronic repair service management system developed to centralize the repair-service workflow into a single digital platform.

The system combines an Android application with a NestJS REST API and PostgreSQL database. Customers can manage their devices, browse repair services, submit service requests, provide their location, monitor service progress, manage payment records, and locate branches.

Staff members can manage branches, technicians, services, spare parts, inventory, service requests, payments, and service sample images.


✨ Key Features

👤 Customer Management

  • Customer registration and login
  • Profile information
  • Device management
  • Customer dashboard
  • Service request history

📱 Device Management

Customers can register and manage electronic devices including type, brand, model, and nickname.

🛠️ Repair Services

Services support:

  • Name
  • Description
  • Device type
  • Base price
  • Active status

📋 Service Requests

Customers select a service, registered device, and location to submit a repair request.

PENDING → ASSIGNED → ACCEPTED → IN_PROGRESS → COMPLETED

Requests can also be cancelled.

📍 Intelligent Branch Recommendation

The system filters active branches by:

  • Required spare-part availability
  • Required part quantities
  • Active technician availability

It then calculates customer-to-branch distance using the Haversine formula, sorts eligible branches by distance, and assigns the nearest eligible branch.

Customer Location
       ↓
Active Branches
       ↓
Check Required Parts
       ↓
Check Active Technicians
       ↓
Calculate Distance
       ↓
Sort by Distance
       ↓
Select Nearest Eligible Branch
       ↓
Assign Branch

👨‍🔧 Technician Management

Manage technician name, contact information, specialization, branch, active status, and service assignments.

🔧 Spare Parts & Inventory

Manage spare parts and branch-specific inventory, including minimum stock levels and low-stock detection.

quantity <= minStock

🔗 Service Parts

Services can be linked with required spare parts and quantities.

💳 Payment Management

Supported payment methods:

CARD
ONLINE
CASH

Supported statuses:

PENDING
PAID
FAILED
REFUNDED

A production third-party payment gateway has not yet been integrated.

🖼️ Service Sample Images

Staff can upload service images through NestJS. Images are stored in Supabase Storage while their public URLs are stored in PostgreSQL.

📊 Customer Dashboard

Provides dynamic profile information, device count, active service count, total service count, active service details, device information, service information, and branch information.

Endpoint:

GET /profiles/{profileId}/dashboard

📈 Admin Dashboard

Provides database-derived statistics including service requests, customers, technicians, branches, services, devices, inventory, low-stock items, and payments.

Endpoint:

GET /admin-dashboard

🗺️ Google Maps Integration

Branch latitude and longitude are used to open branch locations in Google Maps through Android intents.


🏗️ Architecture

┌──────────────────────────────┐
│        Android App           │
│    Customer / Staff UI       │
└──────────────┬───────────────┘
               │ Retrofit / HTTP
               ▼
┌──────────────────────────────┐
│       NestJS Backend         │
│ Controllers • Services       │
│ Business Logic • Validation  │
└──────────────┬───────────────┘
               │ Prisma ORM
               ▼
┌──────────────────────────────┐
│         PostgreSQL           │
│ Profiles • Devices • Services│
│ Branches • Inventory         │
│ Requests • Payments          │
└──────────────────────────────┘
               │
               ▼
┌──────────────────────────────┐
│       Supabase Storage       │
│      Service Images          │
└──────────────────────────────┘

🧰 Technology Stack

Technology Purpose
Java Android application
Android Studio Android development
XML UI layouts
Material Design UI components
Retrofit REST API communication
Gson JSON conversion
OkHttp HTTP networking
Node.js Backend runtime
NestJS Backend framework
TypeScript Backend development
Prisma ORM
PostgreSQL Relational database
Supabase Cloud services
Supabase Storage Image storage
Google Maps Branch navigation

🗄️ Database

Main Entities

Profile
Device
Branch
Service
Technician
Part
Inventory
ServicePart
ServiceRequest
Payment
ServiceSampleImage

Main Relationships

Profile
  ├── Device
  └── ServiceRequest

Service
  ├── ServiceRequest
  ├── ServicePart
  └── ServiceSampleImage

Branch
  ├── Technician
  ├── Inventory
  └── ServiceRequest

Part
  ├── Inventory
  └── ServicePart

ServiceRequest
  ├── Profile
  ├── Device
  ├── Service
  ├── Branch
  ├── Technician
  └── Payment

🔌 REST API

Authentication

POST /profiles/login
POST /profiles/register

Devices

GET /devices/profile/{profileId}
POST /devices
DELETE /devices/{id}

Branches

GET /branches
POST /branches

Services

GET /services
POST /services

Technicians

GET /technicians
POST /technicians

Parts

GET /parts
POST /parts

Inventory

GET /inventory
POST /inventory
GET /inventory/low-stock

Service Parts

GET /service-parts/service/{serviceId}
POST /service-parts
DELETE /service-parts/{id}

Service Requests

POST /service-requests
GET /service-requests
GET /service-requests/customer/{profileId}
GET /service-requests/{id}
POST /service-requests/{id}/recommend
POST /service-requests/{id}/assign-technician
POST /service-requests/{id}/complete

Payments

POST /payments
GET /payments/service-request/{serviceRequestId}

Service Images

POST /service-sample-images
POST /service-sample-images/upload
GET /service-sample-images/service/{serviceId}
GET /service-sample-images/{id}
DELETE /service-sample-images/{id}

Dashboards

GET /profiles/{profileId}/dashboard
GET /admin-dashboard

📂 Project Structure

TechFix/
│
├── android/
│   └── app/
│       └── src/main/
│           ├── java/com/abbys/techfix/
│           │   ├── data/
│           │   │   ├── dto/
│           │   │   ├── model/
│           │   │   └── network/
│           │   ├── customer/
│           │   └── admin/
│           └── res/
│               ├── layout/
│               ├── drawable/
│               ├── mipmap/
│               └── values/
│
└── backend/
    ├── prisma/
    │   ├── schema.prisma
    │   └── migrations/
    └── src/
        ├── profiles/
        ├── devices/
        ├── branches/
        ├── services/
        ├── technicians/
        ├── parts/
        ├── inventory/
        ├── service-parts/
        ├── service-requests/
        ├── payments/
        ├── service-sample-images/
        ├── admin-dashboard/
        ├── prisma/
        └── supabase/

🚀 Getting Started

Prerequisites

  • Node.js
  • npm
  • Android Studio
  • JDK
  • PostgreSQL or Supabase PostgreSQL
  • Git

Clone

git clone <YOUR_REPOSITORY_URL>
cd TechFix

Backend

cd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run start:dev

Development API:

http://localhost:3000

Android

Open the Android project in Android Studio.

For the Android Emulator:

http://10.0.2.2:3000/

For a physical device, use the development machine's local IP address, for example:

http://192.168.1.10:3000/

🔐 Environment Configuration

Keep sensitive values outside source control.

Example:

DATABASE_URL=your_database_url
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key

Do not commit:

.env
local.properties

or other files containing private credentials.


🧪 Testing

Backend

  • Authentication
  • CRUD operations
  • Service requests
  • Branch recommendation
  • Technician assignment
  • Inventory
  • Low-stock detection
  • Payments
  • Image uploads
  • Dashboard endpoints

Android

  • Registration
  • Login
  • Device management
  • Service browsing
  • Service requests
  • Location handling
  • Customer dashboard
  • Payment records
  • Branch navigation
  • API error handling

🔄 Service Request Workflow

Customer Login
      ↓
Select Device
      ↓
Select Service
      ↓
Provide Location
      ↓
Create Request
      ↓
PENDING
      ↓
Branch Recommendation
      ↓
ASSIGNED
      ↓
Technician Assignment
      ↓
ACCEPTED
      ↓
IN_PROGRESS
      ↓
COMPLETED
      ↓
Payment Record

🛡️ Security & Validation

The project uses:

  • Password hashing
  • Primary keys
  • Foreign keys
  • Unique constraints
  • Database indexes
  • Enum values
  • Backend validation
  • Record existence checks
  • Image file validation
  • Business-rule validation
  • Environment-based secret configuration

⚠️ Current Limitations

  • No production payment gateway integration
  • Internet connection is required for API-based functionality
  • Google Maps navigation currently opens the external Google Maps application
  • Push notifications are not currently implemented
  • Advanced analytics and reporting can be expanded

🔮 Future Enhancements

  • 💳 Production payment gateway integration
  • 🔔 Push notifications
  • 📧 Email notifications
  • 👨‍🔧 Technician mobile workflow
  • 📅 Appointment scheduling
  • 💬 Customer-technician chat
  • 🗺️ In-app maps
  • 📷 Before/after repair image management
  • 📈 Branch performance reports
  • 💰 Revenue reports
  • 📋 Detailed customer service history
  • 📊 Advanced analytics

🎓 Academic Project

TechFix was developed as an academic software engineering project at NIBM.

The project demonstrates practical application of:

  • Mobile application development
  • REST API development
  • Relational database design
  • ORM-based data access
  • Cloud storage
  • API integration
  • Location services
  • CRUD operations
  • Business logic
  • Input validation
  • Error handling
  • Software architecture
  • Testing

📜 License

This project was developed as an academic project.

If the repository is intended for public distribution, add an appropriate open-source license.


🔧 TechFix

Connecting customers, technicians, branches, services, inventory, and payments through one platform.

⭐ If you find this project useful, consider giving the repository a star.

About

TechFix is an electronic repair service management system developed to centralize the repair-service workflow into a single digital platform.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages