Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

ElBartt/YTC_Back

Repository files navigation

YTC [Discontinued]

Danger

Moved to a Mono Repo with the front : YTC_MonoRepo

This repo is now archived, no more work will be done on it


License: CC BY-NC 4.0 test

Statements Branches Functions Lines

Table of contents

Introduction

This is the backend of the YTC project, it's a REST API made with NodeJS, Express and Typescript. The goal of this api is to provide a way to manage (see and edit) comments of your channels. The main feature is to flag comments according to multiple criteria (like toxicity, spam, feedback, etc...)

How to start :

create a .env file at folder root, copy and replace that

# DB 
DB_HOST = 'REPLACE-ME'
DB_NAME = 'REPLACE-ME'
DB_USER = 'REPLACE-ME'
DB_PASSWORD = 'REPLACE-ME'

# Youtube API 
YT_API_KEY = 'REPLACE-ME'

# OpenAI
OAI_API_KEY = 'REPLACE-ME'
OAI_ORG_ID = 'REPLACE-ME'

Get Api keys here :

Create the database :

Run the YTC.sql on your favorite DB administration tool

Generate an API key for the project :

run the ./apikey/generate.py script to generate an API key for the project (You will have to install python3 and the pyperclip package)

then add the generated key to the database apikey table, with as a name your pseudo

Start the project :

npm install

npm start

Testing API :

Go on localhost, click on authorize and paste the generated API key

Then you can try out the differents routes

Architecture :

.
├── .husky/
│   ├── _/
│   └── pre-commit
├── docs/
│   └── swagger.json
├── src/
│   ├── configs/
│   ├── controllers/
│   ├── database/
│   ├── middlewares/
│   ├── models/
│   ├── routes/
│   ├── services/
│   ├── types/
│   ├── app.ts
│   └── server.ts
├── tests/
│   ├── configs/
│   ├── controllers/
│   ├── database/
│   ├── middleware/
│   ├── models/
│   ├── routes/
│   ├── services/
│   ├── types/
│   └── setupTests.ts
├── utils/
│   ├── apikey/
│   └── architecture/
├── .env
├── .gitignore
├── LICENSE
├── README-DEV.md
├── README.md
├── YTC.sql
├── package-lock.json
├── package.json
└── tsconfig.json

About

Get Youtube comments for a specific video and put it into a database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors