Skip to content

decompilexyz/Synchronize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synchronize

Next generation of connection

This is a hobby project

Core Philosophy

Path Description
./gateway Websocket server to handle cache updates for the client
./web The frontend of chat app, react router + tailwind
Logo

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
  1. About The Project
  2. Setup Deploy Updating
  3. Contributing
  4. License

Built With

  • Rust
  • Go
  • React

(back to top)

setup

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"

./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 dev or if you want to deploy it use pnpm build then pnpm start
  • runs on http://localhost:5173/login in development and http://localhost:3010/login in production

See the open issues for a full list of proposed features (and known issues).

(back to top)

Deploy

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

Updating

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

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

contrib.rocks image

(back to top)

License

Distributed under the Unlicense License. See LICENSE.txt for more information.

(back to top)

Resources

(back to top)

About

Discord-like chat app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published