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

# Mahalaxmi - Deployment

> Docker and manual VPS deployment guide

## Tech stack

| Layer          | Technology                                         |
| -------------- | -------------------------------------------------- |
| Frontend       | React 18, TypeScript, Vite, Tailwind CSS, Radix UI |
| Backend        | Node.js, Express.js, TypeScript                    |
| Database       | MySQL 8 (Drizzle ORM)                              |
| Caching        | Redis (Upstash in prod)                            |
| Auth           | JWT (access + refresh tokens), OAuth2              |
| AI / LLM       | Google Gemini, LangChain, OpenAI (embeddings)      |
| Vector DB      | Qdrant                                             |
| Cloud Storage  | AWS S3                                             |
| Payments       | Stripe, Cashfree                                   |
| WhatsApp       | Gupshup (primary), Wasimple, Facebook Meta         |
| Real-time      | WebSockets                                         |
| Job Scheduling | node-cron                                          |

## Production services

| Service         | Purpose                      |
| --------------- | ---------------------------- |
| MySQL (managed) | Primary database             |
| Upstash Redis   | Caching + sessions           |
| AWS S3          | Media file storage           |
| Qdrant Cloud    | Vector search (RAG)          |
| Gupshup         | WhatsApp messaging           |
| Stripe          | Subscriptions and payments   |
| Google Cloud    | Gemini API (AI + embeddings) |

## Docker deployment

Uncomment the `app` service in `docker-compose.yml` and run:

```bash theme={null}
docker-compose up -d
```

The `Dockerfile` builds the full app. Port `5001` is exposed.

## Manual / VPS deployment

```bash theme={null}
# 1. Install dependencies
npm install

# 2. Build
npm run build

# 3. Set production env vars in .env

# 4. Run migrations
npm run db:push

# 5. Start
npm run start
```

Build outputs:

* Client → `dist/public/`
* Server → `dist/index.js`

## Pre-deploy checklist

<Check>NODE\_ENV=production</Check>
<Check>DATABASE\_SSL=true</Check>
<Check>SESSION\_USE\_SECURE\_COOKIE=true</Check>
<Check>Real JWT\_SECRET and JWT\_REFRESH\_SECRET set</Check>
<Check>Stripe webhook secret matches endpoint in Stripe dashboard</Check>
<Check>Gupshup webhook URL updated to production domain</Check>
<Check>ALLOWED\_ORIGINS set to production domain only</Check>
