Skip to content

visshbala21/innerHarbor

Repository files navigation

Inner Harbor

An AI-powered web app that helps people design personalized 3-5 minute "micro-rituals" for stress, anxiety, and low mood.

🌐 Live Demo: https://inner-harbor-eta.vercel.app

🎯 What is Inner Harbor?

Inner Harbor is not therapy—it's a self-care and awareness tool that:

  • Generates short, structured rituals combining breathing, movement, sensory grounding, and self-talk
  • Tracks what helps you over time
  • Provides a calm, non-judgmental space for immediate relief

Important: This app cannot replace professional mental health care. See our safety guidelines below.

🚀 Getting Started

Prerequisites

  • Node.js 18+ and npm
  • PostgreSQL database (local or hosted)

Installation

  1. Clone and install dependencies
npm install
  1. Set up environment variables

Copy .env.example to .env and fill in your values:

cp .env.example .env

Required variables:

  • DATABASE_URL: PostgreSQL connection string (pooled)
  • DIRECT_URL: Direct database connection (for migrations)
  • AI_API_URL: LLM API endpoint (e.g., OpenAI)
  • AI_MODEL: Model name to use (e.g., gpt-4o-mini)
  • AI_API_KEY: Your OpenAI API key
  • NEXT_PUBLIC_APP_URL: Your app URL (for production)
  • NODE_ENV: Environment (development/production)
  1. Initialize the database
npm run prisma:migrate
npm run prisma:generate
  1. Run the development server
npm run dev

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

📁 Project Structure

innerHarbor/
├── app/                   # Next.js App Router
│   ├── page.tsx          # Home: ritual composer
│   ├── library/          # Saved rituals
│   ├── weather/          # Emotional weather timeline
│   ├── about/            # Safety info
│   └── api/              # Backend API routes
├── src/
│   ├── components/       # React components
│   │   ├── ui/          # Base UI primitives
│   │   ├── ritual/      # Ritual-specific components
│   │   └── layout/      # Layout components
│   ├── lib/             # Business logic
│   │   ├── llm.ts       # LLM integration
│   │   ├── safety.ts    # Crisis detection
│   │   ├── db.ts        # Prisma client
│   │   └── types.ts     # Shared types
│   └── styles/          # Global styles
├── prisma/
│   └── schema.prisma    # Database schema
├── PROJECT_SPEC.md      # Full product specification
├── CLAUDE.md            # Development instructions
└── TASKS_CHECKLIST.md   # Active task tracking

🛠️ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Run production server
  • npm run lint - Lint code
  • npm run prisma:generate - Generate Prisma client
  • npm run prisma:migrate - Run database migrations
  • npm run prisma:studio - Open Prisma Studio (DB GUI)

🗄️ Data Model

  • User: Basic user profile
  • Session: Emotional check-in (emotion, context, distress rating)
  • Ritual: Saved ritual with steps and metadata
  • Run: Record of ritual execution with helpfulness rating

See prisma/schema.prisma for details.

🧪 Development Workflow

  1. Read PROJECT_SPEC.md for product context
  2. Check TASKS_CHECKLIST.md for current phase
  3. Follow conventions in CLAUDE.md
  4. Make changes in small, focused steps
  5. Test with npm run dev and npm run lint

🚢 Deployment

Quick Deploy to Production

This app is ready to deploy to Vercel with Supabase as the database.

See DEPLOYMENT_GUIDE.md for complete step-by-step instructions.

Quick Steps:

  1. Set up Supabase (Database)

    • Create free account at supabase.com
    • Create new project
    • Copy connection string
    • Run npx prisma migrate deploy
  2. Deploy to Vercel (Hosting)

    • Create account at vercel.com
    • Import your GitHub repository
    • Add environment variables
    • Deploy!
  3. Post-Deployment

    • Test all features
    • Verify crisis detection
    • Monitor logs

Environment Variables for Production

DATABASE_URL="postgresql://..." # From Supabase (pooled connection)
DIRECT_URL="postgresql://..." # From Supabase (for migrations)
AI_API_URL="https://api.openai.com/v1/chat/completions"
AI_MODEL="gpt-4o-mini"
AI_API_KEY="sk-..." # Your OpenAI key
NEXT_PUBLIC_APP_URL="https://inner-harbor-eta.vercel.app" # Your Vercel URL
NODE_ENV="production"

Note: For IPv4 networks, use Supabase's session pooler for both DATABASE_URL and DIRECT_URL. See DEPLOYMENT_GUIDE.md for details.

🔒 Safety & Ethics

What This App Does NOT Do

  • ❌ Diagnose mental health conditions
  • ❌ Provide therapy or medical advice
  • ❌ Handle crisis situations
  • ❌ Replace professional care

Crisis Resources

If you or someone you know is in crisis:

  • US: Call or text 988 (Suicide & Crisis Lifeline)
  • Crisis Text Line: Text "HELLO" to 741741
  • Emergency: Call 911 or go to nearest emergency room

Safety Features

  • Prominent disclaimers throughout the app
  • Crisis keyword detection
  • Clear boundaries in AI prompts
  • Privacy-first data handling

🎨 Design Principles

  • Calm, non-clinical aesthetic: Soft colors, gentle gradients
  • Accessibility first: WCAG AA standards
  • Privacy by default: User controls their data
  • Evidence-informed: Grounded in CBT, DBT, mindfulness research

📝 License

Private project. Not for redistribution.

🙏 Acknowledgments

Built with compassion for mental health and well-being.


Remember: You deserve support. If this app isn't enough, please reach out to a mental health professional.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages