Code-Sync icon indicating copy to clipboard operation
Code-Sync copied to clipboard

feat: add login page, project room management, and user persistence

Open hasnaintypes opened this issue 6 months ago • 7 comments

Feature: Login Page and User Persistence

Overview

This branch implements a robust authentication for Code-Sync, enabling users to log in, manage multiple group projects (coding rooms), and enjoy a personalized experience with persistent sessions and chat functionality.

Features Implemented

  • Login Page & Authentication

    • Modern, user-friendly login page.
    • Integrated authentication with backend validation.
    • User session is persisted using localStorage for seamless experience across reloads.
  • MongoDB Integration

    • MongoDB for storing user and project data.
    • Mongoose models for User and ProjectRoom.
    • Connection and error handling in the backend.
  • Controllers & Routes

    • Express controllers and RESTful routes for:
      • User login and registration.
    • Proper validation and error handling for all endpoints.
  • Frontend Integration

    • On login, the user’s session is saved to localStorage and loaded automatically on app start.
    • The project join/create flow uses the MongoDB project ID for navigation and socket room management.
    • The UI allows users to enter a project description and join or create a coding room in one step.
  • Personalized Chatting

    • (Planned/Initial) Foundation for personalized chat between friends within coding rooms.

Technical Highlights

  • Backend: Node.js, Express, Mongoose, MongoDB.
  • Frontend: React, TypeScript, React Context for state management.
  • Persistence: User session stored in localStorage for automatic login.
  • Socket.io: Real-time collaboration and room management.

Screenshot

Login Page

Next Steps

  • Implement direct messaging (personalized chat) between users.
  • Enhance project room UI for easier switching and management.
  • Add more robust error and edge-case handling.

hasnaintypes avatar Jun 24 '25 10:06 hasnaintypes