Skip to content

EasyFixerApp/easy-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

94 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub license Node.js TypeScript Express Next.js React Prisma Tailwind CSS

Easy Fixer

Easy Fixer is an intelligent platform designed to seamlessly connect individuals in need of on-site servicesβ€”such as home or building repairsβ€”with nearby skilled professionals. By leveraging real-time location data, the system efficiently matches service requests with available workers in the area. This not only ensures rapid problem resolution for users but also creates valuable job opportunities for local service providers.

Table of Contents

✨ Key Features

πŸ‘€ Clients

  • Seamless Onboarding: Clients sign up and quickly complete a guided onboarding process.
  • Effortless Service Requests: Submit detailed service requests with descriptions, location, and optional images.
  • Real-Time Matching: Instantly get matched with nearby skilled workers based on service needs and availability.
  • Service Tracking: Monitor the status of requests from creation to completion.
  • Feedback System: Mark jobs as complete and rate workers to maintain service quality.

πŸ› οΈ Workers

  • Profile Setup: Sign up, create a professional profile, and define your service radius and availability.
  • Job Discovery & Matching: Browse open jobs or receive automatic job matches tailored to your skills and location.
  • Task Execution: Accept assignments, complete them, and upload evidence of completion.
  • Earnings & Reviews: Track your earnings, receive client feedback, and manage your work history.

πŸ›‘οΈ Admins

  • Platform Oversight: Use dashboards to monitor real-time platform activity and key metrics.
  • User & Dispute Management: Handle user accounts, resolve disputes, and oversee request statuses.
  • System Configuration: Manage service categories, platform settings, and access in-depth reporting tools.

πŸš€ Quick Start

Prerequisites

  • Node.js (v22.15.0) - for easier version management use nvm
  • Docker and Docker Compose (for running development container: PostgreSQL database)
  • Git

Click to download: node, nvm, docker, git

Setup Guide

  1. Clone the repository
  2. Use correct Node version
  3. Setup the DB local server
  4. Install dependencies
  5. Start development environment
git clone https://github.com/EasyFixerApp/easy-fixer.git
cd easy-fixer

# If you have nvm installed or make sure you've the correct version
nvm use

# If you're running your own local db server, add the url to /api/.env
npm run docker:setup

# Should generate all needed additional files
npm install

# This should run the project locally with all its dependencies
npm run dev

That's it! The API will be available at http://localhost:4000 and the web app at http://localhost:3000.

Note

For running locally, you might not need to set environment variables. If needed, edit the .env files created in apps/api/ and apps/web/.

πŸ“š API Documentation

API documentation (OAS3) is automatically generated. After starting the local API server, you can access the API documentation at:

http://localhost:4000/api-docs

or

code ./apps/api/docs/oas.json
code ./apps/api/docs/oas.yaml

πŸ›  Tech Stack

Common

  • TypeScript - Type safety and developer experience
  • Vitest - Testing framework
  • ESLint - Code linting
  • Prettier - Code formatting
  • Husky - Git hooks
  • GitHub Actions - Enforcing standards and CI/CD

Frontend

  • Next.js 15/React 19 - React framework with server-side rendering
  • Tailwind CSS 4 - Utility-first CSS framework
  • React Query - Data fetching and server state management
  • Axios - HTTP client for API requests
  • React Hook Form - Form handling

Backend

  • Express.js 5 - Node.js web application framework
  • Prisma 6 - Next-generation ORM for Node.js and TypeScript
  • PostgreSQL - Relational database (via Docker)
  • Zod - TypeScript-first schema validation
  • Swagger/OpenAPI - API documentation
  • Winston - Logging library
  • Helmet - Security middleware
  • Express Rate Limit - API rate limiting

πŸ— Project Structure

This project uses a monorepo structure organized into three main sections:

Root Structure

easy-fixer/
β”œβ”€β”€ apps/               # Application code (API and web)
β”‚   β”œβ”€β”€ web/            # Next App
β”‚   └── api/            # Express App
β”œβ”€β”€ packages/           #
β”‚   └── shared/         # Shared code package
β”œβ”€β”€ scripts/            # Helper scripts
β”œβ”€β”€ docs/               # Project documentation, standards, ...
β”œβ”€β”€ package.json        # Root package configuration
β”œβ”€β”€ .nvmrc              # Node version specification
β”œβ”€β”€ .npmrc              # NPM configuration
└── README.md           # This file

API Structure

