{"id":41328604,"url":"https://github.com/Usman-T/nafs","last_synced_at":"2026-03-10T05:01:37.039Z","repository":{"id":290901139,"uuid":"971327108","full_name":"Usman-T/nafs","owner":"Usman-T","description":"An Islamic habit tracker","archived":false,"fork":false,"pushed_at":"2025-08-29T12:15:56.000Z","size":1566,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T15:45:04.935Z","etag":null,"topics":["gamification","islamic","javascript","mobile-first","nextjs","prisma","progressive-web-app","typescript"],"latest_commit_sha":null,"homepage":"https://nafs.in","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/Usman-T.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-04-23T11:00:59.000Z","updated_at":"2025-08-29T12:16:00.000Z","dependencies_parsed_at":"2025-05-18T07:22:31.735Z","dependency_job_id":"4233aeb3-9df5-4d8d-974d-93211a151240","html_url":"https://github.com/Usman-T/nafs","commit_stats":null,"previous_names":["usman-t/nafs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Usman-T/nafs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Usman-T%2Fnafs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Usman-T%2Fnafs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Usman-T%2Fnafs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Usman-T%2Fnafs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Usman-T","download_url":"https://codeload.github.com/Usman-T/nafs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Usman-T%2Fnafs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30325598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"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":["gamification","islamic","javascript","mobile-first","nextjs","prisma","progressive-web-app","typescript"],"created_at":"2026-01-23T06:11:49.933Z","updated_at":"2026-03-10T05:01:36.811Z","avatar_url":"https://github.com/Usman-T.png","language":"TypeScript","funding_links":[],"categories":["Other (122 projects)"],"sub_categories":["TypeScript"],"readme":"\u003ch1 align=\"center\"\u003e Nafs\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003ci\u003eSpiritual Self-Discipline, Engineered for the Muslim Soul.\u003c/i\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/2997b457-d9cb-4265-9f24-c399b06f9840\" width=\"400\" /\u003e\n\u003c/p\u003e\n\n---\n\n## What is Nafs?\n\n**Nafs** helps Muslim youth build Islamic discipline through:\n\n- Task-based challenges with streaks\n- Daily Qur’an reflections with audio \u0026 tafsir\n- Spiritual growth tracking via animated radar charts\n- Reflection journals\n- Offline-first mobile experience (TWA/PWA)\n\nBuilt around the Qur'anic idea of _nafs_, and engineered for modern Muslims.\n\n---\n\n## Full UI Showcase\n\n\u003cdetails\u003e\n\u003csummary\u003eOnboarding Flow\u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/fe959822-2c2a-467e-b6a1-b7993eacd32b\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/f96aed50-1b17-4ebc-b0a3-bfc7957aa3d7\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/82f216f8-7516-44f2-aacd-b590c96d6d4d\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/545fdfa2-d6f5-4443-8f78-42595f462d54\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/7e80534d-d9af-4914-b35e-371e1ac860a8\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/e0944cbb-54c2-4832-b685-5fccc405adde\" width=\"180\"/\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eChallenge \u0026 Task Engine\u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/67bb02d9-6d3e-4e91-8bae-2d65e10b5292\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/541f575e-51c1-4fd4-a1a8-cd8e37aeef8b\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/8073fdb4-2801-4555-8cd2-a756a1e3e018\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/937363df-adf9-406a-a3e8-35e5364c05de\" width=\"180\"/\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eStreaks \u0026 Radar Progress\u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/42e1a75e-c011-435e-b803-6ce7896516da\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/e365b3e7-ea96-495b-bcfe-e5855134eaa0\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/98bab9af-27f4-4d17-8314-4b706b2b7206\" width=\"180\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/027ec47a-6690-4c5f-ac6b-8ddcbed7de66\" width=\"180\"/\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eQur’an Viewer\u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/1f2eb0cc-51db-4a73-b692-0a39de3eea4c\" width=\"250\"/\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAuth Flow\u003c/summary\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/4189fa7d-0896-4786-a4bf-e2293634a27e\" width=\"200\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/1ae617fe-aba9-45a2-ae48-f9ffac57435c\" width=\"200\"/\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n---\n\n## Tech Stack\n\n| Layer      | Tools                                                 |\n| ---------- | ----------------------------------------------------- |\n| Frontend   | Next.js App Router, Tailwind CSS, shadcn/ui           |\n| Backend    | Next.js Server Actions, all logic in `lib/actions.ts` |\n| Database   | PostgreSQL via Prisma Accelerate                      |\n| Auth       | NextAuth (JWT), middleware-protected routes           |\n| Caching    | Redis (auth/session), LocalStorage (day/task state)   |\n| Deployment | Vercel                                                |\n| PWA/TWA    | Bubblewrap + Servist (custom service worker)          |\n| Audio      | Qur’an CDN + `\u003caudio\u003e` fallback                       |\n\n|Language files blank comment code\n|--------------------------------------------------------------------------------|\n|TypeScript 212 2056 127 23447 |\n|Markdown 2 82 0 332 |\n|CSS 2 53 2 200 |\n|JSON 6 0 0 188 |\n|JavaScript 6 6 0 58 |\n|HTML 1 0 0 11 |\n|--------------------------------------------------------------------------------|\n|SUM: 229 2197 129 24236 |\n\n---\n\n## Get Started\n\n```bash\ngit clone https://github.com/Usman-T/nafs.git\ncd nafs\ndocker-compose up --build\n```\n\nThen create your `.env`:\n\n```env\nDATABASE_URL=postgresql://postgres:12345678@postgres:5432/nafs?schema=public\nAUTH_SECRET=your_secret\nKV_URL=...\nKV_REST_API_TOKEN=...\nQURAN_API_CLIENT_ID=...\nQURAN_API_CLIENT_SECRET=...\n```\n\nInstall and generate :\n\n```bash\nbun install\nbunx prisma generate\nbunx prisma migrate dev\n```\n\n---\n\n## Architecture\n\n- 🧠 All business logic inside `lib/actions.ts` — composable and clean.\n- 🔐 Secure auth and route-level access via middleware.\n- ⚙️ SSR-first architecture with client islands for animations.\n- 💾 LocalStorage for streak/task memory + Redis for session caching.\n- 📦 TWA-ready with custom service worker and offline fallback.\n\n---\n\n## License\n\nMIT — free to use, remix, and build with barakah.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ci\u003e“He has succeeded who purifies [his soul], and he has failed who corrupts it.” — Qur’an 91:9–10\u003c/i\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUsman-T%2Fnafs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUsman-T%2Fnafs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUsman-T%2Fnafs/lists"}