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¶
-
Start all services:
-
Access services:
- Frontend: http://localhost:4200
- Backend API: http://localhost:8080
- MinIO Console: http://localhost:9001 (admin/minioadmin)
- RabbitMQ Management: http://localhost:15672 (guest/guest)
Manual Setup¶
Backend¶
-
Navigate to backend directory:
-
Start MongoDB:
-
Run the application:
Frontend¶
-
Navigate to frontend directory:
-
Install dependencies:
-
Start development server:
Transcription Worker¶
-
Navigate to transcription-worker directory:
-
Install dependencies:
-
Set environment variables:
-
Run the worker:
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:
Database Setup¶
The backend includes migrations that run automatically: - Creates default admin user - Sets up ACL collections - Adds title field to transcriptions
Development Tips¶
- Hot Reload: Both frontend and backend support hot reload during development
- Logging: Check backend logs for detailed request/response information
- WebSocket: Use browser DevTools to monitor WebSocket connections
- API Testing: Use Postman or curl to test API endpoints directly
Troubleshooting¶
Port Already in Use¶
- Change ports in
docker-compose.dev.ymlor 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
apiHostin frontend environment configuration