/ytcc

Primary LanguageVue

YTCC - YouTube Closed Caption Tool

YTCC is a project aiming to be an online collaboratable closed caption editing tool for YouTube videos.

The ultimate goal of this project is to let people understand videos and alike from all over the world, stimulating "culture cross-pollination".

Architecture

image

How To Build & Run (Ubuntu)

First Build

  1. Create Google Oauth Client Credentials. For details see here.
  2. Install MongoDB Community Edition and create an admin user. Please also see here or else you wouldn't be able to successfully create user.
  3. Create db/ directory at project root.
  4. Create .env file from the .env.example file, and replace the google client information you retrieved in step 1, and mongoDB username and password you setup in step 2.
  5. Go to both backend and frontend directory and yarn.

Run

  1. Run ./db-script.sh to run database.
  2. yarn dev in backend directory to run backend server.
  3. yarn dev in frontend directory to run frontend client. Or, you can build static files by yarn build and start static server by yarn start.

File Structure

  • old/: files from the old version
  • api/: common api type definition
  • spec/: yaml files of api and page design
  • .gitignore: files to be ignored by git
  • .env.example: example dotenv file
  • db-script.sh: script that starts mongoDB
  • vetur.config.js: this is to let VScode Vetur extension know where the frontend directory is located
  • frontend/: frontend, see frontend Readme.md
  • backend/: backend
    • src/: code directory
      • server.ts: entry point
      • middleware.ts: authentication middleware
      • route/: routes
      • schema/: Mongoose Schemas
      • util/: utility functions

Appendix

Flow of Google OAuth Login

image