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

Database schemas added for user data, quests and settings #74

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

dusek2
Copy link
Contributor

@dusek2 dusek2 commented Apr 4, 2024

Overview

Please provide a brief overview of what this pull request aims to achieve. For instance, you might be fixing a bug, adding a new feature, or updating documentation.

Related Issue(s)

Closes issue #73 Missing MongoDB schemas

Changes

Users

Users

  • userID: ObjectId - Unique identifier managed by MongoDB
  • username: String - Chosen username also an email.
  • password: String - Hashed password ( we will figure out hashing later
  • completed quiz: Boolean - Indicates if the user has completed placement quiz
  • stats: Object - Main app stats
    • MeStat: Number
    • WorkStat: Number
    • LoveStat: Number
  • quests: Array - List of quests the user has undertaken or completed.
  • settings: Object - User's settings preferences like notifications, audio level, etc.

Quests

  • questID: ObjectId - Unique identifier managed by MongoDB
  • title: String - Name of the quest.
  • description: String - What the user needs to do.
  • statImprovements: Object - Indicates which stats are improved upon completion.
    • MeStat: Number
    • WorkStat: Number
    • LoveStat: Number
  • requirements: String - quest requirements

Settings

  • userId: links settings to user
  • uiPreferences: stores users preferred UI settings
    • fontSize: number
    • theme: light/dark

Added

  • backend/models/settings.js
  • backend/models/quests.js

Changed

  • backend/models/user.js
  • app/.gitignore
  • backend/.gitignore

Checklist before Merging

  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate).
  • I have ensured the changes adhere to the project's coding standards and guidelines.

Additional Comments

Game data not included!

@dusek2
Copy link
Contributor Author

dusek2 commented Apr 4, 2024

ChatGPT4 assistance used to find out how to build schemas for Mongo
https://chat.openai.com/share/67a3f1f2-2077-47d2-9217-0c4b6b44076a

@dusek2 dusek2 marked this pull request as ready for review April 4, 2024 21:30
Copy link
Contributor

@MoldyPotat MoldyPotat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Review:

  • Readability: Each part of the schema is well defined and commented with easy to understand names.

  • Code Quality: Code is of high quality and easy to read.

  • Testing: Unsure if the code can even be tested.

  • Functionality: Added database information storage required for the application.

  • Housekeeping: Everything looks clean and in order.

Additional Comments: Cannot open chatGPT message log will need others conformation on that.

@dusek2
Copy link
Contributor Author

dusek2 commented Apr 4, 2024

Pull Request Review:

  • Readability: Each part of the schema is well defined and commented with easy to understand names.
  • Code Quality: Code is of high quality and easy to read.
  • Testing: Unsure if the code can even be tested.
  • Functionality: Added database information storage required for the application.
  • Housekeeping: Everything looks clean and in order.

Additional Comments: Cannot open chatGPT message log will need others conformation on that.

linked fixed, thank you

Copy link
Contributor

@vicliyj vicliyj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Review:
Readability: Code is formatted well with the appropriate comments. Easy to read!
Code Quality: High quality code, everything is easy to follow.
Testing: Don't think tests are needed? Other input needed.
Functionality: Great functionality added!
Housekeeping: Comments in all appropriate and necessary places, easy to read, easy to follow workflow. Looks good to me!

Additional comments: ChatGPT link works!

@dusek2 dusek2 merged commit 4fa4f35 into UNLV-CS472-672:main Apr 5, 2024
1 check passed
@dusek2 dusek2 deleted the database branch April 16, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants