{"id":31038955,"url":"https://github.com/hasnaintypes/reflecto-app","last_synced_at":"2026-04-15T05:31:25.862Z","repository":{"id":314569468,"uuid":"1053789441","full_name":"hasnaintypes/reflecto-app","owner":"hasnaintypes","description":"Reflecto — a private, mobile-first journaling app with AI-assisted reflections, contextual prompts, and secure data ownership. Built with the T3 stack and designed for habit-building, privacy, and a distraction-free writing experience.","archived":false,"fork":false,"pushed_at":"2025-09-13T09:01:43.000Z","size":761,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T10:40:55.511Z","etag":null,"topics":["ai-assisted","habit-tracking","journaling","mental-health","nextjs","postgresql","prisma","privacy","pwa","reflection","shadcn-ui","t3","tailwindcss","trpc","typescript","zustand"],"latest_commit_sha":null,"homepage":"https://reflectoai.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hasnaintypes.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-10T00:00:29.000Z","updated_at":"2025-09-13T09:01:47.000Z","dependencies_parsed_at":"2025-09-13T10:41:08.215Z","dependency_job_id":"1db27cfb-13e5-4e9a-a525-ee54ed421513","html_url":"https://github.com/hasnaintypes/reflecto-app","commit_stats":null,"previous_names":["hasnaintypes/reflecto-app"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hasnaintypes/reflecto-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasnaintypes%2Freflecto-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasnaintypes%2Freflecto-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasnaintypes%2Freflecto-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasnaintypes%2Freflecto-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasnaintypes","download_url":"https://codeload.github.com/hasnaintypes/reflecto-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasnaintypes%2Freflecto-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275076534,"owners_count":25401314,"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-14T02:00:10.474Z","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":["ai-assisted","habit-tracking","journaling","mental-health","nextjs","postgresql","prisma","privacy","pwa","reflection","shadcn-ui","t3","tailwindcss","trpc","typescript","zustand"],"created_at":"2025-09-14T07:42:52.983Z","updated_at":"2026-04-15T05:31:25.850Z","avatar_url":"https://github.com/hasnaintypes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/logo.png\" alt=\"Reflecto\" width=\"80\" height=\"80\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eReflecto\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A private, mobile-first journaling app for mindful daily reflection.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/hasnaintypes/reflecto-app/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/hasnaintypes/reflecto-app/ci.yml?branch=main\u0026label=CI\" alt=\"CI\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://tryreflecto.vercel.app\"\u003e\u003cimg src=\"https://img.shields.io/github/deployments/hasnaintypes/reflecto-app/production?label=vercel\" alt=\"Deploy\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.typescriptlang.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/TypeScript-5.8-blue\" alt=\"TypeScript\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://nextjs.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Next.js-15-black\" alt=\"Next.js\" /\u003e\u003c/a\u003e\n  \u003ca href=\"./LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/github/license/hasnaintypes/reflecto-app\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Overview\n\nReflecto is a full-stack journaling platform built for people who want a distraction-free space to write, reflect, and build a consistent journaling habit. It ships as a **Progressive Web App** — installable on any device with offline-capable service worker caching.\n\nThe app supports six distinct entry types (journal, dreams, highlights, ideas, wisdom, notes), automatic tag and people extraction from content, activity heatmaps, streak tracking, and a rich text editor with inline mentions.\n\n---\n\n## Tech Stack\n\n| Layer | Technology | Purpose |\n|---|---|---|\n| **Framework** | [Next.js 15](https://nextjs.org/) (App Router) | Full-stack React framework with RSC, Turbopack |\n| **Language** | [TypeScript 5.8](https://www.typescriptlang.org/) | End-to-end type safety |\n| **API** | [tRPC 11](https://trpc.io/) + [SuperJSON](https://github.com/flightcontrolhq/superjson) | Type-safe RPC with automatic serialization |\n| **Database** | [PostgreSQL](https://www.postgresql.org/) + [Prisma 6](https://www.prisma.io/) | Relational DB with type-safe ORM |\n| **Auth** | [NextAuth v5](https://authjs.dev/) (Auth.js) | Credentials + Google + Discord OAuth |\n| **Editor** | [TipTap 3](https://tiptap.dev/) (ProseMirror) | Rich text with mentions, links, images |\n| **Styling** | [Tailwind CSS 4](https://tailwindcss.com/) + [Radix UI](https://www.radix-ui.com/) | Utility-first CSS with accessible primitives |\n| **State** | [Zustand 5](https://zustand-demo.pmnd.rs/) + [React Query 5](https://tanstack.com/query) | Client state + server cache management |\n| **Images** | [ImageKit](https://imagekit.io/) | CDN with on-the-fly transforms and thumbnails |\n| **Email** | [Resend](https://resend.com/) | Transactional email (verification, password reset) |\n| **Jobs** | [Inngest](https://www.inngest.com/) | Background tasks with cron scheduling |\n| **Animation** | [Framer Motion 12](https://www.framer.com/motion/) | Page transitions, list animations |\n| **PWA** | [Serwist](https://serwist.pages.dev/) (next-pwa successor) | Service worker, precaching, offline support |\n| **Docs** | [Nextra 4](https://nextra.site/) | MDX-powered documentation at `/docs` |\n| **Deploy** | [Vercel](https://vercel.com/) | Hosting, serverless functions, edge network |\n\n---\n\n## Features\n\n### Journaling\n- **Rich text editor** with TipTap — bold, italic, headings, lists, links, images, and inline mentions\n- **Six entry types** — Journal (daily log), Dreams, Highlights, Ideas, Wisdom, Notes\n- **Automatic extraction** — `#tags` and `@people` are parsed from content and linked automatically\n- **Bullet mode** — Rapid-fire journaling with configurable Enter/Shift+Enter behavior\n- **Backdating** — Create entries for past dates\n- **One journal per day** — Journal entries enforce a single entry per date\n\n### Organization\n- **Tags and People** — Auto-extracted with dedicated management pages, search, and entry counts\n- **Starred entries** — Mark important entries for quick access\n- **Workspace filtering** — Each entry type has its own dedicated view with type-specific features\n\n### Insights \u0026 Analytics\n- **Activity heatmap** — GitHub-style contribution graph powered by ActivityLog\n- **Streak tracking** — Current and longest streak with automatic daily calculation\n- **Charts** — Word count trends, top tags, top people, entry distribution by type\n- **Stats grid** — Total entries, average word count, and more\n\n### Customization\n- **Dark-first design** with theme support (dark/light/system)\n- **Font size** — Small, default, large\n- **Editor preferences** — Bulleted mode, newline behavior, spell checking, tag highlighting\n- **Daily reminders** with configurable time\n- **Auto-hide navigation** on desktop\n\n### Data \u0026 Privacy\n- **Data export** — Download all entries, tags, and people as JSON from Settings\n- **Soft deletes** — Entries are never permanently destroyed\n- **No third-party analytics** — Your journal stays private\n- **PWA** — Installable on mobile and desktop, works offline\n\n### Authentication\n- **Email + password** with email verification\n- **Google OAuth** and **Discord OAuth**\n- **Password reset** via email\n- **Rate limiting** — Sliding window (100 req/60s authenticated, 30/60s unauthenticated)\n\n---\n\n## Project Structure\n\n```\nsrc/\n├── app/\n│   ├── (pages)/\n│   │   ├── (protected)/          # Auth-required pages\n│   │   │   ├── journal/          # Daily journal with rich editor\n│   │   │   ├── dreams/           # Dream journal workspace\n│   │   │   ├── highlights/       # Highlights workspace\n│   │   │   ├── ideas/            # Ideas workspace\n│   │   │   ├── wisdom/           # Wisdom workspace\n│   │   │   ├── notes/            # Notes workspace\n│   │   │   ├── insights/         # Analytics dashboard (heatmap, charts)\n│   │   │   ├── reflect/          # Memory lane + highlights review\n│   │   │   ├── settings/         # User preferences + data export\n│   │   │   ├── tags/             # Tag management\n│   │   │   ├── people/           # People management\n│   │   │   ├── profile/          # User profile\n│   │   │   └── write/            # Universal entry composer\n│   │   └── (public)/             # Auth pages (sign-in, sign-up, reset)\n│   ├── api/                      # API routes (tRPC, auth, inngest)\n│   ├── docs/                     # Nextra documentation route\n│   └── sw.ts                     # Service worker (Serwist)\n├── server/\n│   ├── api/routers/              # 13 tRPC routers\n│   ├── services/                 # Business logic layer\n│   │   ├── entry/                # Entry CRUD + extraction\n│   │   ├── analytics/            # Activity logging + streaks\n│   │   └── extraction/           # Tag and person extraction\n│   ├── schemas/                  # Zod input validation\n│   └── auth/                     # NextAuth configuration\n├── components/\n│   ├── ui/                       # Radix-based UI primitives\n│   ├── editor/                   # TipTap editor components\n│   └── layout/                   # Sidebar, navbar, footer\n├── stores/                       # Zustand stores\n├── types/                        # Shared TypeScript types\n└── styles/                       # Global CSS\ncontent/                          # Nextra MDX documentation\nprisma/                           # Database schema + migrations\npublic/                           # Static assets, PWA icons, manifest\n```\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js** \u003e= 18\n- **pnpm** \u003e= 10\n- **PostgreSQL** (local or hosted — Neon, Supabase, etc.)\n\n### Environment Variables\n\n```bash\ncp .env.example .env\n```\n\nRequired variables:\n\n| Variable | Description |\n|---|---|\n| `DATABASE_URL` | PostgreSQL connection string |\n| `AUTH_SECRET` | NextAuth secret (generate with `openssl rand -base64 32`) |\n| `AUTH_GOOGLE_ID` / `AUTH_GOOGLE_SECRET` | Google OAuth credentials |\n| `AUTH_DISCORD_ID` / `AUTH_DISCORD_SECRET` | Discord OAuth credentials |\n| `IMAGEKIT_PUBLIC_KEY` / `IMAGEKIT_PRIVATE_KEY` / `IMAGEKIT_URL_ENDPOINT` | ImageKit CDN credentials |\n| `RESEND_API_KEY` | Resend email API key |\n\n### Installation\n\n```bash\n# Clone and install\ngit clone https://github.com/hasnaintypes/reflecto-app.git\ncd reflecto-app\npnpm install\n\n# Push database schema\npnpm db:push\n\n# Start development server (with Turbopack)\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000).\n\n---\n\n## Scripts\n\n| Command | Description |\n|---|---|\n| `pnpm dev` | Start dev server with Turbopack |\n| `pnpm build` | Production build |\n| `pnpm start` | Start production server |\n| `pnpm typecheck` | Run TypeScript compiler checks |\n| `pnpm lint` | Run ESLint |\n| `pnpm format:check` | Check Prettier formatting |\n| `pnpm format:write` | Fix Prettier formatting |\n| `pnpm check` | Run lint + typecheck together |\n| `pnpm db:push` | Push Prisma schema to database |\n| `pnpm db:generate` | Create and apply migrations |\n| `pnpm db:studio` | Open Prisma Studio GUI |\n\n---\n\n## Documentation\n\nFull documentation is available at [`/docs`](https://tryreflecto.vercel.app/docs) and covers:\n\n- **[Getting Started](https://tryreflecto.vercel.app/docs/getting-started)** — Account setup, first entry, navigation\n- **[Writing \u0026 Editor](https://tryreflecto.vercel.app/docs/writing/editor)** — Rich text editor, keyboard shortcuts, formatting\n- **[Workspaces](https://tryreflecto.vercel.app/docs/workspaces)** — All six entry types explained\n- **[Insights](https://tryreflecto.vercel.app/docs/insights)** — Heatmap, streaks, charts\n- **[Customization](https://tryreflecto.vercel.app/docs/customization/settings)** — Appearance and preferences\n- **[Developer Guide](https://tryreflecto.vercel.app/docs/developer/architecture)** — Architecture, API reference, database schema\n\nDocumentation source lives in the `content/` directory as MDX files.\n\n---\n\n## Architecture\n\n```\nClient (React 19)\n    │\n    ├── Zustand stores (client state)\n    └── tRPC React Query hooks\n            │\n            ▼\n    tRPC Router Layer (13 routers)\n        │   - Timing middleware\n        │   - Rate limiting\n        │   - Auth guard\n        ▼\n    Service Layer\n        │   - Entry CRUD with extraction\n        │   - Activity logging\n        │   - Streak management\n        ▼\n    Prisma ORM → PostgreSQL\n```\n\nKey architectural decisions:\n- **Service layer pattern** — Business logic is separated from tRPC routers into testable service classes\n- **Automatic extraction** — Tags (`#hashtag`) and people (`@mention`) are extracted from content on every create/update within a transaction\n- **ActivityLog table** — Pre-aggregated daily entry counts for O(1) heatmap rendering instead of counting raw entries\n- **Soft deletes** — Entries use `deletedAt` timestamps, never hard-deleted\n\n---\n\n## Acknowledgments\n\nReflecto is inspired by [Journalistic](https://journalisticapp.com/) — a beautifully crafted journaling app that set the standard for what a modern reflection tool should feel like. Full credit to the Journalistic team for the original vision.\n\n---\n\n## Author\n\n**Hasnain** — [GitHub](https://github.com/hasnaintypes) · [Twitter](https://twitter.com/bynainee) · [LinkedIn](https://linkedin.com/in/hasnainx) · [Email](mailto:hasnainoffice2024@gmail.com)\n\n---\n\n## License\n\nMIT License. See [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasnaintypes%2Freflecto-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasnaintypes%2Freflecto-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasnaintypes%2Freflecto-app/lists"}