Skip to content

Vishesh-Paliwal/VideoVerse-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABOUT THE PROJECT :

This repo contains backend for VideoVerse .

Functionalities Supporeted are :

  • All API calls are authenticated

  • Allows user to upload videos with configurable limits of size and duration

  • Allow trimming a video

  • Allow merging video clips

  • Allow link sharing with time based expiry (customizable)

Tech Stack :

  • Node and express for backend

  • sqlite for database

  • fluent-ffmpeg for video processing

  • jest for unit testing

SET-UP GUIDE FOR VideoVerse-Backend

  • Requirements :

    IDE

    NODE

    NPM

STEP 1 :

  • Fork and Clone the repo in your disered location
  • open it in the IDE of your choice
  • run npm install
  • now run node server.js to start server at localhost:3000

Screenshot from 2024-07-15 14-28-25

STEP 2:

  • Generate a token to be able to use api , it is valid for 200 h (set by default to make it serve like static token , you may change it as per your need)

  • run this to generate token :

    curl -X POST http://localhost:3000/auth/login -H "Content-Type: application/json" -d '{"username":"admin", "password":"password"}'
    

STEP 3:

  • Now for all the api calls add header to them :

        Authorization : Your generated token
    

Upload Video :

Post request at http://localhost:3000/upload

Body : form -data , (key : video , value: select video)

Screenshot from 2024-07-15 15-13-58

Merge Video :

Post request at http://localhost:3000/merge

Additional Header : Content-Type : application/json

Body : { "videoIds": [1, 2] }

Screenshot from 2024-07-15 15-32-45

Trim Video :

Post request at http://localhost:3000/trim

Additional Header : Content-Type : application/json

Body :{ "videoId" : 1, "startTime":3, "endTime":10 }

Screenshot from 2024-07-15 15-47-51

Share Video Link Generation:

Post request at http://localhost:3000/share/generate

Additional Header : Content-Type : application/json

Body :{ "videoId": 1, "expiryHours": 24 }

Screenshot from 2024-07-15 15-52-46

NOW YOU CAN ACCESS VIDEO BY LINK PROVIDE :

Screenshot from 2024-07-15 15-56-32

YOU CAN RUN ALL TESTS USING :

    npm test

Screenshot from 2024-07-15 14-46-42

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published