Transform your voice into meaningful insights with AI-powered transcription and emotion analysis
- Audio Recording & Upload - Seamlessly record or upload audio files
- AI Transcription - Powered by OpenAI Whisper for accurate speech-to-text
- Emotion Analysis - Detect emotions in your journal entries using advanced NLP
- Journal Management - Organize entries into multiple journals
- Top Journals - Track your most active journals
- PDF Export - Export your thoughts as beautifully formatted PDFs
- Secure Authentication - Protected user sessions with Better Auth
- Cloud Storage - Reliable audio storage with AWS S3
- Privacy Controls - Private entries and journals by default
The application follows a microservices architecture with clear separation of concerns:
- Frontend: Next.js with TypeScript for the user interface
- Backend API: Next.js API routes handling business logic
- ML Service: FastAPI service for audio processing and analysis
- Database: PostgreSQL with Prisma ORM and Prisma Accelerate
- Storage: AWS S3 for audio file storage
- Authentication: Better Auth for secure user management
- Node.js 18+ and Yarn
- Python 3.8+
- PostgreSQL database (or Prisma Accelerate)
- AWS S3 bucket
1. Clone the Repository
git clone https://github.com/iaadi4/Ora.git
cd Ora2. Frontend Setup
# Install dependencies
yarn install
# Set up environment variables
.envEnvironment Variables:
# Authentication (Better Auth)
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
# Database (Prisma Accelerate)
DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=your-api-key"
# AWS S3
AWS_ACCESS_KEY_ID="your-access-key"
AWS_SECRET_ACCESS_KEY="your-secret-key"
AWS_BUCKET_NAME="your-bucket-name"
BUCKET_REGION="eu-north-1"3. Database Setup
# Generate Prisma client
yarn prisma generate
# Run migrations (if using direct database connection)
yarn prisma migrate dev4. Whisper Server Setup
# Navigate to whisper-server directory
cd whisper-server
# Install dependencies
pip install -r requirements.txt
# Activate virtual environment
source .venv/bin/activate
# Start the service
uvicorn main:app --host 0.0.0.0 --port 80005. Start the Application
# Start Next.js development server
yarn devThe application will be available at http://localhost:3000
audio-journal/
├── app/
│ ├── (pages)/
│ ├── api/
│ │ ├── auth/[...all]/
│ │ ├── export-pdf/
│ │ ├── journals/
│ │ ├── records/
│ │ └── transcribe/
│ ├── generated/
│ │ └── prisma/ # Generated Prisma client
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── components/
├── helper/
├── lib/
├── prisma/
│ └── schema.prisma
├── public/
├── whisper-server/
│ ├── __pycache__/
│ ├── .venv/
│ ├── main.py
│ └── requirements.txt
└── [configuration files]
- Model: OpenAI Whisper (tiny.en, you can change it)
- Features: Fast, english transcription
- Performance: Optimized for real-time processing
- Model: j-hartmann/emotion-english-distilroberta-base
- Emotions: Joy, Sadness, Anger, Fear, Surprise, Disgust, Neutral
- Output: Confidence scores for each detected emotion
model User {
id String @id
name String
email String @unique
emailVerified Boolean
image String?
createdAt DateTime
updatedAt DateTime
sessions Session[]
accounts Account[]
Entry Entry[]
Journal Journal[]
}
model Session {
id String @id
expiresAt DateTime
token String @unique
createdAt DateTime
updatedAt DateTime
ipAddress String?
userAgent String?
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model Entry {
id String @id @default(cuid())
userId String
user User @relation(fields: [userId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
audioUrl String
transcript String?
sentiment Json?
duration Float?
language String?
isPrivate Boolean @default(true)
Journal Journal @relation(fields: [journalId], references: [id])
journalId String
@@index([userId, createdAt])
}
model Journal {
id String @id @default(cuid())
userId String
user User @relation(fields: [userId], references: [id])
title String
content String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
isPrivate Boolean @default(true)
entries Entry[]
}yarn build
vercel --prodMake sure to set these in your deployment platform:
BETTER_AUTH_SECRETBETTER_AUTH_URL(your production URL)DATABASE_URL(Prisma Accelerate connection string)AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_BUCKET_NAMEBUCKET_REGION
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]This project uses Yarn as the package manager. Common commands:
# Install dependencies
yarn install
# Add a package
yarn add package-name
# Add a dev dependency
yarn add -D package-name
# Start development server
yarn dev
# Build for production
yarn build
# Run Prisma commands
yarn prisma generate
yarn prisma studio
yarn prisma migrate devThis project uses Prisma Accelerate for improved database performance and connection pooling. The Prisma client is generated to app/generated/prisma/ directory.
# Generate client
yarn prisma generate
# View database in browser
yarn prisma studio
# Reset database (development)
yarn prisma migrate reset- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for capturing and understanding your thoughts
⭐ Star this repo if you found it helpful!




