{"id":31202876,"url":"https://github.com/its-me-ak/crypchat","last_synced_at":"2026-04-05T22:37:00.678Z","repository":{"id":309925212,"uuid":"1020897858","full_name":"Its-me-ak/Crypchat","owner":"Its-me-ak","description":"Crypchat is a real-time chat application designed with modern full-stack development in mind. Built on the MERN stack (MongoDB, Express, React, Node.js) integrated with Stream Chat for instant messaging, Crypchat delivers secure, scalable, and responsive chat features with minimal configuration.","archived":false,"fork":false,"pushed_at":"2025-08-16T13:31:32.000Z","size":743,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T22:36:50.771Z","etag":null,"topics":["api","daisyui","expressjs","jwt-authentication","mongodb","nodejs","react-hooks","react-router","reactjs","stream-chat","tailwindcss","tanstack-query"],"latest_commit_sha":null,"homepage":"https://crypchat.onrender.com","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/Its-me-ak.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}},"created_at":"2025-07-16T15:02:14.000Z","updated_at":"2025-08-16T13:31:35.000Z","dependencies_parsed_at":"2025-08-14T16:44:32.261Z","dependency_job_id":null,"html_url":"https://github.com/Its-me-ak/Crypchat","commit_stats":null,"previous_names":["its-me-ak/crypchat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Its-me-ak/Crypchat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-ak%2FCrypchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-ak%2FCrypchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-ak%2FCrypchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-ak%2FCrypchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Its-me-ak","download_url":"https://codeload.github.com/Its-me-ak/Crypchat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-me-ak%2FCrypchat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31452899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","daisyui","expressjs","jwt-authentication","mongodb","nodejs","react-hooks","react-router","reactjs","stream-chat","tailwindcss","tanstack-query"],"created_at":"2025-09-20T14:15:19.528Z","updated_at":"2026-04-05T22:36:59.851Z","avatar_url":"https://github.com/Its-me-ak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Crypchat\n\nTalk freely, chat securely. A full-stack chat application built with MongoDB, Express, React (Vite), Node.js, and Stream Chat. Auth is cookie-based (HTTP-only), email via SendGrid, and the client is served by the Node server in production.\n\n## ✨ Features\n\n- Secure auth: signup/login/logout, JWT in HTTP-only cookies\n- Forgot/Reset password via email (SendGrid)\n- Onboarding with profile image \u0026 details\n- Friends system: requests, accept, recommended users\n- 1–1 chat powered by Stream Chat\n- Responsive UI with Tailwind + daisyUI\n- Mobile sidebar (slide-in) and channel list w/ message preview truncation\n- Production build served by Express (/frontend/dist)\n- Dev mode uses Vite proxy → Node API for zero CORS pain\n\n## 🧰 Tech Stack\n\n- Frontend: React (Vite), React Router, TanStack Query, Tailwind, daisyUI, lucide-react\n- Backend: Node.js, Express, MongoDB (Mongoose)\n- Chat: Stream Chat SDK\n- Email: SendGrid\n- Auth: JWT + HTTP-only cookies\n- Deploy: Render (single service serving API + static frontend)\n\n## 🗂️ Project Structure\n\n```bash\nCrypchat/\n├─ backend/\n│  ├─ src/\n│  │  ├─ config/        # db, env\n│  │  ├─ controllers/   # auth, user, chat\n│  │  ├─ middleware/    # auth middleware\n│  │  ├─ routes/        # /api/v1/*\n│  │  ├─ utils/         # email helpers, responses\n│  │  └─ server.js      # Express app (serves frontend in prod)\n│  └─ package.json\n├─ frontend/\n│  ├─ src/\n│  │  ├─ components/    # Navbar, Sidebar, etc.\n│  │  ├─ hooks/         # useAuthUser, useLogout\n│  │  ├─ pages/         # ChatHomePage, Auth pages\n│  │  └─ utils/         # axios instance, api wrappers\n│  ├─ index.html\n│  ├─ vite.config.ts/js # dev proxy to backend\n│  └─ package.json\n├─ package.json          # root scripts (build/start)\n└─ README.md\n```\n\n## 🔑 Environment Variables\n\nCreate two `.env` files (never commit them):\n\n`backend/.env`\n\n```ini\nPORT=5001\nMONGODB_URI=your-mongodb-uri\nJWT_SECRET_KEY=your-jwt-secret\nSTREAM_API_KEY=your-stream-api-key\nSTREAM_API_SECRET=your-stream-api-secret\nSENDGRID_API_KEY=your-sendgrid-api-key\nCLIENT_URL=http://localhost:5173\nNODE_ENV=development\n```\n\nIn production set:\n\n```ini\nCLIENT_URL=https://your-domain.tld\nNODE_ENV=production\n```\n\nand configure Render Environment accordingly.\n\n`frontend/.env`\n\n```ini\nVITE_STREAM_API_KEY=your-stream-api-key\n```\n\n## ▶️ Run Locally (Development)\n\nOpen two terminals:\n\n1.  Backend\n\n    ```bash\n    cd backend\n    npm i\n    npm run dev        # or nodemon src/server.js\n    ```\n\n2.  Frontend\n\n    ```bash\n    cd frontend\n    npm i\n    npm run dev\n    ```\n\n**Important (Vite proxy):** your `vite.config` should proxy to the backend:\n\n```ts\n// vite.config.ts/js\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n  server: {\n    proxy: {\n      \"/api/v1\": {\n        target: \"http://localhost:5001\",\n        changeOrigin: true,\n      },\n    },\n  },\n});\n```\n\n**axios base URL (frontend)**\n\n```ts\n// src/utils/axios.ts/js\nimport axios from \"axios\";\nexport const axiosInstance = axios.create({\n  baseURL: \"/api/v1\",      // always relative; Vite proxy handles dev\n  withCredentials: true,   // send cookies\n});\n```\n\nThis way:\n\n- Dev → requests hit `http://localhost:5173/api/v1` and get proxied to `http://localhost:5001`.\n- Prod → the same relative `/api/v1` is served by Express (no hardcoded origin).\n\n## 🚀 Build \u0026 Run (Production / Render)\n\nYour repo already serves the Vite build from Express:\n\nIn `backend/src/server.js`:\n\n- Serves `../frontend/dist` when `NODE_ENV === \"production\"`\n- API under `/api/v1/*`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-me-ak%2Fcrypchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fits-me-ak%2Fcrypchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-me-ak%2Fcrypchat/lists"}