https://visoundayserver.azurewebsites.net/
- Tech Stack
- Schema DB
- API
- How to Run the Application
- Use Database Azure Cosmos DB for MongoDB
- Node.js + Express
- Mongoose ORM
- Open AI
- Firebase Authentication for Microsoft Login
- Json Web Token
- Canvas
- ffmpeg
- Multer
- Cloudinary for Video Indexer
- Axios
For more detail check on
package.json
- name: Stores the user's name.
- email: Stores the user's email address, validated to ensure it matches a standard email format.
- provider: Indicates how the user is authenticated or registered (e.g., Google, Facebook).
- videos: An array of video IDs (
ObjectId
), referencing videos uploaded by the user.
Both schemas include:
- timestamps: Automatically adds
createdAt
andupdatedAt
fields to track document creation and updates. - versionKey: Prevents adding a
__v
field to track document versions.
- user: References a user by their unique ID (
ObjectId
), linked to the 'User' model. - cloudinaryId: Stores the ID associated with the video file on Cloudinary (a cloud-based media management platform).
- url: Stores the URL where the video can be accessed.
- description: Optional field for a text description of the video.
- gpt: Stores a string related to GPT (likely output from a GPT model).
- tags: An array of strings representing tags associated with the video.
- gptChats: An array of objects containing role, content, and type, likely representing chat data from a GPT model.
- cover: Stores a URL for the cover image of the video.
- tagImages: An array of objects containing keyword and URLs, likely representing images associated with specific tags.
- frames: An array of objects containing img_url, id, and text, likely representing frames or segments within the video.
- bingStatus: Boolean field indicating the status of something related to Bing (Microsoft's search engine), defaulting to false.
- These schemas are defined using Mongoose, a library for MongoDB and Node.js, facilitating schema creation and model definition.
- They establish the structure for documents stored in MongoDB collections, with relationships (
ref
fields) defined betweenUser
andVideo
models for querying and population purposes.
Short explanation of visounday server API.
Method | Routes | Auth | Authz | Header | Body | Response | Description |
---|---|---|---|---|---|---|---|
POST | /verify | Token from the client obtained through Microsoft Social Login. | Acces Token | To get access token from Visounday Server. | |||
GET | /videos | ✅ | Access Token | List of Videos | Get list videos for logged user. | ||
POST | /videos | ✅ | Access Token | Url of video and video id (from cloudinary unique name) | Data Video | Generate collage cover photo, video indexer tag, framing video and computer vision. Response is schema Video. | |
GET | /videos/:id | ✅ | ✅ | Access Token | Data Video | Get data video by id. | |
POST | /videos/:id/gpt | ✅ | ✅ | Access Token | Content : message as input to gpt from user | gptChats | Interact with GPT-4. |
You need serviceAccountKey.json for Microsoft Social Login from Firebase
Use Docker & Create .envbased
.env.template`
OR
Run code manually with node version 22.2.0
- Create
.env
based.env.template
- Navigate terminal to this folder
- Install package
npm install
- Run application
npm run dev
- Open localhost