Draft
Consolidate database structure by removing duplicate category files#14
Conversation
create backend of catagory and services
add category data
migrate entire codebase from JavaScript to TypeScript
refactor: update Dockerfile to install TypeScript and run transpiled …
PR from main
Co-authored-by: indunil-k <161734455+indunil-k@users.noreply.github.com>
…ucture Co-authored-by: indunil-k <161734455+indunil-k@users.noreply.github.com>
Co-authored-by: indunil-k <161734455+indunil-k@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] since our DB is highly relational, it is good to keep one-centralized DB
Consolidate database structure by removing duplicate category files
Aug 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a centralized database approach by consolidating duplicate category-related files that were causing inconsistency in the codebase.
Problem
The repository contained duplicate category files with both correct spelling ("category") and incorrect spelling ("catagory"):
src/controllers/catagory.controller.ts(duplicate)src/services/catagory.service.ts(duplicate)src/routes/catagory.route.ts(duplicate)CATAGORY_API.md(misspelled filename)This violated the principle of having "one-centralized DB" as these duplicates could lead to:
Solution
Removed duplicate files:
Renamed documentation:
CATAGORY_API.md→CATEGORY_API.mdfor consistencyVerified centralization:
index.tscorrectly reference the consolidated category filesResult
The database structure is now properly centralized with:
Fixes #13.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
binaries.prisma.shnode scripts/postinstall.js(dns block)node /home/REDACTED/work/backend/backend/node_modules/.bin/prisma -v(dns block)node /home/REDACTED/work/backend/backend/node_modules/.bin/prisma generate(dns block)checkpoint.prisma.io/usr/local/bin/node /home/REDACTED/work/backend/backend/node_modules/prisma/build/child {"product":"prisma","version":"6.12.0","cli_install_type":"local","information":"","local_timestamp":"2025-08-16T16:40:33Z","project_hash":"cb50a275","cli_path":"/home/REDACTED/work/backend/backend/node_modules/.bin/prisma","cli_path_hash":"fdbaad87","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.4","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["postgresql"],"schema_preview_features":[],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-fdbaad87","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/backend/backend/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true}(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.