Next generation of connection
Core Philosophy
| Path | Description |
|---|---|
./gateway |
Websocket server to handle cache updates for the client |
./web |
The frontend of chat app, react router + tailwind |
Fill in the environment variables before running gateway and web. All data is stored in a Postgresql database and synchronised w/ ./gateway.
Table of Contents
For the setup, you can run make to automate (faster approach) or manually run the commands below
** using make **
makefile
- make gateway
- make web
** manually do it **
./gateway
- create a .env file in
./gateway
SECRET="somerandomsecret12345"
REDIS_ADDR="redishost:6379"
REDIS_PASSWORD="redispassword"
pgconnectionstring="postgresql://postgres:passwordforyourdb@yourhost:5432/databasename"- install go @ https://go.dev/doc/install
- go run main.go
./web
- install nodejs @ https://nodejs.org/en/download
- create a .env file in
./web
SECRET="somerandomsecret12345"
RESEND_API_SECRET="resendapisecretkeyhere"
pgconnectionstring="postgresql://postgres:passwordforyourdb@yourhost:5432/databasename"
CAPTCHA_SECRET="somesecretkey"
# get captcha secret at https://www.cloudflare.com/application-services/products/turnstile/
redispgconnectionstring="redis://redisusername:thepassword@yourredishost:50952"- make sure that you have pnpm installed already, if not, use
npm i -g pnpm - install deps using
pnpm install - run in development mode using
pnpm devor if you want to deploy it usepnpm buildthenpnpm start - runs on http://localhost:5173/login in
developmentand http://localhost:3010/login inproduction
See the open issues for a full list of proposed features (and known issues).
To build and run
./web
cd web
pnpm build
pnpm start
./gateway
cd gateway
go run main.go
or if you prefer Docker
cd web
docker build -t synchronize-web .
docker compose up -d
cd gateway
docker build -t synchronize-gateway .
docker compose up -d
docker compose down
sudo git pull
docker build -t synchronize-web .
docker compose up -d
# or
docker build -t synchronize-gateway .
docker compose up -d
Contributions is what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!
To contribute, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the Unlicense License. See LICENSE.txt for more information.