apps/api/
β”œβ”€β”€ docs/               # API documentation files, e.g. generated oas.yaml, erd.svg
β”œβ”€β”€ prisma/             # Database schema and migrations
β”œβ”€β”€ src/                # Source code
β”‚   β”œβ”€β”€ features/       # API features by domain or feature
β”‚   β”‚   β”œβ”€β”€ example/    # Example: user-related files
β”‚   β”‚   β”‚   β”‚             These sub-modules can be removed or extended as needed
β”‚   β”‚   β”‚   β”œβ”€β”€ controllers/ # Request handlers
β”‚   β”‚   β”‚   └── services/    # Business logic and db interactions
β”‚   β”‚   β”‚   β”œβ”€β”€ repo/        # Data access, a facade between Prisma and the service
β”‚   β”‚   β”‚   β”œβ”€β”€ models/      # Data model and DTOs, validation schemas, mappers
β”‚   β”‚   β”‚   β”œβ”€β”€ middleware/  # Middlewares specific to this feature
β”‚   β”‚   β”‚   β”œβ”€β”€ router/      # Routes and their OAS docs as YAML JSDoc
β”‚   β”‚   β”‚   β”œβ”€β”€ docs/        # Support for docs such as Response OAS schemas
β”‚   β”‚   └── v1.router.ts     # API version router that includes all features routes
β”‚   β”œβ”€β”€ middleware/     # Global or app middlewares
β”‚   β”œβ”€β”€ lib/            # Reusable core modules. e.g. db client, logger instance
β”‚   β”œβ”€β”€ utils/          # Small, pure, generic helper functions
β”‚   β”œβ”€β”€ types/          # TypeScript global type definitions
β”‚   β”œβ”€β”€ config/         # Application configuration
β”‚   β”œβ”€β”€ app.ts          # Express app setup
β”‚   └── server.ts       # Entry point
β”œβ”€β”€ tests/              # Test files
β”‚   β”œβ”€β”€ integration/    # Integration tests
β”‚   └── unit/           # Unit tests
β”‚       └── src/features/user/services/
β”‚           └── crud.test.ts
β”œβ”€β”€ scripts/            # API utility scripts
β”œβ”€β”€ logs/               # Generated logs
β”œβ”€β”€ compose.yaml        # Docker Compose configuration
└── package.json        # API package configuration

Web Structure

See next project structure docs

apps/web/
β”œβ”€β”€ public/             # Static assets
β”œβ”€β”€ src/                # Source code
β”‚   β”œβ”€β”€ app/            # Next.js app router
β”‚   β”‚   β”œβ”€β”€ layout.tsx      # Root layout (shared UI for all pages)
β”‚   β”‚   β”œβ”€β”€ template.tsx    # Root template (preserves state on navigation)
β”‚   β”‚   β”œβ”€β”€ not-found.tsx   # Custom 404 page
β”‚   β”‚   β”œβ”€β”€ loading.tsx     # Global loading UI
β”‚   β”‚   β”œβ”€β”€ error.tsx       # Global error handler
β”‚   β”‚   β”œβ”€β”€ page.tsx        # Landing page content
β”‚   β”‚   β”œβ”€β”€ dashboard/      # Dashboard feature
β”‚   β”‚   β”‚    β”œβ”€β”€ page.tsx           # Dashboard main content
β”‚   β”‚   β”‚    β”œβ”€β”€ layout.tsx         # Dashboard layout wrapper
β”‚   β”‚   β”‚    β”œβ”€β”€ components/        # Dashboard-specific components
β”‚   β”‚   β”‚    β”œβ”€β”€ hooks/             # Dashboard-specific hooks
β”‚   β”‚   β”‚    └── utils/             # Dashboard-specific utilities
β”‚   β”‚   β”œβ”€β”€ [slug]/         # Dynamic route example
β”‚   β”‚   β”œβ”€β”€ (group)/        # Route grouping example (doesn't affect URL)
β”‚   β”‚   β”‚    β”œβ”€β”€ login/     # Auth login route
β”‚   β”‚   β”‚    └── logout/    # Auth logout route
β”‚   β”‚   └── _private/       # Private folder (not included in routing)
β”‚   β”œβ”€β”€ components/     # Shared reusable components
β”‚   β”œβ”€β”€ hooks/          # Shared React hooks
β”‚   β”œβ”€β”€ lib/            # Core libraries & utilities
β”‚   β”œβ”€β”€ services/       # External service integrations
β”‚   β”‚   └── api/        # API client for backend communication
β”‚   β”œβ”€β”€ styles/         # Global styling & theme configuration
β”‚   β”œβ”€β”€ types/          # TypeScript global type definitions
β”‚   β”œβ”€β”€ store/          # Global state management (if needed)
β”‚   └── utils/          # Shared utility functions
β”œβ”€β”€ tests/              # Test files
└── package.json        # Web package configuration

