sparshg / battleship

Classic battleship game, two-player, online, deployed.
http://sparshg.dev/battleship/
MIT License
2 stars 5 forks source link

Adding Profile section #11

Open VesperAkshay opened 3 days ago

VesperAkshay commented 3 days ago

Issue Description: Add Profile Section for User Match History

Objective:
To implement a user profile section that allows users to view their profile information and the last 10 matches they have played.

Requirements:

  1. Profile Information Display:

    • Users should be able to see their basic profile information, including:
      • Username
      • Profile picture
      • Bio/Description
      • Account creation date
  2. Match History:

    • Display the last 10 matches played by the user, including:
      • Match date
      • Opponent(s)
      • Match result (Win/Loss/Draw)
      • Key stats (if applicable, e.g., score, duration)
  3. User Interface:

    • Create a clean and user-friendly layout for the profile section.
    • Ensure the match history is easily readable, possibly in a tabular format.
  4. Data Retrieval:

    • Implement backend logic to fetch user profile data and match history from the database.
    • Ensure that the data is updated in real-time or refreshed upon user request.
  5. Permissions:

    • Ensure that users can only view their own profile and match history for privacy reasons.
sparshg commented 3 days ago

I think this is out of scope for the project currently. I am using a container to host the database and another for server, both can scale to 0. This means database is cleared when the containers restart. We can add profiles in future if there are enough users using this. Also, since the database is temporary, it makes sense to port it to Redis instead of Postgres