Skip to content

Development Setup

Guide for setting up a local development environment.

Prerequisites

  • Java 17+
  • Gradle 8.5+
  • Node.js 18+
  • npm
  • Docker & Docker Compose
  • MongoDB (or use Docker)
  • MinIO (or use Docker)
  • RabbitMQ (or use Docker)

Quick Start

Using Docker Compose

  1. Start all services:

    docker-compose -f docker-compose.dev.yml up
    

  2. Access services:

  3. Frontend: http://localhost:4200
  4. Backend API: http://localhost:8080
  5. MinIO Console: http://localhost:9001 (admin/minioadmin)
  6. RabbitMQ Management: http://localhost:15672 (guest/guest)

Manual Setup

Backend

  1. Navigate to backend directory:

    cd backend
    

  2. Start MongoDB:

    docker run -d --name mongo -p 27017:27017 \
      -e MONGO_INITDB_ROOT_USERNAME=root \
      -e MONGO_INITDB_ROOT_PASSWORD=example \
      mongo:7.0
    

  3. Run the application:

    ./gradlew bootRun
    

Frontend

  1. Navigate to frontend directory:

    cd frontend
    

  2. Install dependencies:

    npm install
    

  3. Start development server:

    npm start
    

Transcription Worker

  1. Navigate to transcription-worker directory:

    cd transcription-worker
    

  2. Install dependencies:

    pip install -r requirements.txt
    

  3. Set environment variables:

    cp env.example .env
    # Edit .env with your configuration
    

  4. Run the worker:

    python main.py
    

Configuration

Backend Configuration

Edit backend/src/main/resources/application.yml:

spring:
  data:
    mongodb:
      uri: mongodb://root:example@localhost:27017/huh?authSource=admin

app:
  jwt:
    secret: your-secret-key-here
    expiration-ms: 86400000

Frontend Configuration

Edit frontend/src/environments/environment.ts:

export const environment = {
  apiHost: 'http://localhost:8080'
};

Database Setup

The backend includes migrations that run automatically: - Creates default admin user - Sets up ACL collections - Adds title field to transcriptions

Development Tips

  1. Hot Reload: Both frontend and backend support hot reload during development
  2. Logging: Check backend logs for detailed request/response information
  3. WebSocket: Use browser DevTools to monitor WebSocket connections
  4. API Testing: Use Postman or curl to test API endpoints directly

Troubleshooting

Port Already in Use

  • Change ports in docker-compose.dev.yml or application configuration

MongoDB Connection Issues

  • Verify MongoDB is running: docker ps
  • Check connection string in application.yml

Frontend Can't Connect to Backend

  • Verify CORS configuration in CorsConfig.kt
  • Check apiHost in frontend environment configuration