All Projects → dogecodes → React Chat Api

dogecodes / React Chat Api

📡 API for chat application for DogeCodes React course

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Chat Api

Appy Backend
A user system to bootstrap your app.
Stars: ✭ 96 (-20.66%)
Mutual labels:  api, api-server, mongoose, mongodb
Blog Service
blog service @nestjs
Stars: ✭ 188 (+55.37%)
Mutual labels:  api, api-server, mongoose, mongodb
Bookmarks.dev
Bookmarks and Code Snippets Manager for Developers & Co
Stars: ✭ 218 (+80.17%)
Mutual labels:  api, mongoose, mongodb
Nodejs Restful Api
How to create a RESTful CRUD API using Nodejs?
Stars: ✭ 285 (+135.54%)
Mutual labels:  api, mongoose, mongodb
React Chat
⚛️ Chat application for DogeCodes React course
Stars: ✭ 84 (-30.58%)
Mutual labels:  learning, courses, chat
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+1645.45%)
Mutual labels:  api, mongoose, mongodb
Tiledesk Server
Tiledesk server. Tiledesk is an Open Source Live Chat platform written in NodeJs and MongoDB
Stars: ✭ 94 (-22.31%)
Mutual labels:  api, mongodb, chat
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (+138.02%)
Mutual labels:  api, mongoose, mongodb
Securing Restful Apis With Jwt
How to secure a Nodejs RESTful CRUD API using JSON web tokens?
Stars: ✭ 301 (+148.76%)
Mutual labels:  api, mongoose, mongodb
Spruce
A social networking platform made using Node.js and MongoDB
Stars: ✭ 399 (+229.75%)
Mutual labels:  api, mongoose, mongodb
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (+398.35%)
Mutual labels:  api, mongoose, mongodb
Appkernel
API development made easy: a smart Python 3 API framework
Stars: ✭ 152 (+25.62%)
Mutual labels:  api, api-server, mongodb
Api Query Params
Convert URL query parameters to MongoDB queries
Stars: ✭ 141 (+16.53%)
Mutual labels:  api, mongoose, mongodb
Fastify Api
A blazing fast REST APIs with Node.js, MongoDB, Fastify and Swagger.
Stars: ✭ 138 (+14.05%)
Mutual labels:  api, mongoose, mongodb
Wertik Js
💪 A library that powers your app with GraphQL + Rest API
Stars: ✭ 56 (-53.72%)
Mutual labels:  api, mongoose, mongodb
Jianshu
仿简书nx+nodejs+nestjs6+express+mongodb+angular8+爬虫
Stars: ✭ 296 (+144.63%)
Mutual labels:  api, mongoose, mongodb
Mean Angular4 Chat App
MEAN stack with Angular 4 Chat App
Stars: ✭ 41 (-66.12%)
Mutual labels:  mongoose, mongodb, chat
Rest Hapi
🚀 A RESTful API generator for Node.js
Stars: ✭ 1,102 (+810.74%)
Mutual labels:  api, mongoose, mongodb
Nodejs Backend Architecture Typescript
Node.js Backend Architecture Typescript - Learn to build a backend server for Blogging platform like Medium, FreeCodeCamp, MindOrks, AfterAcademy - Learn to write unit and integration tests - Learn to use Docker image - Open-Source Project By AfterAcademy
Stars: ✭ 1,292 (+967.77%)
Mutual labels:  mongoose, mongodb
Boilerplate Vue Apollo Graphql Mongodb
Start your magical stack journey!
Stars: ✭ 85 (-29.75%)
Mutual labels:  mongoose, mongodb

DogeCodes

Chat API

API for chat application for DogeCodes React course.

This is a simple API server that implements a logic required to correct work of DogeCodes React Chat application.

Requirements

To run this server localy you need to have these requirements:

Installations

Use following commands to run this API-server localy:

git clone https://github.com/dogecodes/react-chat-api.git
cd react-chat-api
npm install
npm run start:dev # or `npm start` for production

Note: Don't forget to start mongod for connection to database.

API

Current version of API is v1, so you need to specify the version of API before every route. For example:

http://localhost:8000/v1/users/me
http://localhost:8000/v1/chats

HTTP

Here's the map of API's HTTP routes:

  • / — routes related to authentication.
    • /signup POST — create new user with username and password.
    • /login POST — log user in with username and password.
    • /logout GET — log out active user.
  • /users — routes related to users.
    • /users GET — retrieve data about all users.
    • /users/me GET — retrieve my user's data.
    • /users/me POST — update my user's information (username, firstName, lastName and city).
    • /users/:id GET — retrieve information about user with specific :id.
  • /chats — routes related to chats.
    • /chats GET — retrieve information about all chats.
    • /chats POST — create new chat with specified title.
    • /chats/my GET — get list of all user's chats.
    • /chats/:id GET — get chat's information with messages by specific chat's :id.
    • /chats/:id POST — send new message to chat with specific :id.
    • /chast/:id DELETE — delete chat with specific :id. Only creator of the chat can delete it.
    • /chats/:id/join GET — join chat with specific :id.
    • /chats/:id/leave GET — leave chat with specific :id.

If you're using Insomnia for debugging APIs, you can download a workspace backup:

Download .zip

Sockets

This API also emmits and listens some socket.io events.

Sockets connection requires authentication with access-token. Here's an example of establishing sockets connection:

import SocketIOClient from 'socket.io-client';

socket = SocketIOClient('path/to/api', {
  query: {
    token: '...your access-token here...',
  },
});

Here's the list of events:

Emmiting

  • new-message — emmited when someone sends new message to specific chat.
  • new-chat — emmited when someone creates new chat.
  • deleted-chat — emmited when someone deletes a chat.

Listening

  • connection — connection of socket.io client.
  • mount-chat — mount a client to listen for messages in chat with specific :chatId.
  • unmount-chat — unmout a client from listening for messages in chat with specific :chatId.
  • send-message — send message with content to chat with

License

MIT © Denys Dovhan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].