Welcome to the quack - private chatting application.
Welcome to quack, a free and open-source chat application designed for private use. quack offers an easy-to-use interface and seamless integration with web browsers, making it a Progressive Web Application accessible from any platform with a web browser, such as Chrome.
Inspired by Slack but more affordable for private use, quack combines the best features from other communicators while prioritizing privacy and security. Users can host their own app, ensuring complete control over their data.
The fastest way to get started is to use the Docker compose. Using following command will start the application with default settings in no time.
docker compose up -d
navigate to http://localhost:8080 and use default credentials to login admin / 123
.
To override default settings chat.config.ts
file can be created in root directory of the project. You can use chat.config.example.ts
as a template.
File should export folowing object:
type Config = {
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?: { // Where uploaded files should be stored
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
};
GOOGLE_APPLICATION_CREDENTIALS
[string] - (optional) when gcs storage method is used
To start the server:
cd ./deno/server
deno task dev
Install dependencies and start the React app:
cd ./app
npm install
npm run dev
To start the storybook:
cd ./app
npm install
npm run storybook
Currently supporting Google Cloud Storage. To enable it set fileStorage
in config file to gcs
specify gcsBucket
and set GOOGLE_APPLICATION_CREDENTIALS
environment variable.
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.
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?
Chat have plugin system. Example plugin can be found in plugins/example
.
How to use plugins and plugin hook points TBA.
admin / 123
New users can be invited with /invite
command which will generate single use link for user registration.
Contributions are welcome. For major changes, please open an issue first to discuss what you would like to change. Ensure to update tests as appropriate.
MIT License
Copyright (c) 2023 CodeCat