An open source content sharing platform (similar to YouTube).
Preview: https://www.youtube.com/watch?v=WJZyM-X8wAo
Frontend repo: https://github.com/CryptoSingh1337/vidflow-client
- JWT token based user authentication and authorization with refresh token.
- Used pagination and sorting from server side.
- Stores videos on Microsoft azure blob storage.
- User can watch/explore videos without authentication and can upload video with the video metadata like title etc.
- User can post, edit, delete his/her comment.
- User can subscribe/unsubscribe to a channel and will receive notifications for videos (if subscribed).
- User can like/dislike, share a video (copies link to the clipboard).
- Increase views asynchronously if the user watch that video.
- Like/dislike video functionality.
- Forgot password via email.
- Notifications functionality using redis as data store.
- Clear watch history after 21 days using Scheduling Tasks.
Development environment:
AZURE_STORAGE_CONNECTION_STRING
BLOB_CONTAINER_NAME
S3_ACCESS_KEY
S3_SECRET_KEY
CLOUD_FRONT_BASE_URL
AZURE_CDN_BASE_URL
Production environment:
JWT_ACCESS_TOKEN_SECRET
JWT_REFRESH_TOKEN_SECRET
MONGO_URI
AZURE_STORAGE_CONNECTION_STRING
BLOB_CONTAINER_NAME
S3_ACCESS_KEY
S3_SECRET_KEY
CLOUD_FRONT_BASE_URL
AZURE_CDN_BASE_URL
Clone the project
git clone https://github.com/CryptoSingh1337/vidflow-backend.git
Go to the project directory
cd vidflow-backend
Run verfiy goal
./mvnw clean verify
Run Spring Boot application (default port: 8080 or mentioned in application.properties
)
./mvnw spring-boot:run
- Create a ec2 instance.
- Add the following inbound rules in the security group:
Type | Protocol | Port | Source |
---|---|---|---|
Custom TCP | TCP | 27017 | 0.0.0.0/0 |
HTTP | TCP | 80 | 0.0.0.0/0 |
HTTPS | TCP | 443 | 0.0.0.0/0 |
- Create a target group with the following configuration:
Config | Value |
---|---|
Target type | Instances |
Target group name | vidflow |
Protocol | HTTP |
Port | 80 |
Protocol version | HTTP1 |
Health check protocol | HTTP |
Health check path | /index.html |
- Register target and select the ec2 instance.
- Request Certificate in Certificate manager and add the provided record in the advance DNS setting.
- Create a load balancer with following configuration:
Config | Value |
---|---|
Load balancer type | Application |
Load balancer name | vidflow |
Scheme | Internet-facing |
IP address type | IPv4 |
- In Route 53, create a hosted zone with the domain name.
- Change the default name server with the aws name server in the domain name provider portal.
- Create the following records:
Record name | Type | Routing | Value |
---|---|---|---|
[domain-name] | A | Simple | [load-balancer-dns-name] |
www.[domain-name] | CNAME | Simple | [domain-name] |
- Create a bucket with default configuration with the name
vidflow
. - Create a cloudfront distribution with the following configuration:
Config | Value |
---|---|
Origin domain | Amazon s3 |
Enable Origin shield | No |
Viewer protocol policy | Redirect HTTP to HTTPS |
Allowed HTTP methods | GET, HEAD |
Restrict viewer access | No |
Create a microsoft storage account and copy the connection string.
-
Client:
- Typescript
- Nuxt
- Vuetify
- Deployment:
- Vercel
- AWS
-
Server:
- Java
- Spring Boot
- Spring Data Mongo
- Spring Data Redis
- Spring Security
- Microsoft Azure Blob Storage
- AWS Simple Storage Service
- Deployment:
- AWS