This project is a full-stack application that leverages OpenAI's Whisper for video transcription. It is built using Spring Boot for the backend and Vite + React for the frontend. This app allows users to upload video files for transcription and manages the video files and transcriptions using AWS S3.
- Upload multiple video files.
- Transcribe videos using OpenAI Whisper.
- Manage video files and transcriptions with AWS S3 storage.
- Authentication using OAuth2.
- Backend: Spring Boot (Java), OpenAI Whisper
- Frontend: Vite + React (TypeScript)
- Database: PostgreSQL
- Storage: AWS S3
- OAuth: Google OAuth2
Before setting up the project, ensure that you have the following installed:
- Docker and Docker Compose
- Java 17+ (for Spring Boot)
- Node.js (for Vite + React)
- AWS S3 credentials
- OpenAI API Key
├── backend/
│ └── transcription/
│ ├── Dockerfile (Spring Boot Dockerfile)
│ ├── .env (Spring Boot environment variables)
│ ├── src/ (Spring Boot source code)
├── frontend/
│ ├── Dockerfile (Vite + React Dockerfile)
│ ├── .env (Vite environment variables)
│ ├── src/ (React source code)
├── docker-compose.yml (Docker Compose setup for the project)
You will need to create two .env
files for the backend and frontend.
# PostgreSQL Settings
POSTGRES_DB=your_db_name
POSTGRES_USER=your_db_user
POSTGRES_PASSWORD=your_db_password
# AWS S3 Settings
S3_ACCESS_KEY=your_aws_access_key
S3_SECRET_KEY=your_aws_secret_key
S3_BUCKET=your_s3_bucket_name
# OpenAI Settings
OPENAI_API_KEY=your_openai_api_key
# OAuth2 (Google)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
VITE_API_URL=http://localhost:8080/api
VITE_GOOGLE_CLIENT_ID=your_google_client_id
# !! Do this again in both .env files
POSTGRES_DB=your_db_name
POSTGRES_USER=your_db_user
POSTGRES_PASSWORD=your_db_password
The project is containerized using Docker Compose. It sets up the backend, frontend, and PostgreSQL database services.
-
Clone the repository:
git clone https://github.com/yourusername/ai-transcription-app.git cd ai-transcription-app
-
Create the
.env
files as described above. -
Run Docker Compose:
docker-compose up --build
-
Access the application:
- Frontend: Open your browser and go to
http://localhost:3000
- Backend (API): Accessible at
http://localhost:8080
- Frontend: Open your browser and go to
springboot-app
: The backend service (Spring Boot app). It runs on port8080
and handles video uploads, transcriptions, and OAuth authentication.vite-app
: The frontend service (Vite + React). It runs on port3000
and provides the user interface.postgres
: The PostgreSQL database service. It stores user data, video information, and transcription details.
version: "3.9"
services:
springboot-app:
build:
context: ./backend/transcription
dockerfile: Dockerfile
ports:
- "8080:8080"
env_file:
- ./backend/transcription/.env
depends_on:
- postgres
postgres:
image: postgres:14-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- ./postgres-data:/var/lib/postgresql/data
vite-app:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
env_file:
- ./frontend/.env
depends_on:
- springboot-app
- Navigate to the backend directory:
cd backend/transcription
- Create the
.env
file as mentioned above. - Build and run the Spring Boot application:
./mvnw spring-boot:run
- Navigate to the frontend directory:
cd frontend
- Create the
.env
file as mentioned above. - Install dependencies and start the Vite development server:
npm install npm run dev
This project is licensed under the MIT License.
Feel free to open issues or pull requests if you find bugs or have suggestions for improvements.
For any questions or support, contact ethan05dy@gmail.com.