Project-Stage-Academy / UA-1131_Forum-PS

0 stars 0 forks source link

API Development for Messaging Functionality #38

Closed mehalyna closed 8 months ago

mehalyna commented 8 months ago

Objective: Develop the backend infrastructure to support messaging between investors and startups, including API endpoints and database models.

Detailed Steps:

  1. Design Database Models:

    • Create models to represent messages, user profiles (for investors and startups), and any necessary relational models to track message threads or conversations.
    • Add migrations.
  2. Develop Messaging API Endpoints:

    • Create Message API: Develop a POST endpoint to allow investors to send messages to startups. This endpoint should accept parameters such as the sender's ID, recipient's (startup) ID, message content, and possibly a subject or thread ID for threaded conversations.
    • Fetch Messages API: Implement a GET endpoint for both investors and startups to retrieve their messages. This might involve fetching all messages, messages by conversation/thread, or new/unread messages.
    • Message Details API: Develop a GET endpoint to retrieve the details of a specific message or conversation thread, including sender info, timestamps, and message content.
  3. Implement Contact Mechanism on Startup Profiles:

    • While the actual user interface implementation is outside the scope of a backend API task, ensure there's an API endpoint that can be triggered when an investor wants to contact a startup. This might involve a simple POST request that initiates a message thread between the investor and the startup.
  4. Inbox System API:

    • Design endpoints to support an inbox-like system where startups can view and manage received messages. This could include APIs to mark messages as read, delete messages, or categorize them.

Task #20