Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhishekkhot/chat-app-backend
chat app backend with NodeJS
https://github.com/abhishekkhot/chat-app-backend
fastify fastify-plugin kafka nodejs postgresql redis sequelize sequelize-cli socket-io
Last synced: about 1 month ago
JSON representation
chat app backend with NodeJS
- Host: GitHub
- URL: https://github.com/abhishekkhot/chat-app-backend
- Owner: AbhishekKhot
- Created: 2024-11-16T18:35:13.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-11-24T10:06:31.000Z (about 1 month ago)
- Last Synced: 2024-11-24T11:18:17.630Z (about 1 month ago)
- Topics: fastify, fastify-plugin, kafka, nodejs, postgresql, redis, sequelize, sequelize-cli, socket-io
- Language: JavaScript
- Homepage:
- Size: 226 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat System Database Schema
## Entity Relationship Diagram
```mermaid
erDiagram
users ||--o{ contacts : "has"
users ||--o{ group_chats : "creates"
users ||--o{ group_chat_members : "joins"
users ||--o{ chats : "sends"
users ||--o{ group_chat_messages : "authors"
users ||--o{ message_tags : "is tagged in"group_chats ||--o{ group_chat_members : "contains"
group_chats ||--o{ group_chat_messages : "has"chats ||--o{ attachments : "has"
group_chat_messages ||--o{ message_tags : "has"users {
int id PK
string first_name
string last_name
string phone_number
timestamp create_at
timestamp updated_at
}contacts {
int id PK
int contact_user_id FK
int contacted_user_id FK
enum relationship_type
timestamp create_at
timestamp updated_at
}group_chats {
int id PK
string group_name
int created_by FK
timestamp create_at
timestamp updated_at
}group_chat_members {
int id PK
int group_chat_id FK
int member_user_id FK
timestamp joined_at
}chats {
int id PK
int from_user_id FK
int to_user_id FK
text message
enum status
timestamp create_at
timestamp updated_at
}group_chat_messages {
int id PK
int group_chat_id FK
int message_author_id FK
text message
timestamp create_at
timestamp updated_at
}attachments {
int id PK
int chat_id FK
string file_path
timestamp create_at
timestamp updated_at
}message_tags {
int id PK
int message_id FK
int tagged_user_id FK
}
```## Database Schema Description
This database schema represents a chat system with support for:
- Direct messaging between users
- Group chats
- Contact management
- File attachments
- Message tagging
- Message status tracking## Key Features
- User management with contact relationships
- Support for both direct and group messaging
- File attachment capabilities
- Message status tracking (sent, delivered, read)
- User tagging in messages
- Timestamps for all records