Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented updates for backend usage #4

Merged
merged 35 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
97a926b
Added Icons
tsundDEV Nov 14, 2022
82126f1
fix: [backend/single-instance] Backend improvements
Nov 14, 2022
e4f1191
feat: Added Chakra | Added Theme | Added Layout
tsundDEV Nov 14, 2022
f019190
dev: [backend/single-instance] Updates for Python script
Nov 14, 2022
4c2314d
FEAT: navbar UPDATED: landing page
ceriddenn Nov 15, 2022
279fc11
feat: upload page added addded a few other things
ceriddenn Nov 15, 2022
fb793d2
feat: Added Footer + Responsive Nav + Home Hero x2
tsundDEV Nov 15, 2022
91f5c76
Merge !ceri additition to @tsunddev additions in branch 'web'
tsundDEV Nov 15, 2022
10c0006
fix: Added links to nav and index, upload page linting and background…
tsundDEV Nov 15, 2022
42b6adf
fix/clean: upload page removed unused
tsundDEV Nov 15, 2022
13e5492
feat: implementing next-auth
ceriddenn Nov 15, 2022
e026d54
fix: app.tsx
ceriddenn Nov 15, 2022
773a4f8
chore: clean up
tsundDEV Nov 15, 2022
2982c73
feat: Upload redone | Global Context | Enabled Main feat
tsundDEV Nov 15, 2022
2f54aa2
feat:Added avatarUrl support
ceriddenn Nov 15, 2022
edad9c5
feat:Added avatarUrl support
ceriddenn Nov 15, 2022
a3f79e6
feat: Merged sort
tsundDEV Nov 15, 2022
ab857c1
Created merge
tsundDEV Nov 15, 2022
4cd8273
Fixed Unsolved Merge
tsundDEV Nov 15, 2022
745a441
fix: linting
tsundDEV Nov 15, 2022
7fcec45
feat: [backend/single-instance] Improvements for createFootage logic
Nov 15, 2022
79f7b69
chore: [backend/single-instance] Merge in master
Nov 15, 2022
cc00f6d
chore: [backend/single-instance] Merge in web branch changes
Nov 15, 2022
61f7a06
ci: [backend/single-instance] Implement CODEOWNERS
Nov 15, 2022
da38d2b
chore: [backend/single-instance] CODEOWNERS & prettier clean up
Nov 15, 2022
aa9f06c
chore: [backend/single-instance] EOF clean up
Nov 15, 2022
f97f7b4
fix: [backend/single-instance] Observation improvements
Nov 15, 2022
685b13f
Update packages/eslint-config-custom/package.json
Huskydog9988 Nov 15, 2022
3d829d6
Update packages/tsconfig/package.json
Huskydog9988 Nov 15, 2022
08a5217
Update packages/ui/package.json
Huskydog9988 Nov 15, 2022
8664eaf
chore: some opinionated vscode settings
Huskydog9988 Nov 16, 2022
e1d3700
chore: some recommended vscode extensions
Huskydog9988 Nov 16, 2022
0a4b5d9
chore: add editorconfig
Huskydog9988 Nov 16, 2022
bad243f
Merge pull request #5 from waldo-vision/feat/dx
Huskydog9988 Nov 16, 2022
441afbc
Merge branch 'master' into backend/single-instance
Nov 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Back end application to process videos based on YouTube URL for AI/ML model usage.",
"scripts": {
"db": "docker compose up",
"dev": "NODE_ENV=dev ts-node-dev --respawn --pretty --transpile-only src/index.ts",
"start": "NODE_ENV=production ts-node dist/index.js",
"dev": "cross-env NODE_ENV=dev ts-node-dev --respawn --pretty --transpile-only src/index.ts",
"start": "cross-env NODE_ENV=production ts-node dist/index.js",
"build": "tsc",
"lint": "eslint src/**/*.{ts,tsx}",
"lint:fix": "eslint src/**/*.{ts,tsx} --fix"
Expand Down Expand Up @@ -36,6 +36,7 @@
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"typescript": "^4.8.4",
"swagger-ui-express": "^4.6.0"
"swagger-ui-express": "^4.6.0",
"cross-env": "^7.0.3"
}
}
4 changes: 3 additions & 1 deletion apps/backend/src/controllers/footage.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ export const createFootage = defaultEndpointsFactory.build({
youtubeUrl: url,
};

Footage.create(footageInput);
// Create a Footage document in the mongoDB collection
await Footage.create(footageInput);

// Execute the parseClips method to gather killshot frames from footage video
parseClips(footageId, `${footageId}.mp4`);
Huskydog9988 marked this conversation as resolved.
Show resolved Hide resolved

return footageInput;
Expand Down
7 changes: 6 additions & 1 deletion apps/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ const openapi = new OpenAPI({
config: zodConfig,
version: '0.0.1',
title: 'Waldo Backend API Documentation',
serverUrl: 'http://localhost',
serverUrl: process.env.NODE_ENV === 'production' ? 'https://waldo.vision' : 'http://localhost',
});

openapi.addLicense({
name: 'Mozilla Public License 2.0',
url: 'https://www.mozilla.org/en-US/MPL/2.0/',
});

const { notFoundHandler } = attachRouting(zodConfig, APIRouter);
Expand Down
3 changes: 1 addition & 2 deletions apps/backend/src/services/clips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as fs from 'fs';
import * as fse from 'fs-extra';
import { v4 as uuidv4 } from 'uuid';
import { spawn } from 'child_process';

import { Footage } from '../models/footage.interface';

const newClipIds: Array<string> = [];
Expand Down Expand Up @@ -42,7 +41,7 @@ export function parseClips(uuid: string, video: string): void {
fs.mkdirSync('clips');
}

const pyPro = spawn('python3', ['autoClip.py', 'test-new.mp4', 'clips', '1']);
const pyPro = spawn('python3', ['autoClip.py', video, 'clips', '1']);

pyPro.on('exit', async () => {
const clipDirs = await getDirectories('clips');
Expand Down
4 changes: 0 additions & 4 deletions apps/web/additional.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
declare namespace NodeJS {
interface ProcessEnv {
DISCORD_CLIENT_ID: string;
}
}
declare namespace NodeJS {
interface ProcessEnv {
DISCORD_CLIENT_SECRET: string;
}
}
11 changes: 8 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
"@chakra-ui/react": "^2.4.0",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@types/node": "18.11.9",
"@types/react": "^18.0.22",
"@types/react-dom": "^18.0.7",
"@heroicons/react": "^2.0.13",
"install": "^0.13.0",
"next-auth": "^4.16.4",
"node-fetch": "^3.3.0",
"npm": "^9.1.1",
"eslint": "8.27.0",
"eslint-config-next": "13.0.0",
"framer-motion": "^7.6.6",
Expand All @@ -25,6 +27,9 @@
"typescript": "4.8.4"
},
"devDependencies": {
"@types/node": "18.11.9",
"@types/react": "^18.0.22",
"@types/react-dom": "^18.0.7",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*"
}
Expand Down
9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,5 @@
"engines": {
"node": ">=14.0.0"
},
"packageManager": "pnpm@7.15.0",
"dependencies": {
"@heroicons/react": "^2.0.13",
"install": "^0.13.0",
"next-auth": "^4.16.4",
"node-fetch": "^3.3.0",
"npm": "^9.1.1"
}
"packageManager": "pnpm@7.15.0"
}
2 changes: 1 addition & 1 deletion packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "eslint-config-custom",
"version": "0.0.0",
"main": "index.js",
"license": "MIT",
"license": "MDL",
Huskydog9988 marked this conversation as resolved.
Show resolved Hide resolved
"dependencies": {
"eslint": "^8.26.0",
"eslint-config-next": "13.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tsconfig",
"version": "0.0.0",
"private": true,
"license": "MIT",
"license": "MDL",
Huskydog9988 marked this conversation as resolved.
Show resolved Hide resolved
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"main": "./index.tsx",
"types": "./index.tsx",
"license": "MIT",
"license": "MDL",
Huskydog9988 marked this conversation as resolved.
Show resolved Hide resolved
"scripts": {
"lint": "eslint **/*.tsx*"
},
Expand Down
39 changes: 24 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"start": {
"dependsOn": ["^build"],
"cache": false,
"cache": true,
"env": ["PORT", "HOST", "DB_URL", "FS_LOCATION", "NODE_ENV"]
}
}
Expand Down