Skip to content

Community Lineups Not Visible Between Users #1

@SamXop123

Description

@SamXop123

Problem Description

Community lineups created by users are not visible to other users. When a user posts a lineup to the community, it only appears in their own browser's localStorage and is not accessible to other users.

Root Cause Analysis

The community feature is using localStorage for data persistence, which is browser-specific and local to each user's device:

  • Data Storage: localStorage.setItem('communityLineups', JSON.stringify(communityLineups)) in community-post-dialog.jsx:52
  • Data Retrieval: localStorage.getItem('communityLineups') in Community.jsx:81

Since localStorage is isolated per browser/device, community posts are not actually shared between users.

Impact

  • Users cannot see lineups posted by other users
  • The "Community" feature functions as a personal collection rather than a true community platform
  • No real social interaction or lineup sharing capability

Current Implementation Issues

  1. No Backend/Database: No centralized storage for community posts
  2. No API Endpoints: No server-side communication for fetching/posting community lineups
  3. No Real-time Updates: No mechanism to sync data across different users
  4. No User Authentication: No user accounts to properly attribute posts

Recommended Solutions

Option 1: Backend Implementation (Recommended)

  • Set up a Node.js/Express backend
  • Create MongoDB database for storing community lineups
  • Implement API endpoints:
    • POST /api/community/lineups - Post new lineup
    • GET /api/community/lineups - Fetch all community lineups
    • PUT /api/community/lineups/:id/like - Like/unlike lineups
  • Add user authentication system

Option 2: Firebase Integration (Quick Implementation)

  • Use Firebase Firestore for real-time database
  • Implement Firebase Authentication for user management
  • Leverage real-time listeners for instant updates

Files Requiring Changes

  • src/pages/Community.jsx - Replace localStorage with API calls
  • src/components/community-post-dialog.jsx - Replace localStorage with API calls
  • src/components/saved-lineups.jsx - Update community posting logic
  • New: API service files for community data management

Priority

High - This is a core feature that fundamentally doesn't work as intended and affects the user experience significantly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is neededpriorityneed to get it done asap

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions