> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lostmindai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LostMind AI - SaaS Platform Development - Readme

> readme documentation for LostMind AI - SaaS Platform Development

# LostMind AI Monorepo

Production-ready AI-powered SaaS platform built with Next.js 15, Turborepo, and FastAPI.

> 📌 **Source of truth:** refer to `_archived/projects/lostmindai-turborepo/docs/project/CURRENT_PROJECT_STATE.md` for the canonical status. Update it first whenever scope or implementation changes.

## Tech Stack

* **Frontend**: Next.js 15 (App Router), React 19 Stable, TypeScript
* **Backend**: FastAPI (Python) for compute-intensive tasks
* **Database**: PostgreSQL with Prisma ORM and Row Level Security
* **Authentication**: Auth.js v5 with Google OAuth
* **Payments**: Stripe
* **AI**: Google Generative AI (Gemini)
* **Deployment**: Vercel (Next.js), Google Cloud Run (FastAPI)
* **Monorepo**: Turborepo with pnpm workspaces

## 🛠️ Development Tools & Enhancements

### **Task Management System**

* **Automated task lifecycle management** with status tracking (🟢 Active, ✅ Completed, 🔄 Blocked)
* **Task cleanup automation** prevents accumulation of completed work
* **Smart task auditing** with `pnpm run tasks:audit`
* **Format validation** ensures consistent task file structure

### **TypeScript Configuration Standards**

* **Inheritance-aware configuration** prevents duplicate lib entries
* **Monorepo-specific patterns** for package organization
* **Automated validation** catches common configuration issues
* **Clear inheritance guidelines** for all package configurations

### **File Organization Automation**

* **Standardized directory structures** for apps, packages, and services
* **Naming convention enforcement** for components, tests, and documentation
* **Location validation** prevents files in incorrect directories
* **Automated cleanup** maintains project structure integrity

```bash theme={null}
# Task management commands
pnpm run tasks:audit      # Analyze all task files
pnpm run tasks:cleanup    # Remove completed tasks
pnpm run tasks:status     # Show statistics
pnpm run tasks:validate   # Check format compliance
```

### **AI Development Memory System**

* **CLAUDE.md** serves as comprehensive project memory file
* **Context preservation** across development sessions
* **Pattern recognition** for consistent code organization
* **Standards enforcement** for TypeScript and file structure

**📖 Review `CLAUDE.md` for the complete AI development playbook (see `_archived/projects/lostmindai-turborepo/CLAUDE.md`).**

## Project Structure Overview

For the live directory snapshot, visit `_archived/projects/lostmindai-turborepo/docs/project/CURRENT_PROJECT_STATE.md`. Highlights below mirror that file:

### Implemented foundations

* `apps/ask` — Orb experience scaffold (UI locked to current production experience, security upgrades in flight)
* `apps/marketing` — Marketing shell prepared for redesign
* `packages/*` — Shared libraries (`config`, `ui`, `db`, `auth`, `ai-clients`, `billing`)
* `services/ai-compute` — FastAPI service with IAM hooks and Redis rate limiting (needs production hardening)
* `docker-compose.yml` — Local stack for Postgres, Redis, Next.js apps, FastAPI

### Planned (not yet shipped)

* Additional apps: `private-docs`, `chatcrawler`, `justdropit`, `admin`
* Additional packages: `security`, `rag`, `utils`
* Additional services: `document-processor`, `crawler-engine`, `security-monitor`

### 📖 Directory Documentation

Each directory contains its own README.md with specific implementation details:

* **apps/ask/README.md** - AI query interface documentation
* **apps/marketing/README.md** - Marketing website documentation
* **packages/README.md** - Shared packages overview
* **services/README.md** - Microservices documentation
* **infrastructure/README.md** - Infrastructure setup

## Quick Start

```bash theme={null}
# Install dependencies
pnpm install

# Environment
# Keep secrets out of git. See `_archived/projects/lostmindai-turborepo/docs/secrets-policy.md`
# Configure Vercel/GCP Secret Manager for production/staging.
# For local dev, copy and edit if needed (untracked):
# cp .env.example .env.local

# Push database schema
pnpm run db:push

# Start development
pnpm run dev
```

## Development

```bash theme={null}
# Run specific app
pnpm run dev --filter=marketing

# Run tests
pnpm run test

# Build all
pnpm run build

# Type checking
pnpm run type-check
```

## 📚 Documentation

The full knowledge base is preserved under `_archived/projects/lostmindai-turborepo/docs`. Start with these anchors:

### Getting Started

* **📖 Documentation Index** — `_archived/projects/lostmindai-turborepo/docs/README.md`
* **🔰 Beginner's Quick Start** — `_archived/projects/lostmindai-turborepo/docs/guides/beginner/QUICK_START.md`
* **🔐 Environment Setup** — `_archived/projects/lostmindai-turborepo/docs/setup/ENVIRONMENT_SETUP.md`
* **📋 Session Templates** — `_archived/projects/lostmindai-turborepo/docs/CLAUDE_CODE_SESSION_TEMPLATES.md`

### Architecture & Planning

* **🎯 Master Plan** — `_archived/projects/lostmindai-turborepo/docs/architecture/lostmind-master-plan.md`
* **🗓️ Implementation Roadmap** — `_archived/projects/lostmindai-turborepo/docs/architecture/implementation-roadmap.md`
* **📋 Architecture Decision Records** — `_archived/projects/lostmindai-turborepo/docs/architecture/lostmind-adrs.md`

### Integration & Operations

* **🤖 Ask App Integration** — `_archived/projects/lostmindai-turborepo/docs/guides/INTEGRATION_GUIDE_FOR_ASK_APP.md`
* **🌐 Marketing Website** — `_archived/projects/lostmindai-turborepo/docs/guides/MARKETING_WEBSITE_INTEGRATION_GUIDE.md`
* **🧠 RAG & Embeddings** — `_archived/projects/lostmindai-turborepo/docs/guides/RAG_EMBEDDINGS_INTEGRATION_GUIDE.md`
* **🕷️ Web Scraper Service** — `_archived/projects/lostmindai-turborepo/docs/guides/WEB_SCRAPER_SERVICE_INTEGRATION_GUIDE.md`
* **📦 Dependency Management** — `_archived/projects/lostmindai-turborepo/docs/DEPENDENCY_MANAGEMENT.md`
* **🔒 Environment Secrets Audit** — `_archived/projects/lostmindai-turborepo/docs/ENVIRONMENT_SECRETS_AUDIT.md`
* **🖥️ Auto Environment Setup** — `_archived/projects/lostmindai-turborepo/docs/AUTO_ENVIRONMENT_SETUP.md`

### Production Readiness

* **🛡️ Security Architecture Audit Report** — `_archived/projects/lostmindai-turborepo/docs/security/SECURITY_ARCHITECTURE_AUDIT_REPORT.md`
* **⚠️ Production Technical Analysis** — `_archived/projects/lostmindai-turborepo/docs/PRODUCTION_TECHNICAL_ANALYSIS.md`
* **🤖 Google GenAI Developer Guide** — `_archived/projects/lostmindai-turborepo/docs/GOOGLE_GENAI_DEVELOPER_GUIDE.md`
* **🚀 SaaS Launch Pathway** — `_archived/projects/lostmindai-turborepo/docs/SAAS_LAUNCH_PATHWAY.md`
* **📊 TurboRepo Migration Analysis** — `_archived/projects/lostmindai-turborepo/docs/TURBOREPO_MIGRATION_ANALYSIS.md`

### Project Management

* **✅ Claude Code Tasks** — `_archived/projects/lostmindai-turborepo/docs/project/CLAUDE_CODE_TASKS.md`
* **🗺️ Project Map** — `_archived/projects/lostmindai-turborepo/docs/project/PROJECT_MAP.md`
* **📈 Current Project State** — `_archived/projects/lostmindai-turborepo/docs/project/CURRENT_PROJECT_STATE.md`

Keep the quick navigation workflow simple:

* New contributor? Start with the quick start, then environment setup.
* Planning launch? Review the SaaS launch pathway and production analysis.
* Integrating services? Use the guides collection above.
* Need status? Open the current project state snapshot.

## Current Status (Snapshot)

**Latest Update (Sept 16, 2025):** Professional Infrastructure Restored - Development Standards Established

* **✅ Completed:** Professional infrastructure restoration, task management system, TypeScript standards, file organization automation, AI development memory system
* **✅ Operational:** Development tools (task-audit, cleanup, standards-check), automated task lifecycle management, comprehensive CLAUDE.md guidelines
* **🔄 In Progress:** Frontend integration and user experience development
* **📋 Next Phase:** Complete SaaS application with production-ready features
* **📈 Current Focus:** Professional development standards and automated tooling

Detailed status updates live in `_archived/projects/lostmindai-turborepo/docs/project/CURRENT_PROJECT_STATE.md`, with the broader index in `_archived/projects/lostmindai-turborepo/docs/README.md`.

## License

Copyright © 2025 LostMind AI. All rights reserved.
