# prasetyowibowoo/karyahub architecture

> Architecture diagram of the GitHub repository prasetyowibowoo/karyahub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prasetyowibowoo/karyahub
- Repository: https://github.com/prasetyowibowoo/karyahub

## Overview

KaryaHub is a marketplace connecting freelancers with local UMKMs. Its documented workflow runs from project discovery and bidding through employer selection, deliverable review, and escrow payment; the freelancer side also includes an ATS CV evaluator and earnings dashboard. The graph follows documented capabilities and the listed route structure. Source excerpts are mostly empty, so detailed call wiring between individual pages, handlers, and helpers cannot be verified; edges reflect README-documented relationships.

Main entry points: [`src/app/jobs/page.tsx`](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/jobs/page.tsx) (Job Catalogue), [`src/app/api/jobs/route.ts`](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/jobs/route.ts) (Job API), [`src/lib/midtrans.ts`](https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/midtrans.ts) (Midtrans Gateway), [`src/app/(dashboard)/freelancer/ats-checker/page.tsx`](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/ats-checker/page.tsx) (ATS Checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_freelancer_dashboard["Freelancer Dashboard<br/>[page.tsx]"]
  node_umkm_dashboard["UMKM Dashboard<br/>[page.tsx]"]
  node_auth["Account Access<br/>[page.tsx]"]
  node_ats_ui["ATS Checker<br/>[page.tsx]"]
end

subgraph group_marketplace["Project Marketplace"]
  node_job_catalogue["Job Catalogue<br/>[page.tsx]"]
  node_job_detail["Job Details<br/>[page.tsx]"]
  node_job_management["Job Management<br/>[page.tsx]"]
  node_job_api["Job API<br/>[route.ts]"]
  node_proposal_api["Proposal API<br/>[route.ts]"]
  node_proposal_review["Applicant Review<br/>[page.tsx]"]
end

subgraph group_work_payments["Work &amp; Payments"]
  node_submission_api["Deliverable API<br/>[route.ts]"]
  node_reviews_api["Review API<br/>[route.ts]"]
  node_wallet["Freelancer Wallet<br/>[page.tsx]"]
  node_escrow_status["Escrow Status<br/>[page.tsx]"]
  node_charge_api["Escrow Deposit API<br/>[route.ts]"]
  node_release_api["Payment Release API<br/>[route.ts]"]
  node_webhook["Payment Webhook<br/>[route.ts]"]
end

subgraph group_services["Backend Services"]
  node_ats_api["ATS Scan API<br/>[route.ts]"]
  node_ats_engine["ATS Evaluator<br/>[ats-engine.ts]"]
  node_midtrans["Midtrans Gateway<br/>[midtrans.ts]"]
  node_database[("PostgreSQL Database")]
  node_prisma["Prisma Client<br/>[prisma.ts]"]
end

node_freelancer(("Freelancer"))
node_umkm(("UMKM Employer"))
node_midtrans_service["Midtrans"]

node_freelancer -->|"signs in"| node_auth
node_umkm -->|"signs in"| node_auth
node_freelancer -->|"searches projects"| node_job_catalogue
node_job_catalogue -.->|"requests listings"| node_job_api
node_job_catalogue -.->|"opens listing"| node_job_detail
node_umkm -->|"posts projects"| node_job_management
node_job_management -.->|"manages projects"| node_job_api
node_freelancer -->|"submits bid"| node_proposal_api
node_umkm -->|"reviews applicants"| node_proposal_review
node_proposal_review -.->|"reviews proposals"| node_proposal_api
node_freelancer -->|"checks CV"| node_ats_ui
node_ats_ui -.->|"requests scan"| node_ats_api
node_ats_api -.->|"evaluates CV"| node_ats_engine
node_freelancer -->|"submits deliverable"| node_submission_api
node_umkm -->|"approves work"| node_reviews_api
node_umkm -->|"deposits funds"| node_charge_api
node_charge_api -.->|"creates deposit"| node_midtrans
node_midtrans -->|"processes payment"| node_midtrans_service
node_midtrans_service -.->|"sends events"| node_webhook
node_umkm -->|"releases payment"| node_release_api
node_release_api -.->|"requests release"| node_midtrans
node_freelancer -->|"tracks earnings"| node_wallet
node_umkm -->|"checks escrow"| node_escrow_status
node_job_api -->|"uses ORM"| node_prisma
node_prisma -->|"accesses data"| node_database

click node_freelancer_dashboard "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/page.tsx"
click node_umkm_dashboard "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/page.tsx"
click node_auth "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(auth)/login/page.tsx"
click node_job_catalogue "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/jobs/page.tsx"
click node_job_detail "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/jobs/%5Bid%5D/page.tsx"
click node_job_management "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/manage-jobs/%5Bid%5D/page.tsx"
click node_job_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/jobs/route.ts"
click node_proposal_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/proposals/route.ts"
click node_ats_ui "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/ats-checker/page.tsx"
click node_ats_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/ats/scan/route.ts"
click node_ats_engine "https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/ats-engine.ts"
click node_proposal_review "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/manage-jobs/%5Bid%5D/page.tsx"
click node_submission_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/submissions/route.ts"
click node_reviews_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/reviews/route.ts"
click node_wallet "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/wallet/page.tsx"
click node_escrow_status "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/escrow-status/page.tsx"
click node_charge_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/escrow/charge/route.ts"
click node_release_api "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/escrow/release/route.ts"
click node_midtrans "https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/midtrans.ts"
click node_webhook "https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/webhooks/midtrans/route.ts"
click node_prisma "https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/prisma.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_freelancer_dashboard,node_umkm_dashboard,node_auth,node_ats_ui toneBlue
class node_job_catalogue,node_job_detail,node_job_management,node_job_api,node_proposal_api,node_proposal_review toneAmber
class node_submission_api,node_reviews_api,node_wallet,node_escrow_status,node_charge_api,node_release_api,node_webhook toneMint
class node_ats_api,node_ats_engine,node_midtrans,node_database,node_prisma toneRose
class node_freelancer,node_umkm,node_midtrans_service toneIndigo
```

## Components

### User Experience

- [Freelancer Dashboard](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/page.tsx): `src/app/(dashboard)/freelancer/page.tsx`
- [UMKM Dashboard](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/page.tsx): `src/app/(dashboard)/umkm/page.tsx`
- [Account Access](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [ATS Checker](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/ats-checker/page.tsx): `src/app/(dashboard)/freelancer/ats-checker/page.tsx`

### Project Marketplace

- [Job Catalogue](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/jobs/page.tsx): `src/app/jobs/page.tsx`
- [Job Details](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/jobs/%5Bid%5D/page.tsx): `src/app/jobs/[id]/page.tsx`
- [Job Management](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/manage-jobs/%5Bid%5D/page.tsx): `src/app/(dashboard)/umkm/manage-jobs/[id]/page.tsx`
- [Job API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/jobs/route.ts): `src/app/api/jobs/route.ts`
- [Proposal API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/proposals/route.ts): `src/app/api/proposals/route.ts`
- [Applicant Review](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/manage-jobs/%5Bid%5D/page.tsx): `src/app/(dashboard)/umkm/manage-jobs/[id]/page.tsx`

### Work & Payments

- [Deliverable API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/submissions/route.ts): `src/app/api/submissions/route.ts`
- [Review API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/reviews/route.ts): `src/app/api/reviews/route.ts`
- [Freelancer Wallet](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/freelancer/wallet/page.tsx): `src/app/(dashboard)/freelancer/wallet/page.tsx`
- [Escrow Status](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/(dashboard)/umkm/escrow-status/page.tsx): `src/app/(dashboard)/umkm/escrow-status/page.tsx`
- [Escrow Deposit API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/escrow/charge/route.ts): `src/app/api/escrow/charge/route.ts`
- [Payment Release API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/escrow/release/route.ts): `src/app/api/escrow/release/route.ts`
- [Payment Webhook](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/webhooks/midtrans/route.ts): `src/app/api/webhooks/midtrans/route.ts`

### Backend Services

- [ATS Scan API](https://github.com/prasetyowibowoo/karyahub/blob/main/src/app/api/ats/scan/route.ts): `src/app/api/ats/scan/route.ts`
- [ATS Evaluator](https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/ats-engine.ts): `src/lib/ats-engine.ts`
- [Midtrans Gateway](https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/midtrans.ts): `src/lib/midtrans.ts`
- **PostgreSQL Database**
- [Prisma Client](https://github.com/prasetyowibowoo/karyahub/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`

### Other components

- **Freelancer**
- **UMKM Employer**
- **Midtrans**

## Connections

- Freelancer → Account Access: signs in (evidence: `README.md`)
- UMKM Employer → Account Access: signs in (evidence: `README.md`)
- Freelancer → Job Catalogue: searches projects (evidence: `README.md`)
- Job Catalogue → Job API: requests listings
- Job Catalogue → Job Details: opens listing
- UMKM Employer → Job Management: posts projects (evidence: `README.md`)
- Job Management → Job API: manages projects
- Freelancer → Proposal API: submits bid (evidence: `README.md`)
- UMKM Employer → Applicant Review: reviews applicants (evidence: `README.md`)
- Applicant Review → Proposal API: reviews proposals
- Freelancer → ATS Checker: checks CV (evidence: `README.md`)
- ATS Checker → ATS Scan API: requests scan
- ATS Scan API → ATS Evaluator: evaluates CV
- Freelancer → Deliverable API: submits deliverable (evidence: `README.md`)
- UMKM Employer → Review API: approves work (evidence: `README.md`)
- UMKM Employer → Escrow Deposit API: deposits funds (evidence: `README.md`)
- Escrow Deposit API → Midtrans Gateway: creates deposit
- Midtrans Gateway → Midtrans: processes payment (evidence: `README.md`)
- Midtrans → Payment Webhook: sends events
- UMKM Employer → Payment Release API: releases payment (evidence: `README.md`)
- Payment Release API → Midtrans Gateway: requests release
- Freelancer → Freelancer Wallet: tracks earnings (evidence: `README.md`)
- UMKM Employer → Escrow Status: checks escrow (evidence: `README.md`)
- Job API → Prisma Client: uses ORM (evidence: `README.md`)
- Prisma Client → PostgreSQL Database: accesses data (evidence: `README.md`)
