{"id":26902748,"url":"https://github.com/ashedfox/lunari-movie-server","last_synced_at":"2025-10-29T08:06:40.313Z","repository":{"id":41249523,"uuid":"502400240","full_name":"AshedFox/lunari-movie-server","owner":"AshedFox","description":"Backend part of web-application for watching and discovering movies, built using NestJS","archived":false,"fork":false,"pushed_at":"2025-03-30T16:05:38.000Z","size":1399,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T16:30:24.690Z","etag":null,"topics":["backend","ffmpeg","graphql","nestjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AshedFox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-11T16:29:03.000Z","updated_at":"2025-03-30T15:57:09.000Z","dependencies_parsed_at":"2025-03-20T14:42:55.385Z","dependency_job_id":null,"html_url":"https://github.com/AshedFox/lunari-movie-server","commit_stats":null,"previous_names":["ashedfox/lunari-movie-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshedFox%2Flunari-movie-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshedFox%2Flunari-movie-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshedFox%2Flunari-movie-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshedFox%2Flunari-movie-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AshedFox","download_url":"https://codeload.github.com/AshedFox/lunari-movie-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620231,"owners_count":20806721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","ffmpeg","graphql","nestjs","typescript"],"created_at":"2025-04-01T09:53:32.913Z","updated_at":"2025-10-29T08:06:40.307Z","avatar_url":"https://github.com/AshedFox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lunari Movies\n\n## Description\n\nBackend part of Lunari Movies application for watching and discovering films and series made with [NestJS](https://nestjs.com/) and [GraphQL](https://graphql.org/).\n\nImplements payments with [Stripe](https://stripe.com/), video files optimization and splitting into fragments with [ffmpeg](https://www.ffmpeg.org/), custom Dataloader soultion (much more effective for many-to-many relations), token-based auth (access + refresh tokens) and powerful generation system for services, args and many other.\n\n\u003e Frontend repository: [lunari-movie-client](https://github.com/AshedFox/lunari-movie-client)\n\n## Tech Stack\n\n- [NestJS](https://nestjs.com/)\n- [GraphQL](https://graphql.org/)\n- [TypeORM](https://typeorm.io/)\n- [PostgreSQL](https://www.postgresql.org/)\n- [Redis](https://redis.io/)\n- [JWT](https://jwt.io/)\n- [FFmpeg](https://ffmpeg.org/)\n- [Stripe](https://stripe.com/)\n- [Google Cloud Storage](https://cloud.google.com/storage)\n\n## Features\n\n- Registration, authorization (access/refresh JWT), email confirmation.\n- Password reset and change.\n- User role model (admin, moderator, user).\n- CASL and guards to control access.\n- User profile with base information and avatar.\n- CRUD for films and series (including series hierarchy `series -\u003e season -\u003e episode`).\n- Access modes (public/private) and age restrictions for movies.\n- Random films and series selection.\n- Most popular movies selection with special formula, taking into account visits, reviews and bookmarks (each has different weight), and also time.\n- Various content metadata: genres, studios, conutries, persons with different roles, images of different types, trailers.\n- Movies reviews and rating.\n- Different movies watchlists (watched, bookmarked, favorite).\n- Video and audio tracks generation of different quality, resolution and language with ffmpeg.\n- DASH manifest generation.\n- Real-time generation progress monitoring.\n- System and user collections of movies, CRUD operations for them.\n- Collections reviews and rating.\n- Rooms for co-viewing movies with synchronization between participants.\n- Room playlist and invitations management.\n- Subscriptions and one-time movies purchases with Stripe.\n- Images processing with Sharp.\n- Google Cloud Storage integration for files storage.\n- Powerful generation system for GraphQL args: generate filters, sort and pagination with special factory funcitons and custom decorators. Support generated classes caching.\n- Rate limiting and throttling\n- Nested queries optimization with custom optimized DataLoader implementation.\n- CASL and guards to control access\n\n## Installation\n\n### Prerequisites\n\n- **Node.js 18+**\n- **[ffmpeg](https://www.ffmpeg.org/download.html)**\n\n### Setup\n\n1. Install dependencies\n\n```bash\n$ npm install\n```\n\n2. Run the app\n\n```bash\n# development\n$ npm run start\n```\n\n```bash\n# watch\n$ npm run start:dev\n```\n\n```bash\n# production\n$ npm run start:prod\n```\n\n## Video processing\n\n1. Generate video and audio track of different quality/resolution from original video\n   \n  | One language                                                                                                                     |  Multiple languages                                                                                                               |\n  |----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n  | \u003cimg src=\"https://github.com/user-attachments/assets/67488f2a-2b7d-4be6-b7fb-8d8f2135be11\" alt=\"drawing\" style=\"height:400px;\"/\u003e | \u003cimg src=\"https://github.com/user-attachments/assets/d967b013-cc91-4dbb-a5b1-6e9c36a2836a\" alt=\"drawing\" style=\"height:400px;\"/\u003e |\n\n2. Split each track into short fragments (max 4 seconds)\n\n\u003cimg src=\"https://github.com/user-attachments/assets/90ce0ae9-6d10-4bee-aadd-7375ce5c83dc\" alt=\"drawing\" style=\"height:400px;\"/\u003e\n\n3. Store information about tracks and their segmentation in dash manifest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashedfox%2Flunari-movie-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashedfox%2Flunari-movie-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashedfox%2Flunari-movie-server/lists"}