A web application that helps users maintain emotional wellbeing through voice journaling combined with AI-powered psychological support.
- Framework: Next.js 14 (App Router), TypeScript, React 18
- Database & Auth: Supabase (PostgreSQL + GoTrue)
- Vector Store: Supabase pgvector
- AI Models: Multiple providers supported (AssemblyAI, Groq, Hugging Face, OpenAI)
- State Management: Zustand
- UI Libraries: Shadcn/UI, Tailwind CSS, Lucide React
- Node.js 18+ and npm
- Supabase account and project
- AI Provider API keys (see Setup Guide)
- Clone and install:
git clone <your-repo-url>
cd mindflow
npm install- Set up environment variables:
cp .env.local.example .env.local
# Edit .env.local with your credentials-
Set up the database:
- Run
db/schema_improved.sqlin your Supabase SQL Editor - See
db/SETUP_GUIDE.mdfor detailed instructions
- Run
-
Run the development server:
npm run devOpen http://localhost:3000 in your browser.
Required variables in .env.local:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# AI Providers (at least one set)
ASSEMBLYAI_API_KEY=your-key # For transcription
GROQ_API_KEY=your-key # For LLM
HUGGINGFACE_API_KEY=your-key # For embeddings (optional)
# Optional: OpenAI (if you have credits)
OPENAI_API_KEY=your-keySee PROVIDER_SETUP.md for detailed AI provider setup instructions.
- Run the SQL schema in Supabase SQL Editor:
db/schema_improved.sql - Verify setup: Run queries from
db/verify_setup.sql - See
db/SETUP_GUIDE.mdfor troubleshooting
mindflow/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── transcribe/ # Audio transcription endpoint
│ │ └── journal/ # Journal processing endpoint
│ ├── dashboard/ # Dashboard page
│ ├── login/ # Login page
│ └── layout.tsx # Root layout
├── lib/ # Utility libraries
│ ├── supabase/ # Supabase clients
│ ├── openai/ # OpenAI client
│ └── utils.ts # Utility functions
├── types/ # TypeScript type definitions
└── components/ # React components (to be added)
mindflow/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── transcribe/ # Audio transcription
│ │ ├── journal/ # Journal processing
│ │ └── auth/ # Authentication
│ ├── dashboard/ # Dashboard page
│ ├── login/ # Login page
│ └── layout.tsx # Root layout
├── lib/ # Utility libraries
│ ├── ai/ # AI provider abstraction
│ ├── supabase/ # Supabase clients
│ └── utils.ts # Utility functions
├── db/ # Database schemas and migrations
├── types/ # TypeScript definitions
└── components/ # React components
- PRD.md - Product Requirements Document
- PROVIDER_SETUP.md - AI Provider configuration guide
- db/SETUP_GUIDE.md - Database setup instructions
- The
SUPABASE_SERVICE_ROLE_KEYmust NEVER be exposed to the frontend - Never commit
.env.localto version control - All API keys should be kept secure
See PRD.md for complete product requirements and specifications.
[Your License Here]