{"id":20173712,"url":"https://github.com/ericchw/s381f-project-gamedb","last_synced_at":"2025-06-11T18:39:09.291Z","repository":{"id":186639890,"uuid":"564979361","full_name":"ericchw/S381F-Project-GameDB","owner":"ericchw","description":"Score: 99/100","archived":false,"fork":false,"pushed_at":"2023-08-31T07:33:29.000Z","size":182,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T16:15:30.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericchw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-12T01:01:20.000Z","updated_at":"2023-08-29T01:47:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b6fe7fa-a8f5-4b3a-be8b-b4c4943cecb3","html_url":"https://github.com/ericchw/S381F-Project-GameDB","commit_stats":null,"previous_names":["ericchw/s381f-project-gamedb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchw%2FS381F-Project-GameDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchw%2FS381F-Project-GameDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchw%2FS381F-Project-GameDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchw%2FS381F-Project-GameDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericchw","download_url":"https://codeload.github.com/ericchw/S381F-Project-GameDB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241610978,"owners_count":19990505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T01:37:32.646Z","updated_at":"2025-03-03T04:43:57.608Z","avatar_url":"https://github.com/ericchw.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# COMPS-381F - Server-side Technologies And Cloud Computing (2022 Autumn) Project\r\n\r\n## Project Information\r\nProject name: GameDB \\\r\nGroup Number: 39\r\n| Student Name | SID |\r\n| ------------- | ------------- |\r\n| CHAN HOI WAI  | 12550928 |\r\n| YUEN HON KUEN | 12578476 |\r\n| LAI HO KWONG  | 12782125 |\r\n\r\n## Operation guides of server:\r\n* (a) Introduce how to test your Login/Logout pages\r\n* (b) Introduce how to test your CRUD services\r\n* (c) Provide HTTP request types? API? Path URL? Valid login information?\r\n* (d) `README.md` is important to let me know your project functions, which is crucial to mark the grade of your project.\r\n\r\n## TESTING ACCOUNT\r\nusername: admin\r\npassword: admin\r\n\r\n## Testing Instruction\r\n1. Visit http://43.198.225.47:8099/ by any browser.\r\n2. You should see a login panel. Enter the testing account username and the password to login in the system.\r\n3. After you login the system, there have a list show the game which been recorded. Click one of the game name can show you the details of the game.\r\n4. In the detail page, Edit and Delete buttons has shown at the top-left corner. Also, Back and Home buttons has shown at top-right corner. We can try to click the edit button first.\r\n5. After you press the edit button, server will redirect you to the editing panel. All data will be show at the text box. User can change any data by entering new information into the textbox. \r\n6. After you change the data, press Update. The page will send a update request to server. If your request successfully handled by server, you will being redirect to the detail page of the game and the data you change will be updated.\r\n7. Press the Delete button to delete a game information. After you deleted the data, you will see the game counter reduced one and the game record being deleted.\r\n8. Click the Create new game data button, it will let you add a new game record.\r\n9. Fill in the required field and click Create. You will see the detail page that the record you create.\r\n10. Press the home button. You will see the game counter updated and the game list showing you record.\r\n11. Press logout button. You will return to the login panel.\r\n\r\n## API\r\nWe have provided few api to do the CRUD process. And we suggest to use some API testing tools like postman to test the api. Using curl may occur some error that unexpected.\r\n\r\nAuth\r\nLogin\r\npost /api/login \r\nTesting Data: {\"username\": \"admin\", \"password\":\"admin\"}\r\nSample Usage: \r\ncurl -X POST localhost:8099/api/login -H \"Content-Type: application/json\" -d '{\"username\": \"admin\", \"password\":\"admin\"}'\r\nExpect Result:\r\n{\r\n    \"message\": \"Success\"\r\n}\r\n\r\nLogout\r\nget /api/Logout\r\nSample Usage: \r\ncurl localhost:8099/api/logout\r\nExpect Result:\r\n{\r\n    \"message\": \"Logged Out\"\r\n}\r\n\r\nCreate\r\npost /api/inventory/create\r\nSample Usage:\r\ncurl -X POST -H \"Content-Type: application/json\" --data '{\r\n    \"name\": \"Grand Theft Auto V\",\r\n    \"type\": \"Game\",\r\n    \"description\": \"Grand Theft Auto V for PC offers players the option to explore the award-winning world of Los Santos and Blaine County in resolutions of up to 4k and beyond, as well as the chance to experience the game running at 60 frames per second.\",\r\n    \"developer\": \"Rockstar North\",\r\n    \"publisher\": \"Rockstar Games\",\r\n    \"os\": {\r\n        \"windows\": true,\r\n        \"macos\": false,\r\n        \"linux\": false\r\n    },\r\n    \"releaseDateAt\": \"2015-04-13T23:00:00.000Z\",\r\n    \"lastUpdateAt\": \"2022-11-11T17:32:57.000Z\",\r\n    \"lastUpdateBy\": \"admin\",\r\n    \"photo\": null,\r\n    \"photo_mimetype\": null\r\n}' http://s381f-project-gamedb.herokuapp.com/api/create\r\n\r\n\r\nGet List\r\nget /api/inventory/list\r\nSample Usage:\r\ncurl localhost:8099/api/inventory/list\r\nExpect Result:\r\nReturn all data\r\n\r\nGet Record By Name\r\nget /api/inventory/name/:name \r\nTesting Data: Dota 2\r\nSample Usage:\r\ncurl localhost:8099/api/inventory/name/Dota%202\r\nExpect Result:\r\n[\r\n    {\r\n        \"_id\": \"6375f1bd7473690cb772cd37\",\r\n        \"name\": \"Dota 2\",\r\n        \"type\": \"Game\",\r\n        \"description\": \"Every day, millions of players worldwide enter battle as one of over a hundred Dota heroes. And no matter if it's their 10th hour of play or 1,000th, there's always something new to discover. With regular updates that ensure a constant evolution of gameplay, features, and heroes, Dota 2 has taken on a life of its own.\",\r\n        \"developer\": \"Valve\",\r\n        \"publisher\": \"Valve \",\r\n        \"os\": {\r\n            \"windows\": true,\r\n            \"macos\": true,\r\n            \"linux\": true\r\n        },\r\n        \"releaseDateAt\": \"2013-07-09T17:00:00.000Z\",\r\n        \"lastUpdateAt\": \"2022-11-18T17:59:49.053Z\",\r\n        \"lastUpdateBy\": \"admin\",\r\n        \"photo\": \r\n        \"photo_mimetype\": \"image/jpeg\"\r\n    }\r\n]\r\n\r\nGet Record By Type\r\nget /api/inventory/type/:type\r\nSample Usage: \r\ncurl localhost:8099/inventory/type/game\r\nExpect Result:\r\nListing all game which type is game\r\n\r\nUpdate Record\r\npost /api/inventory/edit/:id\r\nSample Usage:\r\ncurl -X POST -H \"Content-Type: application/json\" -d \r\n{\r\n      \"name\":\"Grand Theft Auto V\",\r\n      \"type\":\"Game\",\r\n      \"description\":\"Grand Theft Auto V for PC offers players the option to explore the award-winning world of Los Santos and Blaine County in resolutions of up to 4k and beyond, as well as the chance to experience the game running at 60 frames per second.\",\r\n      \"developer\":\"Rockstar North\",\r\n      \"publisher\":\"Rockstar Games\",\r\n      \"os\" : {\r\n         \"windows\" : true,\r\n         \"macos\" : false,\r\n         \"linux\" : false\r\n      },\r\n      \"releaseDateAt\":\"2015-04-13T23:00:00.000Z\",\r\n      \"lastUpdateAt\":\"2022-11-11T17:32:57.000Z\",\r\n      \"lastUpdateBy\": \"admin\",\r\n      \"photo\":null,\r\n      \"photo_mimetype\":null\r\n   } \r\n   localhost:8099/api/inventory/edit/6375f1bd7473690cb772cd37\r\nExpect Result:\r\n{\r\n    \"message\": \"Success\"\r\n}\r\n\r\nRemove Record\r\nget /api/inventory/delete/:id\r\nSample Usage:\r\ncurl localhost:8099/api/inventory/delete/6375f1bd7473690cb772cd37\r\nExpect Result:\r\n{\r\n    \"message\": \"Success\"\r\n}\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericchw%2Fs381f-project-gamedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericchw%2Fs381f-project-gamedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericchw%2Fs381f-project-gamedb/lists"}