A Federated Multi-Party Chat System in Golang and Svelte, using Matrix Protocol.
This project is in the scope of a Distribuited Systems Introduction Course. Dragonite is a multi-party federated chat, using the Matrix.org Protocol, to create a federated chat-app, our server is built using the Go programming language, while the client uses SvelteKit and the matrix-js-sdk. Finnaly, as you can see on the banner, we're inspired by the dragonite mailer from the Pokemon© franchise.
- To install the client, clone this project.
git clone https://github.com/caio-bernardo/dragonite.gitSee the following for the frontend:
- Enter the
frontendfolder
cd frontend- Install the dependencies
npm installConsidering you have cloned this project. Make a copy of the .env.example file and rename to .env. Fill the environmet variables.
To run the client just use npm:
npm run devAccess the endpoint on the terminal, normally http://localhost:5173.
- (Optionally) create a container for the database
make docker-runAfter running the container for the first time you need to create the tables inside the database do that using the migrate.sh script as follows:
export DB_URL=postgres://user:pass@localhost:5432/dbname?sslmode=disable
./migrate.sh upUse the same values as in .env file.
- Run the project using the Makefile (see more commands at Makefile).
make run- Use
Ctrl-Cto stop the server andmake docker-downto disable the container.
.
├── air.toml
├── cmd
├── docker-compose.yml
├── frontend
├── go.mod
├── go.sum
├── internal
│ ├── database
│ ├── model
│ ├── repository
│ ├── server
│ ├── services
│ │ ├── client
│ │ └── server
│ ├── services
│ ├── types
│ └── util
├── LICENSE
├── Makefile
├── migrations
├── README.md
└── static- cmd/api: entrypoint to run the server
- frontend: directory containing the client webapp
- internal: source code for the server
- internal/database: database connection service
- internal/model: data models
- internal/repository: interfaces and implementations for database access
- internal/server: implementation of the HTTP server
- internal/services: Business Logic
- internal/services/client: implementation of Client-Server communication
- internal/services/server: implementation of Server-Server communication
- types: common types (like errors)
- util: useful functions to parse JSON, SQL, etc.
- migrations: SQL scripts
- Caio Bernardo
- Lucas Neves
- Willian Farias
Feel free to Open a New Issue or Submit a Pull Request. See our CONTRIBUTING file for more information in how to contribute in more specific ways. Don't forget to check our Code of Conduct for the repository guidelines.
This project is under the MIT license. For more info see LICENSE.
This file was made with Make Your Reads.
