Skip to content

Repository files navigation

Nivarra: Medically-Informed, Community-Supported Menopause Transition Assistant

Nivarra is a highly polished, culturally tailored menopause transition assistant designed for women (aged 38–65) managing perimenopause, active menopause, and post-menopause. Crafted with a premium, high-contrast Editorial Aesthetic, Nivarra provides holistic Ayurvedic remedies, clinical laboratory reports logging, dynamic Harmony Score computation, a reflective mindful journal, and support communities.

This repository is optimized for development sandboxing, SaaS scale-up, and is 100% production-ready for deployment using Next.js, Clerk, Supabase, Razorpay, Resend, PostHog, Sentry, Upstash Redis, and Pinecone!


Architectural Overview & Integration Matrix

The codebase utilizes a dual-capability architecture designed to run as a single-page full-stack Express+Vite application inside sandboxes, which can be seamlessly migrated/exported to Next.js (App Router).

All major SaaS integrations are written as lazy-initialized modules (src/lib/integrations/*) with secure, elegant runtime fallbacks:

  1. Database & Storage (Supabase): Live cloud sync of logs, clinical labs, journals and profiles. Falls back securely to local storage when inactive.
  2. User Authentication (Clerk): Multi-social login (Email, Google) matching Clerk JWTs. Falls back to immediate local sandbox clinical profiles when deactivated.
  3. Payments (Razorpay Checkout): Native dynamic script-loading of India's leading payment gateway supporting UPI, Netbanking, Cards, and Wallets. Falls back to simulated sandbox tracking when toggled.
  4. Transactional Emails (Resend): Handles automated clinical registrations, welcome packets and purchase invoices. Logs safely to server consoles when offline.
  5. Caching & Security (Upstash Redis): Restricts API abuse and rate-limits the Gemini AI Companion engine.
  6. AI Vector Database (Pinecone): Generates 768-dimension semantic embeddings via Gemini (text-embedding-004) to query Ayurvedic remedy inventories.

Recent Updates

  • Aesthetic Enhancements: Improved dark mode support, updating typography and systemic text colors (e.g. customized Nivarra Rose and slate shades) for increased readability in the Store & Wellness views.
  • Branding Integration: Migrated the core Nivarra logo as the universal application favicon for seamless browser integration.
  • Git Hygiene: Refined and modernized .gitignore configurations aligned with best-practice Vite/Node.js structures.

Repository File Structure

├── server.ts                 # Full-stack backend Express server with Sentry, Redis, and APIs
├── vite.config.ts            # Vite asset compiling pipelines
├── package.json              # Direct deployment lock entries
├── supabase/
│   └── schema.sql            # Core database schema, indices, & Row Level Security (RLS) rules
├── src/
│   ├── main.tsx              # React mounting entry point
│   ├── App.tsx               # Primary router & view controller
│   ├── app/                  # Main platform modules & pages
│   │   ├── DashboardPage.tsx # Clinical stats & somatic stretches
│   │   ├── StorePage.tsx     # Ayurvedic Remedies store with Razorpay
│   │   ├── WellnessPage.tsx  # Daily comfort logs, lab panels, & Harmony Scores
│   │   ├── MindspacePage.tsx # Mindful reflective journal with prompts
│   │   └── SettingsPage.tsx  # Secure clinical records configuration
│   ├── lib/
│   │   ├── dbStore.ts        # Modular Local offline-first data manager
│   │   └── integrations/     # Multi-SaaS production adapters
│   │       ├── clerk.ts      # Clerk Auth bridge
│   │       ├── supabase.ts   # Supabase Client CRUD
│   │       ├── razorpay.ts   # Razorpay checkout modal triggers
│   │       ├── resend.ts     # Resend email triggers
│   │       ├── redis.ts      # Upstash Redis rate limiter
│   │       └── pinecone.ts   # Pinecone Vector Search
│   └── types/
│       └── index.ts          # Safe shared typescript interface schemas

Native Local Development Setup

1. Prerequisites

  • Node.js v18+
  • npm v9+

2. Installations

Install base dependencies:

npm install

3. Boot Dev Server

Runs both Vite frontend assets compilation and the Express API server on unified port 3000:

npm run dev

Open http://localhost:3000 in your browser.

4. Compile Build

Performs a strict TypeScript compilation (tsc) and bundles optimized production assets into /dist:

npm run build

Clinical Platform Code Standards

  • Strong Types Only: All interfaces are defined cleanly in /src/types/index.ts. No implicit any variables permitted.
  • Atomic Components: Avoid monolithic components; sub-widgets are modularly declared.
  • Accented Themes: Fully supports high-contrast Light and Dark rendering modes styled elegantly with responsive Tailwind margins.

About

Care Beyon the Pause

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages