This repository contains Vue.js frontend and Express.js backend for DevTube.
Install Yarn:
npm install -g yarnInstall Google Cloud SDK:
brew cask install google-cloud-sdkDevTube uses Firebase for OAuth authentication. For now, Google, Twitter, and GitHub providers are supported. For development purposes, it's enough to configure GitHub provider.
- Create a new GitHub OAuth app. GitHub will ask you to provide Authorization callback URL.
- Create a new Firebase account.
- Go to Authentication and enable GitHub sign-in. Copy Authorization callback URL.
- Go to Github and finalize app creation by providing Authorization callback URL.
- Copy Client ID and Client Secret.
- Go to Firebase and provide those values.
DevTube stores your subscriptions, favorites, and watched videos in Firestore.
- Open your Firebase account
- Ceate a new Firestore database
- Provide the following database permissions:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
- Open your Firebase account
- Generate a new private key under Service accounts panel
- Store downloaded credentials under
devtube-web/express/firebase.json. - Create
devtube-web/firebase.config.jsonfile with and populate it with the content:
{
"projectId": "<firebase projectId>",
"apiKey": "<firebase apiKey>",
"authDomain": "<firebase projectId>.firebaseapp.com",
"databaseURL": "https://<firebase projectId>.firebaseio.com"
}DevTube data lives in Cloud Datastore. Download and unzip the following test data:
curl --create-dirs -f -o express/data/index-new.json https://storage.googleapis.com/dev-tube-index/index-test-new.json
curl --create-dirs -f -o express/data/data-test-new.zip https://storage.googleapis.com/dev-tube-index/data-test-new.zip
unzip express/data/data-test-new.zip -d "express/data/videos"# run emulator
gcloud beta emulators datastore start --project=dev-tube
# point environment variables to the emulator
$(gcloud beta emulators datastore env-init)
# populate Datastore Emulator
# From ./express directory run:
yarn
yarn run datastore-initYou need to run backend first, because frontend relies on it.
# From ./express directory run:
yarn && yarn dev# from project root directory, run:
yarn && yarn dev🚀 DevTube front-end is now running on localhost:8080
Before submitting PR, check the code for violations:
yarn lintYou can contribute channels and speakers in watch-devtube/contrib repo.