{"id":19184379,"url":"https://github.com/cryptosingh1337/vidflow-backend","last_synced_at":"2025-05-08T00:04:09.129Z","repository":{"id":112167111,"uuid":"408400696","full_name":"CryptoSingh1337/vidflow-backend","owner":"CryptoSingh1337","description":"VidFlow - An open source content sharing platform (similar to YouTube). This repository contains the backend code.","archived":false,"fork":false,"pushed_at":"2023-06-13T19:15:11.000Z","size":359,"stargazers_count":6,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T00:02:30.138Z","etag":null,"topics":["aws","azure","jwt","mongodb","mysql","redis","spring-boot","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","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/CryptoSingh1337.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,"zenodo":null}},"created_at":"2021-09-20T10:33:39.000Z","updated_at":"2023-10-26T13:59:56.000Z","dependencies_parsed_at":"2025-04-20T05:30:51.200Z","dependency_job_id":"d61068ba-941b-4664-bb1e-7a2f94fd1254","html_url":"https://github.com/CryptoSingh1337/vidflow-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoSingh1337%2Fvidflow-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoSingh1337%2Fvidflow-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoSingh1337%2Fvidflow-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoSingh1337%2Fvidflow-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CryptoSingh1337","download_url":"https://codeload.github.com/CryptoSingh1337/vidflow-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252973681,"owners_count":21834107,"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":["aws","azure","jwt","mongodb","mysql","redis","spring-boot","spring-security"],"created_at":"2024-11-09T11:06:56.694Z","updated_at":"2025-05-08T00:04:09.086Z","avatar_url":"https://github.com/CryptoSingh1337.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/CryptoSingh1337/vidflow-client/master/public/images/logo.svg\" align=\"right\" height=\"150\" width=\"132\" /\u003e\n\n# VidFlow\n\nAn open source content sharing platform (similar to YouTube).\n\nPreview: [https://www.youtube.com/watch?v=WJZyM-X8wAo](https://www.youtube.com/watch?v=WJZyM-X8wAo)\n\nFrontend repo: [https://github.com/CryptoSingh1337/vidflow-client](https://github.com/CryptoSingh1337/vidflow-client)\n\n[![Issues Closed](https://img.shields.io/github/issues-closed/CryptoSingh1337/vidflow-backend?color=red)](https://github.com/CryptoSingh1337/vidflow-backend/issues?q=is%3Aissue+is%3Aclosed)\n[![Issues Open](https://img.shields.io/github/issues/CryptoSingh1337/vidflow-backend?color=green)](https://github.com/CryptoSingh1337/vidflow-backend/issues)\n[![PRs Open](https://img.shields.io/github/issues-pr/CryptoSingh1337/vidflow-backend)](https://github.com/CryptoSingh1337/vidflow-backend/pulls)\n![Last Commit](https://img.shields.io/github/last-commit/CryptoSingh1337/vidflow-backend?color=informational)\n![PRs Welcome](https://img.shields.io/badge/prs-welcome-ff69b4)\n[![wakatime](https://wakatime.com/badge/github/CryptoSingh1337/vidflow-backend.svg)](https://wakatime.com/badge/github/CryptoSingh1337/vidflow-backend)\n\n## Features\n\n- JWT token based user authentication and authorization with refresh token.\n- Used pagination and sorting from server side.\n- Stores videos on Microsoft azure blob storage.\n- User can watch/explore videos without authentication and can upload video with the video metadata like title etc.\n- User can post, edit, delete his/her comment.\n- User can subscribe/unsubscribe to a channel and will receive notifications for videos (if subscribed).\n- User can like/dislike, share a video (copies link to the clipboard).\n- Increase views asynchronously if the user watch that video.\n\n## Data model\n\n![application-model](https://user-images.githubusercontent.com/56120837/150513856-e0672393-8aa2-44d2-a3a8-d134633c3e2b.png)\n\n## Application architecture\n![vidflow-architecture](https://user-images.githubusercontent.com/56120837/150522748-c66c8c7d-4f24-4688-b904-b6db06605016.png)\n\n## Screenshots\n\n#### Light theme\n![light-theme](https://user-images.githubusercontent.com/56120837/150553448-6b781bd1-2930-4216-987b-b3ebb4eee510.png)\n\n#### Landing page\n![landing-page](https://user-images.githubusercontent.com/56120837/150551742-b3b301d4-cf4c-4e76-93cd-761ec5552754.png)\n\n#### Landing page after login\n![landing-page-after-login](https://user-images.githubusercontent.com/56120837/150552598-4ae46998-0a09-47a0-9a11-872f863df4b3.png)\n\n#### Login/Signup page\n![login/signup](https://user-images.githubusercontent.com/56120837/150552011-d01bd689-8650-41d8-9469-1406588fee4a.png)\n\n#### Signup page\n![signup](https://user-images.githubusercontent.com/56120837/150552140-82195317-2b7c-47e7-b28b-fd3fef448526.png)\n\n#### Watch video page\n![watch-video-page](https://user-images.githubusercontent.com/56120837/150552312-c842c44f-c138-4148-b36a-6bd1d6722dbf.png)\n\n#### Video footer section\n![video-footer-section](https://user-images.githubusercontent.com/56120837/150552469-ca3800ea-7994-49a1-8597-c32a5792bfbc.png)\n\n#### Upload video page\n\n##### Upload video\n![upload-video-page](https://user-images.githubusercontent.com/56120837/150553809-e20d26d2-a774-4bcb-b23a-0688dde4a62b.png)\n\n##### Add video metadata\n![image](https://user-images.githubusercontent.com/56120837/150554236-2252ec9e-8afe-4dbc-b4d3-076283d48e91.png)\n\n#### Channel page\n![channel-page](https://user-images.githubusercontent.com/56120837/150552750-6d3247a6-7e6c-45c9-acb4-14e944bf3d67.png)\n\n#### History page\n![history-page](https://user-images.githubusercontent.com/56120837/150552900-db191775-59a0-4593-b548-a0ed7a1abd85.png)\n\n#### Search page\n![search-page](https://user-images.githubusercontent.com/56120837/150553052-e9112771-5267-45d1-8ad1-6b909acb12d7.png)\n\n#### Your videos page\n![your-videos-page](https://user-images.githubusercontent.com/56120837/150553232-33232171-8389-4d03-878c-58f7390ec4f5.png)\n\n## TODO\n\n- [x] Like/dislike video functionality.\n- [ ] Forgot password via email.\n- [ ] Notifications functionality using redis as data store.\n- [ ] Clear watch history after 21 days using Scheduling Tasks.\n\n## Environment variables\n\nDevelopment environment:\n```bash\nAZURE_STORAGE_CONNECTION_STRING\nBLOB_CONTAINER_NAME\nS3_ACCESS_KEY\nS3_SECRET_KEY\nCLOUD_FRONT_BASE_URL\nAZURE_CDN_BASE_URL\n```\n\nProduction environment:\n```bash\nJWT_ACCESS_TOKEN_SECRET\nJWT_REFRESH_TOKEN_SECRET\nMONGO_URI\nAZURE_STORAGE_CONNECTION_STRING\nBLOB_CONTAINER_NAME\nS3_ACCESS_KEY\nS3_SECRET_KEY\nCLOUD_FRONT_BASE_URL\nAZURE_CDN_BASE_URL\n```\n\n## Run Locally\n\nClone the project\n\n```bash\n  git clone https://github.com/CryptoSingh1337/vidflow-backend.git\n```\n\nGo to the project directory\n\n```bash\n  cd vidflow-backend\n```\n\nRun verfiy goal\n\n```bash\n  ./mvnw clean verify\n```\n\nRun Spring Boot application (default port: 8080 or mentioned in `application.properties`)\n\n```bash\n  ./mvnw spring-boot:run\n```\n\n## AWS setup\n1. Create a ec2 instance.\n2. Add the following inbound rules in the security group:\n\n| Type       | Protocol | Port  | Source    |\n|------------|----------|-------|-----------|\n| Custom TCP | TCP      | 27017 | 0.0.0.0/0 |\n| HTTP       | TCP      | 80    | 0.0.0.0/0 |\n| HTTPS      | TCP      | 443   | 0.0.0.0/0 |\n\n3. Create a target group with the following configuration:\n\n| Config                | Value       |\n|-----------------------|-------------|\n| Target type           | Instances   |\n| Target group name     | vidflow     |\n| Protocol              | HTTP        |\n| Port                  | 80          |\n| Protocol version      | HTTP1       |\n| Health check protocol | HTTP        |\n| Health check path     | /index.html |\n\n4. Register target and select the ec2 instance.\n5. Request Certificate in Certificate manager and add the provided record in the advance DNS setting.\n6. Create a load balancer with following configuration:\n\n| Config             | Value            |\n|--------------------|------------------|\n| Load balancer type | Application      |\n| Load balancer name | vidflow          |\n| Scheme             | Internet-facing  |\n| IP address type    | IPv4             |\n\n7. In Route 53, create a hosted zone with the domain name.\n8. Change the default name server with the aws name server in the domain name provider portal.\n9. Create the following records:\n\n| Record name       |  Type  | Routing | Value                    |\n|-------------------|:------:|---------|--------------------------|\n| [domain-name]     |   A    | Simple  | [load-balancer-dns-name] |\n| www.[domain-name] | CNAME  | Simple  | [domain-name]            |\n\n10. Create a bucket with default configuration with the name `vidflow`.\n11. Create a cloudfront distribution with the following configuration:\n\n| Config                  | Value                  |\n|-------------------------|------------------------|\n| Origin domain           | Amazon s3              |\n| Enable Origin shield    | No                     |\n| Viewer protocol policy  | Redirect HTTP to HTTPS |\n| Allowed HTTP methods    | GET, HEAD              |\n| Restrict viewer access  | No                     |\n\n## Azure setup\n\nCreate a microsoft storage account and copy the connection string.\n\n## Tech Stack\n\n- **Client**:\n  - Typescript\n  - Nuxt\n  - Vuetify\n  - **Deployment**:\n    - Vercel\n    - AWS\n\n- **Server**:\n  - Java\n  - Spring Boot\n  - Spring Data Mongo\n  - Spring Data Redis\n  - Spring Security\n  - Microsoft Azure Blob Storage\n  - AWS Simple Storage Service\n  - **Deployment**:\n    - AWS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptosingh1337%2Fvidflow-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptosingh1337%2Fvidflow-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptosingh1337%2Fvidflow-backend/lists"}