Skip to content
/ chat Public

Quack is a free and open-source chat application designed for private use. Although it doesn't have any unique features, it combines the best features from other communicators. Quack prioritizes privacy and security by allowing users to host their own app, ensuring that they have complete control over their data.

License

Notifications You must be signed in to change notification settings

raaymax/chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests Release CodeFactor Contributor Covenant License: MIT

Welcome to the Quack - private chatting application.

Quack is a free and open-source chat application designed for private use. With its easy-to-use interface and seamless integration with web browsers, Quack is a Progressive Web Application that can be accessed from any platform that has a web browser, such as Chrome.

Quack is inspired by Slack, but is more affordable for private use. Although it doesn't have any unique features, it combines the best features from other communicators. Quack prioritizes privacy and security by allowing users to host their own app, ensuring that they have complete control over their data.

Configuration

To override default settings chat.config.js file can be created in root directory of the project. File should export folowing object:

type ChatConfig = {
  port?: number // default `PORT` env otherwise `8080`
  sessionSecret?: string // auto generated on first run to `secrets.json` but can be overwritten here
  trustProxy?: bool | string | number // default `uniquelocal` ref: https://expressjs.com/en/guide/behind-proxies.html
  vapid?: { // auto generated on first run to `secrets.json` but can be overwritten here
    publicKey: string
    secretKey: string
  },
  databaseUrl?: string // default `DATABASE_URL` env
  cors?: string[] // by default [ 'https?://localhost(:[0-9]{,4})' ],
  storage?: {
    type: 'memory' | 'gcs' | 'fs' // default `fs` / `memory` in tests
    directory: string // where to save files when type `fs`
    bucket: string // bucket name for `gcs`
  }
  apiUrl?: string // default 'http://localhost:8080' url of api
  appUrl?: string // default 'http://localhost:8081' url for frontend app
};

Environment variables

GOOGLE_APPLICATION_CREDENTIALS [string] - (optional) when gcs storage method is used

Requirements

  • MongoDB
  • (optional) google cloud key for GCS

Files persistence

Currently supporting Google Cloud Storage. To enable it set fileStorage in config file to gcs specify gcsBucket and set GOOGLE_APPLICATION_CREDENTIALS environment variable.

Decisions

Database

We're using a serverless MongoDB instance because of its reliability and cost-effectiveness - we only pay for what we use. The cheapest option available on Mongo Atlas is sufficient for application, as we don't require any internal pub/sub functionality.

Server

It would be nice to have a serverless solution, but for now, the cheapest option is using GCE. I have no idea how to propagate messages to other serverless instances without a hosted pub/sub service. MongoDB, Redis, and Postgres need to be hosted to watch for messages. Perhaps Google Cloud Pub/Sub would be a good option?

Plugins

Chat have plugin system. Example plugin can be found in plugins/example. How to use plugins and plugin hook points TBA.

Local development setup

pnpm i
docker-compose up -d
pnpm run dev

Default credentials

admin / 123

New users can be invited with /invite command which will generate single use link for user registration.

License

MIT License

Copyright (c) 2023 CodeCat

About

Quack is a free and open-source chat application designed for private use. Although it doesn't have any unique features, it combines the best features from other communicators. Quack prioritizes privacy and security by allowing users to host their own app, ensuring that they have complete control over their data.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •