Skip to content

Latest commit

 

History

History
138 lines (102 loc) · 2.63 KB

File metadata and controls

138 lines (102 loc) · 2.63 KB

Quick Start Guide

Get VideoGen Messenger running in 5 minutes!

Prerequisites

  • Node.js 18+ installed
  • Docker Desktop running
  • Git installed

Setup Steps

1. Clone & Install (1 minute)

git clone https://github.com/yourusername/videogen-messenger.git
cd videogen-messenger/backend
npm install

2. Start Services (2 minutes)

# Start PostgreSQL, Redis, and Elasticsearch
docker-compose -f docker-compose.dev.yml up -d

# Wait 30 seconds for services to start
sleep 30

3. Configure Environment (30 seconds)

# Copy environment template
cp .env.example .env

# Edit .env and add your API keys (optional for local dev)
# GOOGLE_VEO_API_KEY=your_key_here
# RUNWAY_API_KEY=your_key_here
# MINIMAX_API_KEY=your_key_here

4. Initialize Database (30 seconds)

# Run migrations
npm run migrate

# Seed with test data (optional)
npm run db:seed

5. Start Server (30 seconds)

# Start development server
npm run dev

Server will start at http://localhost:3000

Test It Works

# Health check
curl http://localhost:3000/health

# Should return: {"status":"ok"}

Next Steps

  1. Read the docs: Check out DEVELOPMENT.md
  2. Test the API: Import Postman collection from docs/postman/
  3. Run tests: npm test
  4. Start building: Check API.md for endpoints

Quick API Test

# 1. Register a user
curl -X POST http://localhost:3000/api/v1/auth/register \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "test@example.com",
    "password": "Test123!@#",
    "name": "Test User"
  }'

# 2. Login (copy the token from response)
curl -X POST http://localhost:3000/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "test@example.com",
    "password": "Test123!@#"
  }'

# 3. Generate video (replace YOUR_TOKEN)
curl -X POST http://localhost:3000/api/v1/generate \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -d '{
    "prompt": "A beautiful sunset over mountains",
    "quality": "hd",
    "duration": 5
  }'

Troubleshooting

Port Already in Use

# Find and kill process
lsof -i :3000
kill -9 <PID>

Database Connection Failed

# Restart Docker services
docker-compose -f docker-compose.dev.yml restart

Missing Dependencies

# Clean install
rm -rf node_modules package-lock.json
npm install

Need Help?