Academun is a large-scale LMS and video streaming platform stabilized through production server recovery, Docker and Nginx deployment, FFmpeg optimization, HLS media fixes, and infrastructure security hardening.
Academun is a large-scale LMS and video streaming platform built with NestJS, Next.js, PostgreSQL, and HLS-based media delivery.
The project focused on rescuing and stabilizing an existing production environment affected by server instability, deployment issues, slow video processing, HLS path mismatches, infrastructure configuration problems, and security gaps.
The primary engineering challenge was recovering the platform without compromising existing media, database records, or active production services.
Video-heavy LMS platforms introduce additional infrastructure complexity compared with standard web applications.
The application backend, frontend, media services, processing workers, PostgreSQL database, HLS files, FFmpeg pipeline, reverse proxy, and production server must operate as a coordinated system.
An unsafe deployment or server rebuild can make existing course videos inaccessible, break database media references, disrupt HLS playback, or introduce production downtime.
Academun required a controlled recovery strategy capable of rebuilding infrastructure, protecting existing media, correcting application data, improving video processing, and restoring reliable production services.
The recovery process began with an audit of the existing server architecture, Docker configuration, media storage, deployment workflows, and application services.
The infrastructure was rebuilt on a fresh Linux environment with Docker, Docker Compose, PM2, and Nginx.
NestJS backend services, the Next.js frontend, media APIs, and processing workers were deployed as separate application components and connected to the existing PostgreSQL infrastructure.
The recovery strategy prioritized media protection, controlled database changes, infrastructure security, and production verification throughout the deployment process.
The existing infrastructure required a controlled rebuild to restore application stability.
The recovery process included:
The infrastructure was structured to provide clearer separation between application components and improve deployment management.
The original video processing pipeline required processing times close to the duration of the source video.
The FFmpeg workflow was optimized by reducing dependency on remote storage during processing, introducing local buffering, and tuning CPU execution.
This improved processing efficiency and created a more reliable workflow for handling video conversion and HLS generation.
HLS media delivery required careful handling because existing video files and database records needed to remain synchronized.
The recovery process included:
These changes restored consistency between stored media, application records, and video delivery paths.
Existing database records contained video and storage references that required correction during the infrastructure recovery.
Media files were cross-checked against PostgreSQL records before updating affected paths.
This process reduced the risk of breaking existing course content while migrating and restoring application services.
The platform architecture includes NestJS backend services and a Next.js frontend.
The deployment process restored communication between application services, media infrastructure, processing workers, and the remote PostgreSQL database.
Production health checks were performed to verify API availability and application service status after deployment.
Docker and Docker Compose were configured to manage application services and deployment environments.
Nginx was configured as the production reverse proxy for routing traffic between the frontend, backend APIs, and supporting services.
The deployment architecture provided a more structured foundation for managing the platform's production components.
Security improvements were applied as part of the production recovery process.
The work included:
These changes addressed security gaps discovered during the infrastructure audit and server recovery.
After deployment, application services and infrastructure components were verified through production health checks.
The verification process covered API availability, backend services, frontend deployment, media infrastructure, database connectivity, and processing workers.
NestJS, Node.js, TypeScript, PostgreSQL, Next.js, Docker, Docker Compose, Nginx, PM2, FFmpeg, HLS, Linux VPS
Academun's production infrastructure was stabilized through a controlled server rebuild, application redeployment, FFmpeg pipeline optimization, HLS path recovery, database media corrections, and infrastructure security hardening.
The resulting architecture restored reliable backend and frontend deployment, improved the video processing workflow, corrected media delivery issues, and provided a more stable infrastructure foundation for the LMS platform.