Skip to content

Complex chat API using Socket.IO and NestJS

Notifications You must be signed in to change notification settings

erickmarx/chat-api

Repository files navigation


Logo

[WIP] Chat API

[WIP] An awesome chat API for your project
Explore the docs »
View Demo

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. License
  6. Contact

About The Project

This project is a chat API that can be used in any project that needs a chat system. It is built with NestJS, Prisma, PostgreSQL, and SocketIO. It is hosted on Google Cloud Run and uses Google Cloud SQL as a database.

Built With

  • Typescript
  • NestJS
  • SocketIO
  • Prisma
  • PostgreSQL
  • GCP Cloud Run
  • GCP Cloud SQL

Getting Started

Installation

    1. Clone the repo
    git clone https://github.com/erickmarx/chat-api.git
  1. Configure the environment variables copying and renaming .env.example to .env
    PORT=3000
    POSTGRES_PORT=
    POSTGRES_USER=
    POSTGRES_PASSWORD=
    POSTGRES_URL=
  2. Install PNPM packages
    pnpm install
  3. Generate Prisma client
    pnpm exec prisma generate
  4. Seed the database
    pnpm exec prisma db seed -- --environment staging

Usage

  1. Start the aplication
  pnpm run build && pnpm run start

Roadmap

  • Documention for SocketIO events
  • Endpoint for create conversation
  • Endpoint for send a message to conversation
  • Endpoint for get history from a conversation
  • Endpoint for get all conversations from a profile
  • Recover unreceived messages when logging in
  • Endpoint for update visualization when the chat is opened
  • Update last seen when connected/not connected
  • Endpoint for delete only history, not conversation
  • Endpoint for delete conversation with history
  • Endpoint for configure chat settings
  • Endpoint for block conversations
  • Endpoint for see blocked conversations

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Erick Marx - Linkedin - [email protected]

Project Link: https://github.com/erickmarx/chat-api

About

Complex chat API using Socket.IO and NestJS

Resources

Stars

Watchers

Forks