/Chat_be

Primary LanguageTypeScript

Chats

ℹ️ General Info

This is the repository responsible for Chats apps.

🏭 Applications

To work properly, fill in the .env file. Use the .env.example file as an example.

🖍 Requirements

🏃‍♂️ Simple Start

  1. npm install at the root
  2. Fill ENVs
  3. npm run start:dev
  4. Enjoy ❤️

🌕 Technology

  • express — a backend framework.
  • axios - making request to quotes api
  • mongoDB - a NoSQL database
  • socket.io - a real-time communication library.

DB Schema

erDiagram
    User {
        uuid id PK
        varchar firstName
        varchar lastName
        varchar email
        varchar password
        timestamp createdAt
        timestamp updatedAt
    }
    Chat {
        uuid id PK
        varchar firstName
        varchar lastName
        uuid[] messages FK
    }
    Message {
        uuid id PK
        enum senderRole
        varchar text
        uuid chatId FK
        timestamp timestamp
    }

    %% Relationships
    Chat ||--o{ Message : contains
    Message ||--|| Chat : chatId
Loading