https://github.com/abhiram-ar/aicademy-backend
This repository contains the backend code for the AIcademy project. The backend is responsible for handling AI preprocessing, video and audio processing, authentication, and more.
https://github.com/abhiram-ar/aicademy-backend
aiagent ffmpeg langchain mongodb nodejs qdrant typescript
Last synced: 3 months ago
JSON representation
This repository contains the backend code for the AIcademy project. The backend is responsible for handling AI preprocessing, video and audio processing, authentication, and more.
- Host: GitHub
- URL: https://github.com/abhiram-ar/aicademy-backend
- Owner: abhiram-ar
- Created: 2024-12-09T08:01:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-31T15:36:58.000Z (3 months ago)
- Last Synced: 2026-03-31T17:40:59.693Z (3 months ago)
- Topics: aiagent, ffmpeg, langchain, mongodb, nodejs, qdrant, typescript
- Language: TypeScript
- Homepage: https://aicademy.abhiram-ar.com
- Size: 1.24 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aicademy-backend
This repository contains the backend code for the AIcademy project. The backend is responsible for handling AI preprocessing, video and audio processing, authentication, and more. The project is primarily written in TypeScript and uses various third-party libraries for functionality.
Looking for fontend? - [Frontend repo link](https://github.com/abhiram-ar/aicademy-fontend)
## Table of Contents
- Introduction
- Features
- Setup
- Contributing
- License
## Introduction
AIcademy is an LMS platform similar to Udemy, where students can access high-quality courses at affordable rates, and teachers can earn by selling their courses. AIcademy acts as a bridge between teachers and students, offering unique AI features to enhance the learning experience.
## Features
- Authentication: Secure stateless authentication and authorization using JWT.
- AI Preprocessing: Utilizes advanced AI models for preprocessing video for AI services.
- Video and Audio Processing: Handles video transcoding and audio processing using ffmpeg.
- WebSocket Support: Real-time communication using WebSockets.
## Setup
### Binary dependency
1. FFmpeg - Ensure FFmegg is installed in your system
2. Rabbitmq - Either run a local rabbitmq in a container or user cloudAMPQ services
3. pm2 for process management in production environment
```bash
npm install pm2@latest -g
```
### Development environment
To set up the development environment, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/abhiram-ar/aicademy-backend.git
cd aicademy-backend
```
2. Install the dependencies
```bash
npm install
```
3. Set up environment variables:
Create a .env file in the root directory and add the necessary environment variables as specified in the .env.example file.
4. Start the development server:
```bash
npm run dev-ts
```
## Contributing
We welcome contributions to the AIcademy Backend project. To contribute:
1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Make your changes and commit them with a clear message.
4. Push your changes to your fork.
5. Submit a pull request detailing your changes.
## License
This project is licensed under the MIT License.
## Misc
#### starting produnction server
```bash
pm2 start ecosystem.config.js
```
#### monitoring the deployemnet and process logs
```bash
pm2 monit
```
### Production changes,
- [ ] use 'best' model insted of nano for speech to text, which is 34% slower and cost almost 10x but provide better accuracy
- [ ] increase the concurront ai preprocessing by increasing prefetch of rabbitmq
- [ ] change file cleanup after processing video and audio to async
- [ ] user production collection for qdrant
- [ ] ws authication, change auth protorol to https in `authenticate client.ts`
- [ ] use single thread for video tanscodin in `transcodeVideo.ts`
- [ ] if the app is converted to microservice then, use full thread for transcoding the video and promisify transoding for each resolution
### Video processing pipeline

### reports - 10min video transcoding and ai preprocessing
- [ ] full-thread - 10500ms ~ 1.8min
- [ ] single thread with Promise.all - 33288ms ~ 5min
- [ ] single thread in sequence promise - 500795ms ~ 8min