πŸ› Architecture Principles

System Architecture

While this project uses a monorepo for easier development, it's designed with distributed and decoupled implementation in mind. The architecture follows a clear separation of concerns:

  • Web App (Next.js): Responsible solely for generating the view layer for end users, whether through server-side rendering (SSR), client-side rendering (CSR), or static site generation (SSG).

  • API (Express): Handles all business logic and controls the flow between (end users/client apps) and the database. It exposes a RESTful interface that any client can consume.

This architectural decision provides several advantages:

  • Platform Flexibility: New client applications (mobile apps, desktop apps) can be added without duplicating business logic
  • Scalability: Each component can be scaled independently based on its specific needs
  • Maintainability: Clear boundaries make the codebase easier to understand and modify
  • Deployment Options: Components can be deployed separately if needed as the system grows

The project pragmatically encourages modularity and discourages tight coupling between components, leading to improved developer experience, easier maintenance, and better scalability as the application grows.

Core Organization Principles

The project follows a feature-first architecture (also known as vertical slicing or modular architecture) that prioritizes organizing code by domain/ features/use cases rather than technical layers.

  • Features over Technical Layers: Code is primarily organized by feature/domain, then by technical concern within each feature

    # Express Example
    features/user/(controller.ts, service.ts, repo.ts)
    
    # Next.js Example
    app/home/(page.tsx, components/, hooks/)
    
  • Cross-Cutting Concerns Placement: Common utilities and shared code are placed at the closest appropriate level to their consumers

    # Global middleware
    src/middleware/
    # Feature-specific middleware
    src/features/user/middleware/
    
    # Global components
    src/components/
    # Feature-specific components
    src/app/home/components/
    
  • Folder Structure Pragmatism: Folders are only created when multiple related files exist

    # Single controller
    features/user/controller.ts
    # Multiple controllers
    features/user/controllers/auth.ts, profile.ts
    
  • Single Responsibility Files: Each file should generally have one main export named after the file. This is pragmaticβ€”not a rigid rule. For instance, Small, closely related functionalities can be grouped in one file as long as the file remains focused and manageable.

    errorHandler.ts       # exports function errorHandler
    
    # example exception
    features/
    └── user/
      β”œβ”€β”€ router.ts       # exports userRouter but named differently, context is enough.
    
  • Tests: test folders structure should reflect the structure in src as much as possible.

This architecture promotes:

  • πŸ” Better discoverability - related code stays together
  • πŸ”„ Easier feature iteration - changes to a feature affect only its directory
  • 🧩 Clear boundaries - dependencies between features are explicit
  • πŸš€ Improved maintainability - new team members can understand isolated features more quickly

πŸ’» Development

For more information see CONTRIBUTING

For moving between the app directories you can use the following installed commands:

go-root
go-api
go-web

Most scripts can be run in specific workspaces by adding -w followed by the workspace name:

# Run a script in the root workspace
npm run [script]

# Run a command in specific workspace [web, api, easy-fixer-shared]
npm run [script] -w [name]

Main scripts:

# Development
npm run dev                 # Run the project in development mode
npm run build               # Build all packages and applications
npm run start               # Start all applications in production mode

# Testing & Quality
npm run test                # Run all tests
npm run test:coverage       # Run tests with coverage report
npm run test:watch          # Run tests in watch mode for Test Driven Development
npm run test:ui             # Run tests with vitest user interface

npm run lint:check          # Check linting in all packages
npm run lint:fix            # Fix linting issues in all packages
npm run format:check        # Check formatting with Prettier
npm run format:fix          # Fix formatting issues with Prettier
npm run check:staged        # Checks quality only for staged files, auto on commit

# Database
npm run docker:setup        # Set up development Docker container for database
npm run db:setup -w api     # Initialize and set up the database

# Documentation
npm run oas:generate -w api # Generate OpenAPI documentation

# Environment & Cleanup
npm run setup:env           # Set up development environment variables
npm run setup:nav           # Set up navigation helpers
npm run clean:all           # Clean all build artifacts and node_modules

πŸ‘₯ Join the Team

This is not an open source project, but we welcome new team members! If you're interested in joining the development team, please contact the current developers.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Connects clients with local service providers for maintenance, repairs, and other on-site tasks.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •