├── backend ├── src │ ├── privateKey.ts │ ├── config.ts │ ├── index.ts │ ├── types.ts │ ├── db.ts │ ├── middleware.ts │ └── routers │ │ ├── user.ts │ │ └── worker.ts ├── .gitignore ├── prisma │ ├── migrations │ │ ├── 20240509112516_add_done_to_task │ │ │ └── migration.sql │ │ ├── migration_lock.toml │ │ ├── 20240509111720_remove_balance_id │ │ │ └── migration.sql │ │ ├── 20240509104304_remove_option_id │ │ │ └── migration.sql │ │ ├── 20240509120311_add_uniqueness_constraint │ │ │ └── migration.sql │ │ ├── 20240509121358_make_it_number │ │ │ └── migration.sql │ │ ├── 20240509123710_add_payouts │ │ │ └── migration.sql │ │ └── 20240509084558_init │ │ │ └── migration.sql │ └── schema.prisma ├── package.json ├── tsconfig.json └── yarn.lock ├── user-frontend ├── .eslintrc.json ├── app │ ├── globals.css │ ├── favicon.ico │ ├── (root) │ │ ├── page.tsx │ │ ├── layout.tsx │ │ └── task │ │ │ └── [taskId] │ │ │ └── page.tsx │ └── layout.tsx ├── next.config.mjs ├── utils │ └── index.ts ├── postcss.config.mjs ├── components │ ├── Hero.tsx │ ├── Appbar.tsx │ ├── UploadImage.tsx │ └── Upload.tsx ├── .gitignore ├── tailwind.config.ts ├── public │ ├── vercel.svg │ └── next.svg ├── tsconfig.json ├── package.json └── README.md └── worker-frontend ├── .eslintrc.json ├── app ├── globals.css ├── favicon.ico ├── (root) │ ├── page.tsx │ └── layout.tsx └── layout.tsx ├── next.config.mjs ├── utils └── index.ts ├── postcss.config.mjs ├── .gitignore ├── tailwind.config.ts ├── public ├── vercel.svg └── next.svg ├── tsconfig.json ├── package.json ├── README.md └── components ├── Appbar.tsx └── NextTask.tsx /backend/src/privateKey.ts: -------------------------------------------------------------------------------- 1 | 2 | export const privateKey = ""; -------------------------------------------------------------------------------- /user-frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /worker-frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /user-frontend/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /worker-frontend/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | # Keep environment variables out of version control 4 | .env 5 | -------------------------------------------------------------------------------- /user-frontend/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code100x/decentralized-fiverr/HEAD/user-frontend/app/favicon.ico -------------------------------------------------------------------------------- /worker-frontend/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code100x/decentralized-fiverr/HEAD/worker-frontend/app/favicon.ico -------------------------------------------------------------------------------- /user-frontend/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /worker-frontend/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /user-frontend/utils/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export const BACKEND_URL = "http://localhost:3000"; 3 | export const CLOUDFRONT_URL = "https://d2szwvl7yo497w.cloudfront.net" -------------------------------------------------------------------------------- /worker-frontend/utils/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export const BACKEND_URL = "http://localhost:3000"; 3 | export const CLOUDFRONT_URL = "https://d2szwvl7yo497w.cloudfront.net" -------------------------------------------------------------------------------- /backend/prisma/migrations/20240509112516_add_done_to_task/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Task" ADD COLUMN "done" BOOLEAN NOT NULL DEFAULT false; 3 | -------------------------------------------------------------------------------- /backend/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /user-frontend/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /worker-frontend/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /backend/src/config.ts: -------------------------------------------------------------------------------- 1 | export const JWT_SECRET = process.env.JWT_SECRET ?? "kirat123"; 2 | export const WORKER_JWT_SECRET = JWT_SECRET + "worker"; 3 | 4 | export const TOTAL_DECIMALS = 1000_000; 5 | 6 | // 1/1000_000_000_000_000_000 -------------------------------------------------------------------------------- /backend/prisma/migrations/20240509111720_remove_balance_id/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `balance_id` on the `Worker` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Worker" DROP COLUMN "balance_id"; 9 | -------------------------------------------------------------------------------- /worker-frontend/app/(root)/page.tsx: -------------------------------------------------------------------------------- 1 | import { Appbar } from "@/components/Appbar"; 2 | import { NextTask } from "@/components/NextTask"; 3 | import Image from "next/image"; 4 | 5 | export default function Home() { 6 | return ( 7 |