All Projects → niklaskorz → nkchat

niklaskorz / nkchat

Licence: MIT license
A web-based chat application using modern technologies such as React, GraphQL and styled-components

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to nkchat

React Mobx State Tree
Create React App with MobX State Tree, Styled Components and GraphQL
Stars: ✭ 127 (+535%)
Mutual labels:  apollographql
Gramps Legacy
The core data source combination engine of GrAMPS.
Stars: ✭ 198 (+890%)
Mutual labels:  apollographql
docker-traefik-gitlab
No description or website provided.
Stars: ✭ 26 (+30%)
Mutual labels:  traefik
Fullstack Apollo React Boilerplate
💥A sophisticated Apollo in React boilerplate project.
Stars: ✭ 136 (+580%)
Mutual labels:  apollographql
Apollo Opentracing
Performance trace your Apollo GraphQL server with Opentracing
Stars: ✭ 154 (+670%)
Mutual labels:  apollographql
Moviepark
A Nuxt universal app with an Adonis 5 api server using the TMDb API for its movie catalog.
Stars: ✭ 32 (+60%)
Mutual labels:  traefik
React Graphql Github Apollo
🚀 A React + Apollo + GraphQL GitHub Client. Your opportunity to learn about these technologies in a real world application.
Stars: ✭ 1,563 (+7715%)
Mutual labels:  apollographql
apollo-newrelic-extension
Apollo Server extension library for performing NewRelic transaction traces of graphql requests
Stars: ✭ 16 (-20%)
Mutual labels:  apollographql
Gramps Express
NOTE: The GrAMPS core has moved to https://github.com/gramps-graphql/gramps
Stars: ✭ 161 (+705%)
Mutual labels:  apollographql
traefik-workshop
Getting started with Traefik on Kubernetes. A few exercises that help you to start the journey with Traefik Proxy.
Stars: ✭ 83 (+315%)
Mutual labels:  traefik
Githunt Angular
An Apollo with Angular full-stack example app: vote for your favorite GitHub repos!
Stars: ✭ 144 (+620%)
Mutual labels:  apollographql
Graphql Kafka Subscriptions
Apollo graphql subscriptions over Kafka protocol
Stars: ✭ 154 (+670%)
Mutual labels:  apollographql
docker-nextcloud
Nextcloud Docker image
Stars: ✭ 209 (+945%)
Mutual labels:  traefik
Apollo Federation Ruby
A Ruby implementation of Apollo Federation
Stars: ✭ 131 (+555%)
Mutual labels:  apollographql
merng
UNMAINTAINED - 🎊 This is boilerplate for MERN stack with GraphQL and with integrations like Redux and SSR 🎊
Stars: ✭ 14 (-30%)
Mutual labels:  apollographql
Apollo2 Subscriptions How To
Apollo Server 2 how to setup subscriptions
Stars: ✭ 125 (+525%)
Mutual labels:  apollographql
Apollo Android
🤖  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
Stars: ✭ 2,949 (+14645%)
Mutual labels:  apollographql
StarWars
Minimal GraphQL based Jetpack Compose, Wear Compose and SwiftUI Kotlin Multiplatform sample (using StarWars endpoint - https://graphql.org/swapi-graphql)
Stars: ✭ 165 (+725%)
Mutual labels:  apollographql
infrastructure
Flux based GitOps repository for my home lab infrastructure.
Stars: ✭ 14 (-30%)
Mutual labels:  traefik
ceil
Helmut Hoffer von Ankershoffen experimenting with auto-provisioned RPi cluster running K8S on bare-metal
Stars: ✭ 42 (+110%)
Mutual labels:  traefik

nkchat

Build status

nkchat is a web-based chat application using modern technologies such as React, GraphQL and styled-components.

License

Licensed under the MIT license.

Setup requirements

Setup

Clone the repository, enter the repository's directoy with a terminal.

If you are on Windows, execute

$env:COMPOSE_CONVERT_WINDOWS_PATHS=1

if you are using Powershell or

set COMPOSE_CONVERT_WINDOWS_PATHS=1

if you are using cmd.

Then execute the following commands:

docker-compose -p nkchat build
docker-compose -p nkchat up -d

nkchat will then be available at http://localhost:9000.

Browser compatability

The following browsers are tested and supported:

  • Chrome 65+
  • Firefox 58+
  • Microsoft Edge with EdgeHTML 17+
  • Safari 10+

In general, these include the last two major versions of all mainstream browsers. Support for Internet Explorer is not planned. Opera and Vivaldi should be working fine as they use the same browser engine as Chrome, but they are not actively tested.

The layout is currently optimized for desktop screens and therefore hard to use on mobile devices like smartphones.

Features

  • Register, log in and log out
  • Create and join rooms
  • Send and receive messages
  • Switch between rooms
  • List of room members is automatically updated on all subscribed clients when a new user joins the room
  • Send messages that include links to YouTube or aluhga videos, or images
  • Links in messages are automatically turned into clickable links thanks to Linkify
  • Multiline messages (line breaks are entered with Shift + Enter while Enter is used for sending a message)

Sending links to videos or images

Links following these patterns will be embedded as videos:

  • https?://youtube.com/watch?v={videoId}
  • https?://youtu.be/{videoId}
  • https?://alugha.com/videos/{videoId}

Links following these patterns will be embedded as images:

  • *.png
  • *.jpe?g
  • *.webp
  • *.bmp
  • *.tga

GraphQL API

For querying, mutating and subscribing to data, a GraphQL API is used. You can inspect the GraphQL API by visiting http://localhost:9000/graphiql and clicking on the "Docs" button on the upper right corner.

Scalability and load balancing

Traefik is used for routing and load balancing the included microservices, i.e. the chat client and the GraphQL server.

You can start the server with e.g. four server instances by executing:

docker-compose -p nkchat up -d --scale server=4

Traefik will balance incoming traffic among the running server instances by using Weighted round robin by default.

You can inspect the running services and their health by accessing the Traefik dashboard at http://localhost:8080/dashboard.

When a chat message reaches a server instance, the other server instances and their subscribed WebSocket clients are notified using the high-performance NATS messaging server.

Possible features and optimizations for future versions

The following are optimizations and features I would implement if this was to turn into a real product:

  • Markdown support in messages
  • Pre-loading the size of sent images to cache the dimensions and size the messages accordingly even before the image is loaded by the browser
  • Serverside-checking of links for metadata like title or schema.org data to generate a link preview beneath the message
  • Password protection for rooms
  • Invite-only rooms with short-lived invite links generated by the room's owner
  • Notifications for new messages, even when a room is not open (push notifications)
  • Possibility to leave a room or to kick users out of a room as the owner
  • Possibility to delete or rename a room
  • Possibility to rename yourself as a user, maybe even with separate names per room
  • Lazy loading of older messages, right now the whole chat history is loaded when the user opens a room
  • Touch-friendly, responsive layout for an optimal mobile experience
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].