Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
git add .
git commit -m "feat(cselectives/staging): update image"
git push -u origin update/unilectives-staging/${{ github.sha }}
gh pr create --title "feat(cselectives/staging): update image" --body "Updates the image for the cselectives v2 (staging) deployment to commit csesoc/cselectives-v2@${{ github.sha }}." > URL
gh pr create -B develop --title "feat(cselectives/staging): update image" --body "Updates the image for the cselectives v2 (staging) deployment to commit csesoc/cselectives-v2@${{ github.sha }}." > URL
gh pr merge $(cat URL) --squash -d
deploy-prod:
name: Deploy Production (CD)
Expand Down Expand Up @@ -106,5 +106,5 @@ jobs:
git add .
git commit -m "feat(unilectives/prod): update image"
git push -u origin update/unilectives-prod/${{ github.sha }}
gh pr create --base develop --title "feat(unilectives/prod): update image" --body "Updates the image for the unilectives v2 (prod) deployment to commit csesoc/cselectives-v2@${{ github.sha }}." > URL
gh pr create -B develop --title "feat(unilectives/prod): update image" --body "Updates the image for the unilectives v2 (prod) deployment to commit csesoc/cselectives-v2@${{ github.sha }}." > URL
gh pr merge $(cat URL) --squash -d
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tmp/
temp/
dist/
coverage/
.DS_Store
.DS_Store
data/
177 changes: 165 additions & 12 deletions backend/package-lock.json

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

8 changes: 5 additions & 3 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"format": "prettier '**/*.ts' --write",
"build": "tsc",
"start": "npx prisma migrate deploy && node dist/src/index.js",
"dev": "NODE_ENV=dev tsx src/index.ts",
"dev": "NODE_ENV=dev & tsx src/index.ts",
"dev:watch": "NODE_ENV=dev tsx watch src/index.ts",
"test": "jest --coverage --verbose"
},
Expand All @@ -16,6 +16,7 @@
"cors": "^2.8.5",
"envsafe": "^2.0.3",
"express": "^4.18.2",
"fs": "^0.0.1-security",
"ioredis": "^5.3.2",
"jsonwebtoken": "^9.0.1",
"node-fetch": "^3.3.2",
Expand All @@ -30,7 +31,7 @@
"@types/express": "4.17.17",
"@types/jest": "29.5.3",
"@types/jsonwebtoken": "9.0.2",
"@types/node": "20.4.2",
"@types/node": "^20.14.10",
"@types/swagger-ui-express": "^4.1.3",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
Expand All @@ -41,7 +42,8 @@
"prettier": "3.2.5",
"prisma": "^5.0.0",
"ts-jest": "29.1.1",
"ts-node": "^10.9.2",
"tsx": "^3.12.7",
"typescript": "^5.1.6"
"typescript": "^5.5.3"
}
}
3 changes: 3 additions & 0 deletions backend/prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "reviews_scraped" (
"review_scraped_id" UUID NOT NULL DEFAULT gen_random_uuid(),
"source" TEXT NOT NULL,
"source_id" INTEGER NOT NULL,
"course_code" TEXT NOT NULL,
"author_name" TEXT NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT,
"term_taken" TEXT NOT NULL,
"created_timestamp" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"upvotes" TEXT[],
"overall_rating" DOUBLE PRECISION NOT NULL,

CONSTRAINT "pk_review_scraped_id" PRIMARY KEY ("review_scraped_id")
);

-- AddForeignKey
ALTER TABLE "reviews_scraped" ADD CONSTRAINT "fk_course_code" FOREIGN KEY ("course_code") REFERENCES "courses"("course_code") ON DELETE NO ACTION ON UPDATE NO ACTION;
Loading