Table of Contents
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.
-
- Clone the repo
git clone https://github.com/erickmarx/chat-api.git
- Configure the environment variables copying and renaming
.env.example
to.env
PORT=3000 POSTGRES_PORT= POSTGRES_USER= POSTGRES_PASSWORD= POSTGRES_URL=
- Install PNPM packages
pnpm install
- Generate Prisma client
pnpm exec prisma generate
- Seed the database
pnpm exec prisma db seed -- --environment staging
- Start the aplication
pnpm run build && pnpm run start
- 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
Distributed under the MIT License. See LICENSE.txt
for more information.
Erick Marx - Linkedin - [email protected]
Project Link: https://github.com/erickmarx/chat-api