{"id":31848747,"url":"https://github.com/recker-dev/minicrm","last_synced_at":"2026-07-03T16:32:47.784Z","repository":{"id":315026144,"uuid":"1056099940","full_name":"Recker-Dev/MiniCRM","owner":"Recker-Dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-16T07:49:51.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T11:33:56.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Recker-Dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-13T11:41:46.000Z","updated_at":"2025-09-16T07:49:54.000Z","dependencies_parsed_at":"2025-09-16T09:39:57.904Z","dependency_job_id":"7a985b90-b3f7-48bf-8255-c779c656f72e","html_url":"https://github.com/Recker-Dev/MiniCRM","commit_stats":null,"previous_names":["recker-dev/minicrm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Recker-Dev/MiniCRM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recker-Dev%2FMiniCRM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recker-Dev%2FMiniCRM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recker-Dev%2FMiniCRM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recker-Dev%2FMiniCRM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Recker-Dev","download_url":"https://codeload.github.com/Recker-Dev/MiniCRM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recker-Dev%2FMiniCRM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35094062,"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-03T02:00:05.635Z","response_time":110,"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":[],"created_at":"2025-10-12T10:50:54.702Z","updated_at":"2026-07-03T16:32:47.775Z","avatar_url":"https://github.com/Recker-Dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Microservice (CRM Prototype)\n\n[View this repository on GitHub For Local Deployment Guide](https://github.com/Recker-Dev/MiniCRM-Deployment)\n\n## Overview\n\nThe **Frontend Microservice** serves as the core interface for the CRM prototype. Its primary goal is to enable users to define campaigns, segment audiences, preview results, and initiate campaigns on a simulated customer database generated by the **Data Ingestion Faker** service.\n\nThe frontend is a **single-page application** featuring Google OAuth for authentication and UUID assignment, campaign management, dynamic audience segmentation, and AI-powered features for content and rule optimization.\n\n---\n\n## ⚡ Tech Stack\n\n- **Framework**: Next.js (React + SSR)  \n- **Styling**: TailwindCSS  \n- **UI Components**: shadcn/ui + Lucide Icons  \n- **State Management**: React hooks \u0026 Context API  \n- **Build Tooling**: Vite / Next.js build pipeline  \n- **Language**: TypeScript / JavaScript (depending on branch)\n\n---\n\n## 📂 Key Features\n\n- Customer \u0026 Order dashboards (fetch from backend APIs).  \n- Campaign creation and preview with AI-assisted segmentation.  \n- Real-time metrics for campaign performance (success / failure).  \n- Authentication via UUID / OAuth.  \n- Rule-builder UI for targeting segments.  \n\n---\n\n## 🚀 Getting Started\n\n### 1. Install Dependencies\n```bash\nnpm install\n```\n### 2. Development Mode\n```bash\nnpm run dev\n```\n### 3. Production Mode\n```bash\nnpm run build\nnpm run start\n```\n\n## 🌍 Environment Variables\n\nThe frontend requires the following environment variables to be set in a `.env.local` file:\n\n```env\nPORT=5173\nNEXTAUTH_URL=http://localhost:xxxx\nNEXT_PUBLIC_BACKEND_URI=http://example.in\nNEXT_PUBLIC_AUTH_URI=http://example.in\nNEXTAUTH_SECRET=random_long_string\nGOOGLE_CLIENT_SECRET=xxxx\nGOOGLE_CLIENT_ID=xxxx\n```\n\n## Authentication\n\n- **Sign In Button**: Uses **Google OAuth**.\n- Purpose:\n  - Assign a unique **UUID** to each user.\n  - Authenticate users to ensure only real participants interact with the CRM prototype.\n\n---\n\n## Core CRM Page\n\nThe base page allows users to create and manage campaigns.\n\n### 1. Campaign Creation\n\n- **Fields**:\n  - **Campaign Name**: User-defined identifier for the campaign.\n  - **Personalized Message**: Supports **dynamic templating** using placeholders:\n    - `{{name}}` → replaced by customer's name\n    - `{{city}}` → replaced by customer's city\n  - **Audience Segmentation**: Uses the **Dynamic Rule Generator**.\n\n### 2. Audience Segmentation\n\n- Supports **complex nested rules** on 4 parameters:\n  1. `total_spend`\n  2. `last_order_date`\n  3. `visits`\n  4. `city`\n\n- Users can **preview the customer segment**:\n  - Shows the estimated audience size.\n  - Provides a detailed list of targeted customers before initiating the campaign.\n\n### 3. Campaign Initiation\n\n- Once the user is satisfied with the segment and message:\n  - **Preview Campaign**: Displays all relevant customer details.\n  - **Initiate Campaign**: Sends campaign for execution in the backend (simulated using FakerJS DB).\n\n---\n\n## Navigation \u0026 Header Features\n\n- **Header Buttons**:\n  - **User DB**: Access past campaigns.\n  - **Start New Campaign**: Opens the campaign creation workflow.\n\n- **History Page**:\n  - Lists all past campaigns with the following details:\n    - Campaign Name\n    - Audience Segment\n    - Message Sent\n    - Audience Size\n    - Status: `Completed` / `Running`\n    - Metrics: `Success` / `Fail` / `Pending`\n    - Created On\n    - Campaign Summary\n\n---\n\n## AI Features\n\n### 1. Personalized Message Suggestions\n\n- Small AI button near the **Personalized Message** field.\n- Function:\n  - Generates **3 top personalized message suggestions** based on:\n    - Campaign name\n    - User-provided prompt\n  - Helps quickly optimize campaign tone and style.\n\n### 2. AI-Assisted Dynamic Rule Builder\n\n- Core MVP feature of the frontend.\n- Converts **human queries** into **custom logical rules** for audience segmentation.\n- Supports **deep nesting logic**.\n- Users can further customize the skeleton rules generated by AI.\n\n### 3. Campaign History AI Features\n\n- **Automatic Campaign Summary**:\n  - AI summarizes the campaign based on executed data.\n  - Provides insights such as campaign size, customer engagement, and overall effort.\n\n- **Human-Readable Segment Transformation**:\n  - Converts complex JSON-based audience segments into **easy-to-read format** for end users.\n\n---\n\n## Notes\n\n- The frontend relies on the **FakerJS-generated database** for campaign testing and segmentation.\n- Dynamic templates and AI features are **prototype-level MVP**, but provide a strong foundation for real CRM logic.\n- Campaign management is fully integrated with audience segmentation and message personalization, allowing **realistic CRM workflows** even in a simulated environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecker-dev%2Fminicrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecker-dev%2Fminicrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecker-dev%2Fminicrm/lists"}