{"id":26704994,"url":"https://github.com/nikhilpnath/brainfuel-blog","last_synced_at":"2026-04-09T17:47:23.460Z","repository":{"id":284569626,"uuid":"955271332","full_name":"nikhilpnath/brainfuel-blog","owner":"nikhilpnath","description":"our space to write, share, and inspire.","archived":false,"fork":false,"pushed_at":"2025-03-26T14:27:21.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T15:39:52.171Z","etag":null,"topics":["blog","clerk-authentication","custom-hooks","error-boundary","express5","imagekit","infinite-scroll","mern","mongodb","nodejs","react","responsive","tailwindcss","tanstack-react-query","typescript","webhook","winston-logger"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/nikhilpnath.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}},"created_at":"2025-03-26T11:35:48.000Z","updated_at":"2025-03-26T14:27:25.000Z","dependencies_parsed_at":"2025-03-26T15:51:25.415Z","dependency_job_id":null,"html_url":"https://github.com/nikhilpnath/brainfuel-blog","commit_stats":null,"previous_names":["nikhilpnath/brainfuel-blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilpnath%2Fbrainfuel-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilpnath%2Fbrainfuel-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilpnath%2Fbrainfuel-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilpnath%2Fbrainfuel-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhilpnath","download_url":"https://codeload.github.com/nikhilpnath/brainfuel-blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245786262,"owners_count":20671722,"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","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":["blog","clerk-authentication","custom-hooks","error-boundary","express5","imagekit","infinite-scroll","mern","mongodb","nodejs","react","responsive","tailwindcss","tanstack-react-query","typescript","webhook","winston-logger"],"created_at":"2025-03-27T05:20:25.027Z","updated_at":"2025-12-30T21:49:02.417Z","avatar_url":"https://github.com/nikhilpnath.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# BrainFuel 📝\n\nEasily create, manage, and share blog posts with a clean interface and smooth writing experience. Whether it’s a quick thought or a detailed article, this app helps you stay organized and connect with your readers.\n\n![Image](https://github.com/user-attachments/assets/4d00ab39-7977-4920-ae07-25ddfac1b04e)\n\n\n## Environment Variables\n\nTo run this project, you will need to add the following environment variables to your .env files\n\nClient:\n```\nVITE_IK_PUBLIC_KEY= Imagekit Public Key\nVITE_IK_URL_ENDPOINT=  https://ik.imagekit.io/yourProject\nVITE_CLERK_PUBLISHABLE_KEY= Clerk \nVITE_SERVER_URL=http://localhost:8000\n\n```\nServer:\n```\nPORT= 8000\nNODE_ENV= development\nMONGO_URL= mongodb\n\nCLERK_WEBHOOK_SECRET= Clerk\nCLERK_PUBLISHABLE_KEY= clerk\nCLERK_SECRET_KEY= clerk\n\nIK_URL_ENDPOINT=https://ik.imagekit.io/yourProject\nIK_PUBLIC_KEY= Imagekit\nIK_PRIVATE_KEY= Imagekit\n\nCLIENT_URL=http://localhost:5173\n```\n## 🔑 Key Information (Use Node v20)\n\n#### 👑 Adding Admin\n    1. Clerk Configure → Sessions → Customize Session Tokens (Edit)\n\n    2. Add The following line and save\n    {\n\t\"metadata\": \"{{user.public_metadata}}\"\n    }\n\n    3. Create an User(admin) with username as admin and other neccessary info\n\n    4. Click on the created admin user → scroll to the bottom → find Metadata:\n\n      - Click Edit Public\n      - Add { \"role\": \"admin\"} and save changes\n\n    5. Done! 🎉\n\n\n#### 🔗 Saving User Data via Webhook (Clerk)\n\n    We save the user (changes - Create,Update and Delete) in the Db comming from clerk via webhook\n\n    1. Clerk Configure → Webhooks → Add\n      - ⚠️ Note: Clerk webhooks need a live HTTPS endpoint. Use ngrok to expose your local server..\n\n    2. Use the ngrok docs to generate an HTTPS URL and set it as your webhook endpoint\n\n    3. while creating the endpoint below we have \"Subscribe to events\" select the user event(created,deleted,updated)\n\n    4. That’s it — all set up! ✅\n\n* [Clerk Webhook Setup Docs](https://clerk.com/docs/webhooks/sync-data)\n* [ngrok Guide](https://ngrok.com/docs/getting-started/)\n\n#  💻 Boilerplate\n\n#### ✅ Key Features:\n* Authentication — Seamless user authentication powered by [Clerk](https://clerk.com/).\n\n* Media Handling — Effortless image \u0026 Video uploads and optimization with [ImageKit](https://imagekit.io/).\n\n* Rich Text Editor — Beautiful content creation with React Quill New.\n\n* Infinite Scrolling — Smooth, lazy-loaded content with placeholder support using react-infinite-scroll-component.\n\n* Route Lazy Loading — Optimized loading of routes for better performance.\n\n* Custom Hooks — Reusable logic to keep code clean and maintainable.\n\n* Breadcrumbs Navigation — Clear navigation paths for better UX.\n\n* Time Ago Timestamps — Human-readable post timestamps using timeago.js.\n```\n...And More! ✨\nThere’s plenty under the hood — explore the code, play around, and discover all the little details yourself!\n```\n#### ⚙️ Tech Stack:\n Server (Node + Express 5):\n\n* Express 5 - No More Try Catch.\n\n* MongoDB + Mongoose for powerful database interaction.\n\n* Morgan + Winston for detailed request \u0026 error logging.\n\n* Body-parser, CORS, and secure API setup.\n\n* Built with TypeScript for a type-safe backend.\n\n Client (React 19 + Vite):\n\n* React Query for fetching and caching data effortlessly.\n\n* Axios for smooth API communication.\n\n* React Toastify for user-friendly notifications.\n\n* DOMPurify for rendering safe, sanitized HTML.\n\n* ImageKit React for easy image rendering.\n\n* Fully styled with Tailwind CSS for fast and beautiful UI.\n\n* Built with TypeScript for robust frontend development.\n\n\n### ⭐ The project if it helped you!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilpnath%2Fbrainfuel-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhilpnath%2Fbrainfuel-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilpnath%2Fbrainfuel-blog/lists"}