{"id":51618948,"url":"https://github.com/joao1barbosa/csv-operator-distribution","last_synced_at":"2026-07-12T17:30:39.046Z","repository":{"id":255566218,"uuid":"852390127","full_name":"joao1barbosa/csv-operator-distribution","owner":"joao1barbosa","description":"Full-stack application for assigning clients to operators with CSV import and export.","archived":false,"fork":false,"pushed_at":"2026-07-04T21:17:25.000Z","size":6338,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-07-04T23:08:49.886Z","etag":null,"topics":["csv","docker","mysql","nestjs","nextjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joao1barbosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-04T18:12:21.000Z","updated_at":"2026-07-04T21:17:28.000Z","dependencies_parsed_at":"2024-09-21T11:02:51.953Z","dependency_job_id":"b270b384-f6cd-4923-a3fe-7837973e8be5","html_url":"https://github.com/joao1barbosa/csv-operator-distribution","commit_stats":null,"previous_names":["joao1barbosa/csv-operator-assignment","joao1barbosa/csv-operator-distribution"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joao1barbosa/csv-operator-distribution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao1barbosa%2Fcsv-operator-distribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao1barbosa%2Fcsv-operator-distribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao1barbosa%2Fcsv-operator-distribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao1barbosa%2Fcsv-operator-distribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joao1barbosa","download_url":"https://codeload.github.com/joao1barbosa/csv-operator-distribution/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao1barbosa%2Fcsv-operator-distribution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35398566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","docker","mysql","nestjs","nextjs","typescript"],"created_at":"2026-07-12T17:30:38.661Z","updated_at":"2026-07-12T17:30:39.040Z","avatar_url":"https://github.com/joao1barbosa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 CSV Operator Distribution\n\n\u003e A full-stack technical challenge: bulk-register clients from a CSV upload and distribute them across operators — with CSV import/export and a per-layer tested NestJS API. TypeScript end to end.\n\n## 📋 Overview\n\nSolution to a full-stack technical challenge. The app lets you view operators and the\nclients assigned to them, register clients in bulk by uploading a CSV (each client is\ndistributed to an operator on upload), and export all clients back to CSV.\n\n- View operators and their assigned clients.\n- Upload a CSV to register clients immediately, distributed across operators (round-robin).\n- Export all clients to a CSV file.\n- Redistribute existing clients across operators.\n\n## 🚀 Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| **Frontend** | TypeScript, React, Next.js, React Query, React Hook Form, Zod, Tailwind, shadcn/ui |\n| **Backend** | NestJS, Multer, csv-parser, fast-csv |\n| **ORM / DB** | Prisma · MySQL |\n| **Testing** | Jest |\n| **Runtime** | Docker / Docker Compose |\n\n## 📷 Demo\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./docs/dashboard.gif\" alt=\"Dashboard\"\u003e\u003cbr/\u003e\n  \u003cimg src=\"./docs/upload.gif\" alt=\"CSV upload\"\u003e\u003cbr/\u003e\n  \u003cimg src=\"./docs/responsivite.gif\" alt=\"Responsive layout\"\u003e\n\u003c/div\u003e\n\nDatabase schema:\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./docs/db.png\" alt=\"Database schema\"\u003e\u003c/p\u003e\n\n## 🏗 Architecture\n\nA NestJS API with clear layering — **controllers → services → repositories**, with DTOs,\nentities, and validators per module (`clients`, `operators`) — behind a Next.js frontend.\nCSV parsing is streamed; client distribution is a round-robin over the available operators.\n\n## 🧪 Testing\n\nUnit tests with Jest, **one spec per layer** (service, controller, validator):\n\n```bash\ncd backend \u0026\u0026 yarn test\n```\n\n## 🔧 How to Run Locally\n\n**Prerequisites:** Docker + Docker Compose V2.\n\nThe `.env.example` ships pre-filled (this is not a production app) — just copy it to `.env`.\n\n```bash\ndocker compose up --build -d\n```\n\n## 📡 API Reference\n\n**Operators** — `POST /operators`, `GET /operators`, `GET /operators/:id`,\n`PATCH /operators/:id`, `DELETE /operators/:id`.\n\n**Clients** — `GET /clients`, `GET /clients/:id`, `POST /clients`, `PATCH /clients/:id`,\n`DELETE /clients/:id`, `POST /clients/upload` (CSV, form-data `file`),\n`GET /clients/download` (CSV export), `GET /clients/redistribute`.\n\n## 👤 Author\n\n**João Barbosa** — Software Engineer (backend / platform).\n[LinkedIn](https://www.linkedin.com/in/joao1barbosa/) · [GitHub](https://github.com/joao1barbosa)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoao1barbosa%2Fcsv-operator-distribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoao1barbosa%2Fcsv-operator-distribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoao1barbosa%2Fcsv-operator-distribution/lists"}