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.
- E2EE support for more privacy
- Progressive Web Application (PWA)
- Self-hosted for privacy and security
- Multi-channel support
- Direct messaging
- Pinning messages
- Message search
- File sharing
- Emoji reactions
- Custom emojis
- Message threading
- User mentions
- Link previews
- Plugin system for extensibility
https://registry.hub.docker.com/r/codecat/quack
The fastest way to get started is to use the Docker compose after the code checkout. 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
};
port on which application will start
this value will overwrite the one from secrets.json
to trust proxy or not.
connection string to mongodb instance. By default this value is taken from env variable DATABASE_URL
.
example:
mongodb://chat:chat@localhost:27017/chat?authSource=admin
This allows to host frontend and backend on different domains For development this option is set to:
cors: [ 'https?://localhost(:[0-9]{,4})' ]
to allow running vite and deno together in separate processes to have full automatic reloads on code changes
Storage option for file uploads.
storage: {
type: 'memory' | 'fs' | 'gcs'
}
Used for tests no files need to be stored persistently
Store files in filesystem
You can configure folder in which files will be stored using storage.directory
field.
Save files in Google Cloud Storage good choice for prroduction use.
in this case you need to specify storage.bucket
field and env variable needs to be defined
GOOGLE_APPLICATION_CREDENTIALS
[string] with path to google application credentials
Not implemented, I will implement it if there will be some interest in it. Please create issue for it.
url to the api if different than appUrl
url to the app used for links generation
- Install Deno
- Node.js and npm (for managing frontend dependencies and running React)
- MongoDB
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
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