{"id":51430273,"url":"https://github.com/cattolatte/hemoconnect-public","last_synced_at":"2026-07-05T03:03:40.426Z","repository":{"id":339793351,"uuid":"1163389782","full_name":"cattolatte/hemoconnect-public","owner":"cattolatte","description":"HemoConnect: An AI-powered peer matching forum for the hemophilia community.","archived":false,"fork":false,"pushed_at":"2026-02-21T15:09:38.000Z","size":251,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T23:31:38.866Z","etag":null,"topics":["ai-platform","artificial-intelligence","authentication","community-platform","fullstack","healthcare","healthtech","huggingface","nextjs","peer-support","postgresql","react","realtime-chat","social-platform","supabase","tailwindcss","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://hemo-connect-five.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cattolatte.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2026-02-21T15:02:43.000Z","updated_at":"2026-02-27T18:02:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cattolatte/hemoconnect-public","commit_stats":null,"previous_names":["cattolatte/hemoconnect-public"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cattolatte/hemoconnect-public","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cattolatte%2Fhemoconnect-public","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cattolatte%2Fhemoconnect-public/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cattolatte%2Fhemoconnect-public/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cattolatte%2Fhemoconnect-public/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cattolatte","download_url":"https://codeload.github.com/cattolatte/hemoconnect-public/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cattolatte%2Fhemoconnect-public/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35141967,"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-05T02:00:06.290Z","response_time":100,"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-platform","artificial-intelligence","authentication","community-platform","fullstack","healthcare","healthtech","huggingface","nextjs","peer-support","postgresql","react","realtime-chat","social-platform","supabase","tailwindcss","typescript","vercel"],"created_at":"2026-07-05T03:03:40.121Z","updated_at":"2026-07-05T03:03:40.355Z","avatar_url":"https://github.com/cattolatte.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# HemoConnect\n\n**An AI-powered community platform where people with hemophilia connect, share, and thrive.**\n\n[![Next.js](https://img.shields.io/badge/Next.js-16.0.0-black?style=flat-square\u0026logo=next.js)](https://nextjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Strict-3178C6?style=flat-square\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-v4-06B6D4?style=flat-square\u0026logo=tailwindcss\u0026logoColor=white)](https://tailwindcss.com/)\n[![Supabase](https://img.shields.io/badge/Supabase-PostgreSQL-3FCF8E?style=flat-square\u0026logo=supabase\u0026logoColor=white)](https://supabase.com/)\n[![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](LICENSE)\n\n[Features](#-features) · [Architecture](#-architecture) · [Tech Stack](#-tech-stack) · [Getting Started](#-getting-started) · [Database](#-database-schema) · [Roadmap](#-roadmap) · [Changelog](CHANGELOG.md)\n\n\u003c/div\u003e\n\n---\n\n## The Problem\n\nLiving with hemophilia can be isolating. Generic health forums are too broad, and existing tools focus solely on clinical tracking — bleed logs, infusion diaries, treatment adherence. What's missing is **human connection**: a place to find someone who truly understands your daily reality.\n\n## The Solution\n\nHemoConnect is a purpose-built social platform for the hemophilia community. It uses AI-driven matching to connect people based on their clinical profile (factor type, severity, treatment) and life stage — not just diagnosis. It pairs this with a community forum enhanced by semantic search, a curated resource library, private messaging, micro-communities, gamification, and a full admin/moderation system.\n\n\u003e **Philosophy:** We are _not_ a symptom tracker. No bleed logs. No infusion diaries. HemoConnect exists to foster meaningful connection and distill collective knowledge.\n\n---\n\n## \u0026#x2728; Features\n\n### Smart Peer Matching\n\nA hybrid matching engine that combines rule-based clinical similarity (hemophilia type, severity, treatment, life stage, shared interests) with AI-powered vector cosine similarity using Hugging Face embeddings. Match scores help users find others who truly understand their journey.\n\n### Community Forum\n\nA safe space for open discussion with post categorization, commenting, nested likes, tag-based filtering, and tabs for trending topics and unanswered questions. Posts are automatically tagged using zero-shot AI classification and checked for toxicity.\n\n### AI-Powered Semantic Search\n\nNatural language search across forum discussions powered by Hugging Face embeddings. Ask questions like _\"how to handle joint bleeds in teens\"_ and get contextually relevant results, with automatic fallback to keyword search.\n\n### Knowledge Distiller\n\nAI-generated thread summaries that auto-update as discussions grow (5+ comments), surfacing the most valuable insights from lengthy conversations.\n\n### Private Messaging\n\nReal-time, one-on-one conversations between community members powered by Supabase Realtime. Includes unread indicators, conversation history, and the ability to start chats directly from peer profiles.\n\n### Resource Library\n\nA curated, searchable database of articles, guides, and documents organized by category (Treatment, Lifestyle, Research, Support, Insurance, Pediatric) with featured highlights and save-to-library functionality. Admins can create, edit, and manage resources.\n\n### Notification System\n\nReal-time notifications for new comments, post likes, followers, @mentions, thread replies, badge awards, and AI-powered smart match alerts. Bell icon with unread count, powered by Supabase Realtime subscriptions.\n\n### Micro-Communities\n\nAuto-generated tag-based groups (Joint Health Warriors, Mental Wellness Hub, Gene Therapy Pioneers, etc.) that users auto-join based on their selected interests. Each community has a member list and filtered forum posts.\n\n### Gamification \u0026 Badges\n\nFive achievement badges awarded automatically: Guiding Light (10+ liked comment), Connector (chatted with 3+ peers), First Steps (first post), Active Voice (10+ posts), and Community Builder (joined 3+ communities). Displayed on user profiles with tooltips.\n\n### Follow \u0026 Bookmark System\n\nFollow other users to stay connected. Bookmark forum posts for later reading with a dedicated bookmarks page. Subscribe to threads for reply notifications.\n\n### Admin \u0026 Moderation\n\nFull admin panel with dashboard stats, moderation queue for AI-flagged content, user report management, user role management (user/moderator/admin), ban/suspend controls, resource CRUD, and a complete audit log of all admin actions.\n\n### Clinical Profile System\n\nA guided, multi-step profile setup wizard that collects hemophilia type, severity, factor level, treatment approach, life stage, and community interests — powering both peer matching and personalized content. Fully editable after setup.\n\n### Content Moderation\n\nAutomatic toxicity detection on posts and comments using Hugging Face text classification. Flagged content enters a moderation queue for admin review. Users can also report content with categorized reasons.\n\n---\n\n## \u0026#x1F3D7; Architecture\n\nHemoConnect follows a strict **Server Components First** architecture built on the Next.js 16 App Router.\n\n```\napp/\n├── (auth)/                       # Auth route group (no sidebar)\n│   ├── login/page.tsx            # Login page\n│   ├── signup/page.tsx           # Signup page\n│   └── auth-callback/route.ts   # OAuth callback handler\n│\n├── (main)/                       # Authenticated route group (with sidebar)\n│   ├── layout.tsx                # Server layout — fetches user, wraps in sidebar\n│   ├── dashboard/\n│   │   ├── page.tsx              # Server: fetches stats, activity, peers\n│   │   └── dashboard-content.tsx # Client: interactive dashboard UI\n│   ├── forum/\n│   │   ├── page.tsx              # Server: fetches all posts\n│   │   ├── forum-content.tsx     # Client: tab filtering, semantic search\n│   │   └── [postId]/\n│   │       ├── page.tsx          # Server: fetches post + comments\n│   │       └── post-detail.tsx   # Client: likes, replies, bookmarks, report\n│   ├── messages/\n│   │   ├── page.tsx              # Server: fetches conversations\n│   │   └── messages-content.tsx  # Client: realtime chat UI\n│   ├── profile/\n│   │   ├── setup/\n│   │   │   ├── page.tsx          # Server: fetches existing profile\n│   │   │   └── profile-setup-form.tsx  # Client: 3-step wizard\n│   │   └── [userId]/\n│   │       ├── page.tsx          # Server: fetches profile + posts + badges\n│   │       └── profile-view.tsx  # Client: tabbed profile, edit dialog\n│   ├── resources/\n│   │   ├── page.tsx              # Server: fetches resources + saved IDs\n│   │   └── resources-content.tsx # Client: category tabs, save toggles\n│   ├── bookmarks/\n│   │   └── page.tsx              # Server: fetches bookmarked posts\n│   ├── communities/\n│   │   ├── page.tsx              # Server: fetches communities\n│   │   ├── communities-content.tsx  # Client: community grid, join/leave\n│   │   └── [communityId]/\n│   │       ├── page.tsx          # Server: fetches community details\n│   │       └── community-detail.tsx  # Client: members, filtered posts\n│   └── admin/\n│       ├── page.tsx              # Admin dashboard (stats, audit log)\n│       ├── moderation/page.tsx   # AI-flagged content queue\n│       ├── reports/page.tsx      # User-submitted reports\n│       ├── users/page.tsx        # User management (roles, bans)\n│       └── resources/page.tsx    # Resource CRUD management\n│\n├── banned/page.tsx               # Banned/suspended user page\n├── layout.tsx                    # Root layout (fonts, theme, toaster)\n└── page.tsx                      # Landing page (public)\n```\n\n### Core Patterns\n\n| Pattern | Description |\n|---------|-------------|\n| **Server Component Wrapper** | Every `page.tsx` is a Server Component that fetches data and passes it as props to a `\"use client\"` child. Zero client-side data fetching on initial load. |\n| **Server Actions** | All mutations go through `'use server'` functions in `lib/actions/`. No API routes needed. |\n| **Supabase SSR** | Auth is handled exclusively via `@supabase/ssr` with `getAll`/`setAll` cookie API. No legacy helpers. |\n| **Supabase Realtime** | Client-side subscriptions for live message and notification updates. |\n| **Async Params** | All dynamic route `params` are awaited as Promises (Next.js 16 requirement). |\n| **asChild Rendering** | Buttons wrapping links always use the shadcn `asChild` pattern to prevent hydration mismatches. |\n| **Rate Limiting** | In-memory token bucket rate limiter protects sensitive server actions. |\n\n---\n\n## \u0026#x1F4BB; Tech Stack\n\n| Layer | Technology | Version |\n|-------|-----------|---------|\n| **Framework** | [Next.js](https://nextjs.org/) (App Router + Turbopack) | `16.0.0` |\n| **Runtime** | [React](https://react.dev/) | `19.2.0` |\n| **Language** | [TypeScript](https://www.typescriptlang.org/) (Strict Mode) | `5.x` |\n| **Styling** | [Tailwind CSS](https://tailwindcss.com/) (OKLCh color space) | `4.x` |\n| **UI Components** | [shadcn/ui](https://ui.shadcn.com/) (New York style) | 20 components |\n| **Icons** | [Lucide React](https://lucide.dev/) | `0.548.x` |\n| **Animations** | [Framer Motion](https://www.framer.com/motion/) | `12.x` |\n| **Forms** | [React Hook Form](https://react-hook-form.com/) + [Zod v4](https://zod.dev/) | `7.x` / `4.x` |\n| **Database** | [Supabase](https://supabase.com/) (PostgreSQL + pgvector) | `2.76.x` |\n| **Auth** | [Supabase Auth](https://supabase.com/docs/guides/auth) (SSR) | `0.7.x` |\n| **Realtime** | [Supabase Realtime](https://supabase.com/docs/guides/realtime) | Built-in |\n| **AI / NLP** | [Hugging Face](https://huggingface.co/) Inference APIs | `@huggingface/inference` |\n| **Deployment** | [Vercel](https://vercel.com/) | - |\n\n### UI Component Library\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e20 shadcn/ui components installed\u003c/b\u003e\u003c/summary\u003e\n\n`Avatar` · `Badge` · `Button` · `Card` · `Dialog` · `Dropdown Menu` · `Form` · `Input` · `Label` · `Progress` · `Radio Group` · `Scroll Area` · `Select` · `Separator` · `Sheet` · `Skeleton` · `Sonner` · `Switch` · `Tabs` · `Textarea` · `Tooltip`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e4 custom animation components\u003c/b\u003e\u003c/summary\u003e\n\n| Component | Purpose |\n|-----------|---------|\n| `AnimatedSection` | Fade-in-up on scroll using `useInView` |\n| `AnimatedCounter` | Animated number counting for dashboard stats |\n| `StaggerChildren` | Sequential child reveal animations |\n| `PageTransition` | Route transition wrapper with `AnimatePresence` |\n\n\u003c/details\u003e\n\n---\n\n## \u0026#x1F5C4; Database Schema\n\n18 PostgreSQL tables across 6 migrations with **Row Level Security enabled on all tables**.\n\n```\nProfiles \u0026 Auth         Forum \u0026 Content          Messaging \u0026 Social\n┌──────────────────┐   ┌──────────────────┐     ┌──────────────────┐\n│ profiles         │   │ forum_posts      │     │ conversations    │\n│ ─────────────    │   │ forum_comments   │     │ messages         │\n│ hemophilia_type  │   │ forum_likes      │     │ connections      │\n│ severity_level   │   │                  │     │ follows          │\n│ factor_level     │   │ resources        │     │ bookmarks        │\n│ current_treatment│   │ saved_resources  │     │ post_subscriptions│\n│ life_stage       │   │                  │     │                  │\n│ topics[]         │   │ reported_content │     │                  │\n│ role             │   │                  │     │                  │\n│ avatar_url       │   │                  │     │                  │\n│ embedding        │   │                  │     │                  │\n└──────────────────┘   └──────────────────┘     └──────────────────┘\n\nNotifications           Communities              Admin\n┌──────────────────┐   ┌──────────────────┐     ┌──────────────────┐\n│ notifications    │   │ micro_communities│     │ admin_audit_log  │\n│ user_badges      │   │ micro_community_ │     │                  │\n│                  │   │   members        │     │                  │\n└──────────────────┘   └──────────────────┘     └──────────────────┘\n```\n\n### Key Database Features\n\n- **Auto Profile Creation** — A PostgreSQL trigger automatically creates a profile row when a user signs up via Supabase Auth\n- **Timestamp Management** — `updated_at` columns auto-update via database triggers\n- **pgvector Embeddings** — 384-dimensional vectors on profiles and posts with HNSW indexes for fast similarity search\n- **RPC Match Functions** — `match_profiles()` and `match_forum_posts()` for vector similarity queries\n- **Unique Conversation Pairs** — Expression-based unique indexes using `least()`/`greatest()` ensure one conversation per user pair\n- **Connection Deduplication** — Same expression index pattern prevents duplicate connection requests\n- **Realtime Enabled** — Messages and notifications tables broadcast changes via Supabase Realtime\n- **Seed Data** — Pre-populated resource library and 10 micro-communities\n- **Admin Audit Logging** — All admin actions tracked with actor, target, reason, and timestamp\n\n### Server Actions\n\n| Module | Functions |\n|--------|-----------|\n| `auth` | `signUp`, `signIn`, `signOut`, `signInWithGoogle` |\n| `user` | `getUser` |\n| `profile` | `getProfile`, `getProfileById`, `saveProfile`, `updateProfile`, `getRecentPostsByUser` |\n| `forum` | `getPosts`, `searchPostsSemantic`, `getPostById`, `createPost`, `createComment`, `togglePostLike`, `toggleCommentLike`, `regenerateSummary` |\n| `messages` | `getConversations`, `getMessages`, `sendMessage`, `markMessagesAsRead`, `startConversation` |\n| `dashboard` | `getDashboardStats`, `getRecentActivity`, `getSuggestedPeers` |\n| `resources` | `getResources`, `toggleSaveResource`, `getSavedResourceIds`, `createResource`, `updateResource`, `deleteResource`, `toggleFeatured` |\n| `social` | `toggleFollow`, `isFollowing`, `getFollowerCount`, `getFollowingCount`, `toggleBookmark`, `isBookmarked`, `getBookmarkedPosts`, `toggleSubscription`, `isSubscribed`, `getSubscribers`, `reportContent`, `searchUsers` |\n| `notifications` | `getNotifications`, `getUnreadCount`, `markAsRead`, `markAllAsRead`, `createNotification` |\n| `communities` | `getCommunities`, `getCommunityById`, `getCommunityMembers`, `joinCommunity`, `leaveCommunity`, `autoJoinCommunities` |\n| `admin` | `getAdminStats`, `getFlaggedPosts`, `approvePost`, `rejectPost`, `getReports`, `resolveReport`, `getAllUsers`, `updateUserRole`, `banUser`, `unbanUser`, `suspendUser`, `unsuspendUser`, `deleteUser`, `deleteUserPosts`, `getAuditLog`, `getCurrentUserRole` |\n| `storage` | `uploadAvatar`, `removeAvatar` |\n\n### AI Services\n\n| Service | Functions |\n|---------|-----------|\n| `huggingface` | `generateEmbedding`, `checkToxicity`, `classifyTopics`, `summarizeThread` |\n| `matching` | `calculateRuleScore`, `calculateHybridScore` |\n| `badges` | `checkGuidingLight`, `checkConnector`, `checkFirstPost`, `checkActiveMember`, `checkCommunityBuilder`, `getUserBadges` |\n\n---\n\n## \u0026#x1F680; Getting Started\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) v18.18+\n- A [Supabase](https://supabase.com/) project (free tier works)\n- _(Optional)_ A [Hugging Face](https://huggingface.co/) API token for AI features\n\n### 1. Clone \u0026 Install\n\n```bash\ngit clone https://github.com/cattolatte/HemoConnect.git\ncd HemoConnect\nnpm install\n```\n\n### 2. Configure Environment\n\nCreate a `.env.local` file in the project root:\n\n```env\n# Supabase (required)\nNEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url\nNEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key\n\n# Hugging Face (optional — for AI features)\nHUGGING_FACE_TOKEN=your_hugging_face_read_token\n```\n\n\u003e You can find your Supabase credentials in **Project Settings \u003e API** on the [Supabase Dashboard](https://supabase.com/dashboard).\n\n### 3. Set Up the Database\n\nRun all 6 migration files in order in the **SQL Editor** of your Supabase Dashboard:\n\n1. `supabase/migrations/00001_initial_schema.sql` — Core tables, RLS, triggers, seed data\n2. `supabase/migrations/00002_vector_embeddings.sql` — pgvector, embedding columns, match functions\n3. `supabase/migrations/00003_ai_features.sql` — Auto-tagging, AI summary columns\n4. `supabase/migrations/00004_phase4_schema.sql` — Notifications, follows, bookmarks, communities, badges, reports\n5. `supabase/migrations/00005_admin_expansion.sql` — Ban/suspend system, audit log\n6. `supabase/migrations/00006_admin_resources_rls.sql` — Admin resource management policies\n\n### 4. Bootstrap Admin User\n\nAfter signing up your first account, promote yourself to admin via the Supabase SQL Editor:\n\n```sql\n-- Replace with your email address\nUPDATE public.profiles\nSET role = 'admin'\nWHERE id = (SELECT id FROM auth.users WHERE email = 'your@email.com');\n```\n\n### 5. Run the Dev Server\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n### Available Scripts\n\n| Command | Description |\n|---------|-------------|\n| `npm run dev` | Start development server (Turbopack) |\n| `npm run build` | Create optimized production build |\n| `npm run start` | Serve production build locally |\n| `npm run lint` | Run ESLint |\n\n---\n\n## \u0026#x1F5FA; Roadmap\n\n- [x] **Phase 1** — Project Foundation \u0026 Landing Page\n  - Next.js 16 setup, Tailwind v4 theming, Framer Motion animations, warm coral/stone design system, responsive sidebar layout\n- [x] **Phase 2** — Authentication \u0026 Data Layer\n  - Supabase Auth (email + Google OAuth), middleware route protection, full PostgreSQL schema with RLS, all pages wired to real data via server actions\n- [x] **Phase 3** — AI Features\n  - Hugging Face embeddings, semantic forum search, AI-powered peer matching, content moderation, auto-tagging, knowledge distiller (thread summaries)\n- [x] **Phase 4** — Feature Expansion\n  - Notifications (realtime), follow/bookmark/subscribe system, micro-communities, gamification badges, content reporting, loading skeletons, error boundaries, create post dialog, rate limiting\n- [x] **Phase 4.5** — Admin, Moderation \u0026 Polish\n  - Admin dashboard with audit log, moderation queue, user management (ban/suspend/roles), resource CRUD, profile edit dialog, profile page redesign, UI polish\n- [x] **Phase 5** — Production Readiness \u0026 Feedback\n  - Anonymous feedback system (Formspree), SEO (sitemap.xml, robots.txt, page metadata), global error \u0026 404 pages, security headers (HSTS, X-Frame-Options, CSP), Next.js image optimization config\n\n---\n\n## \u0026#x1F4C1; Project Structure\n\n```\nhemoconnect/\n├── app/                          # Next.js App Router pages\n│   ├── (auth)/                   # Public auth pages (login, signup, callback)\n│   ├── (main)/                   # Authenticated pages\n│   │   ├── dashboard/            # User dashboard\n│   │   ├── forum/                # Community forum + post detail\n│   │   ├── messages/             # Private messaging\n│   │   ├── profile/              # Profile setup + view\n│   │   ├── resources/            # Resource library\n│   │   ├── bookmarks/            # Saved posts\n│   │   ├── communities/          # Micro-communities\n│   │   ├── feedback/             # Anonymous feedback form (Formspree)\n│   │   └── admin/                # Admin panel (dashboard, moderation, users, reports, resources)\n│   ├── banned/                   # Banned/suspended user page\n│   ├── sitemap.ts                # Dynamic sitemap.xml generation\n│   ├── robots.ts                 # Crawler directives (robots.txt)\n│   ├── global-error.tsx          # Root-level error boundary\n│   ├── not-found.tsx             # Custom 404 page\n│   ├── layout.tsx                # Root layout\n│   ├── page.tsx                  # Landing page\n│   └── globals.css               # Tailwind v4 theme (OKLCh colors)\n│\n├── components/\n│   ├── animations/               # Framer Motion wrapper components (4)\n│   ├── shared/                   # Sidebar, Navbar, NotificationBell, CreatePostDialog, etc. (7)\n│   └── ui/                       # shadcn/ui primitives (20 components)\n│\n├── lib/\n│   ├── actions/                  # Server Actions (12 modules, 87+ functions)\n│   ├── supabase/                 # Supabase clients (server, client, middleware)\n│   ├── types/                    # TypeScript type definitions (50+ types)\n│   ├── utils/                    # Utility functions (time formatting)\n│   ├── validations/              # Zod v4 schemas (profile, forum, message)\n│   └── rate-limit.ts             # Token bucket rate limiter\n│\n├── services/                     # External integrations\n│   ├── huggingface.ts            # AI: embeddings, moderation, tagging, summarization\n│   ├── matching.ts               # Peer matching: rule-based + hybrid scoring\n│   └── badges.ts                 # Gamification: badge checking + awarding\n│\n├── supabase/migrations/          # 6 SQL migration files\n├── middleware.ts                  # Auth session refresh + route protection\n└── next.config.ts                # Next.js config (React Compiler, security headers, image patterns)\n```\n\n---\n\n## \u0026#x1F91D; Contributing\n\nContributions are welcome! Whether it's a bug report, feature suggestion, or pull request — we'd love your input.\n\n1. **Fork** the repository\n2. **Create** a feature branch: `git checkout -b feature/your-feature`\n3. **Commit** your changes: `git commit -m \"Add your feature\"`\n4. **Push** to the branch: `git push origin feature/your-feature`\n5. **Open** a Pull Request\n\n\u003e Please make sure your code passes `npm run build` and `npm run lint` before submitting.\n\n---\n\n## \u0026#x1F512; Security \u0026 Privacy\n\n- **Row Level Security** is enabled on every database table — users can only access their own data\n- **Security Headers** — X-Frame-Options (DENY), X-Content-Type-Options (nosniff), HSTS, Referrer-Policy, and Permissions-Policy on all routes\n- **Rate Limiting** — Token bucket rate limiter protects against abuse on posts, comments, messages, reports, and uploads\n- **Content Moderation** — AI-powered toxicity detection flags harmful content automatically\n- **Admin Audit Log** — All admin actions are logged with full traceability\n- **Ban/Suspend System** — Middleware-level enforcement blocks banned and suspended users from accessing the platform\n- **SEO Controls** — `robots.txt` disallows crawling of private routes; admin pages marked `noindex`\n- **Medical Disclaimer** — All AI-generated content carries a disclaimer that it is not medical advice\n- **No sensitive health tracking** — We do not store bleed logs, infusion records, or clinical treatment data\n- **Supabase Auth** — Passwords are never stored in application code; authentication is handled entirely by Supabase\n\n---\n\n## \u0026#x1F4C4; License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nBuilt with \u0026#x2764; for the hemophilia community\n\n**[HemoConnect](https://github.com/cattolatte/HemoConnect)** · Made with Next.js, Supabase \u0026 AI\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcattolatte%2Fhemoconnect-public","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcattolatte%2Fhemoconnect-public","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcattolatte%2Fhemoconnect-public/lists"}