{"id":31070491,"url":"https://github.com/shobhit141141/esahayak","last_synced_at":"2026-04-12T15:01:52.122Z","repository":{"id":314849844,"uuid":"1056046115","full_name":"Shobhit141141/esahayak","owner":"Shobhit141141","description":"Esahayak buyers/leads management platform built on next js ","archived":false,"fork":false,"pushed_at":"2025-09-15T05:56:43.000Z","size":1137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-15T07:26:17.781Z","etag":null,"topics":["jest","mantine","next","postgresql","prisma","react","redis","tailwindcss","typescript","zod"],"latest_commit_sha":null,"homepage":"https://esahayak-leads.vercel.app","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/Shobhit141141.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":"2025-09-13T09:25:32.000Z","updated_at":"2025-09-15T05:56:46.000Z","dependencies_parsed_at":"2025-09-15T07:26:22.934Z","dependency_job_id":"88d17b9a-8fc6-4475-83f9-822741a6c612","html_url":"https://github.com/Shobhit141141/esahayak","commit_stats":null,"previous_names":["shobhit141141/esahayak"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Shobhit141141/esahayak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shobhit141141%2Fesahayak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shobhit141141%2Fesahayak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shobhit141141%2Fesahayak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shobhit141141%2Fesahayak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shobhit141141","download_url":"https://codeload.github.com/Shobhit141141/esahayak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shobhit141141%2Fesahayak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275333311,"owners_count":25446100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"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":["jest","mantine","next","postgresql","prisma","react","redis","tailwindcss","typescript","zod"],"created_at":"2025-09-15T23:01:19.918Z","updated_at":"2025-09-15T23:03:04.952Z","avatar_url":"https://github.com/Shobhit141141.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Esahayak Leads\n\n## Buyers/leads managemnt platform\n\n## 📋 Table of Contents\n\n- [Tech Stack](#-tech-stack)\n- [Features](#-features)\n- [File Structure](#-file-structure)\n- [Prerequisites](#-prerequisites)\n- [Quick Start](#-quick-start)\n- [Unit test](#-unit-test)\n\n## 🧰 Tech Stack (badges)\n\n![Next.js](https://img.shields.io/badge/Next.js-000000?style=for-the-badge\u0026logo=next.js\u0026logoColor=white) ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white) ![Prisma](https://img.shields.io/badge/Prisma-2D3748?style=for-the-badge\u0026logo=prisma\u0026logoColor=white) ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white) ![Zod](https://img.shields.io/badge/Zod-000000?style=for-the-badge\u0026logo=zod\u0026logoColor=white) ![Jest](https://img.shields.io/badge/Jest-C21325?style=for-the-badge\u0026logo=jest\u0026logoColor=white) ![Redis](https://img.shields.io/badge/Redis-DC382D?style=for-the-badge\u0026logo=redis\u0026logoColor=white) ![Mantine](https://img.shields.io/badge/Mantine-339AF0?style=for-the-badge\u0026logo=mantine\u0026logoColor=white) ![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-06B6D4?style=for-the-badge\u0026logo=tailwind-css\u0026logoColor=white)\n\n## ✨ Features\n\n- **Demo Login with cookies**: Simple authentication using cookies\n- **Import/Export by CSV**: data import/export functionality\n- **Type Safety**: Fully typed database operations\n- **ZOD validation**: Schema validation with Zod\n- **Buyers Managementes**: CRUD operations for managing buyers with filters/sorting/pagination\n- **Column specific sorting**: sort and filter data in tables for specific columns\n- **Buyers history**: Track and view the history of buyer interactions\n- **Admin/Agent Roles**: Different access levels for admins and agents\n- **Concurrency Handling**: simultaneous data operations are managed\n- **Error Boundaries**: Graceful error handling in components/pages.\n- **Rate limiting using REDIS+IP**: based on requests by IP per minute.\n- **Unit Testing**: Basic unit test setup with Jest.\n\n## 📂 File Structure\n\n```plaintext\nesahayak/\nsrc/\n├── app/\n│   ├── api/            # API route handlers\n│   ├── buyers/         # Pages or components related to buyers\n│   ├── error/          # Additional error handling pages/components\n│   ├── users/          # Pages or components related to users\n│   ├── error.tsx       # Global error boundary\n│   ├── globals.css     # Global stylesheet\n│   ├── icon.ico        # App icon\n│   ├── layout.tsx      # Root layout component\n│   ├── not-found.tsx   # 404 page\n│   └── page.tsx        # Main entry page\n├── components/         # Reusable UI components\n├── context/            # React context providers and hooks\n├── generated/          # Auto-generated prisma client\n├── lib/                # Utility libraries and services\n├── types/              # TypeScript type definitions\n├── utils/              # Helper functions\n├── middleware.ts       # Middleware logic\n├── public/             # Static assets (images, fonts, etc.)\n├── styles/             # Additional stylesheets\n└── tests/              # Unit and integration tests\n```\n\n## 🛠 Prerequisites\n\nBefore you begin, ensure you have:\n\n- Node.js 18+ installed\n- PostgreSQL database (local or cloud)\n- Git installed\n- npm or yarn package manager\n\n## 🚀 Quick Start\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/Shobhit141141/esahayak.git\ncd esahayak\n```\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 3. Set Up Environment Variables\n\nCopy a `.env.sample` in `.env` file at the root of your project and configure the following environment variables:\n\n```env\nDATABASE_URL=\"postgresql://USER:PASSWORD@HOST:PORT/DATABASE\"\nUPSTASH_REDIS_REST_URL=\"your-upstash-redis-url\"\nUPSTASH_REDIS_REST_TOKEN=\"your-upstash-redis-token\"\n```\n\n### 4. Set Up the Database\n\nRun the following commands to set up your database schema and generate the Prisma client:\n\n```bash\nnpm run db:setup\n```\n\nThis will:\n\n- Run migrations (prisma migrate dev)\n- Generate Prisma client (prisma generate)\n\n### 5.Open prisma studio (Optional)\n\n```bash\nnpm run prisma:studio\n```\n\n### 6. Start the Development Server\n\n```bash\nnpm run dev\n```\n\nOpen your browser and navigate to `http://localhost:3000` to see the application in action.\n\n## 🧪 Unit Test\n\n### 1. Create a Test File\n\nCreate a test file in the `utils/__tests__` directory (e.g., `__tests__/example.test.tsx`).\n\n### 2. Write a Test\n\n```tsx\nimport { render, screen } from \"@testing-library/react\";\nimport ExampleComponent from \"../components/ExampleComponent\";\n\ntest(\"renders example component\", () =\u003e {\n  render(\u003cExampleComponent /\u003e);\n  expect(screen.getByText(/example/i)).toBeInTheDocument();\n});\n```\n\n### 3. Run Tests\n\n```bash\nnpx jest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshobhit141141%2Fesahayak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshobhit141141%2Fesahayak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshobhit141141%2Fesahayak/lists"}