ekarademir / solid-chat

Incomplete Slack clone using gRPC. Built on SolidJS, Diesel and Tonic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solid-Chat

A project that implements a chat app simialr to Slack. It uses Proto Buffers anf gRPC to communicate with the server. Admin and the client application are written in SolidJS. Persistance layer is PostgreSQL.

Podman

Start Podman in rootful setting because Postgres image requires rootful.

podman machine set --rootful
podman machine start

Persistance Layer

Diesel CLI installation

Also see.

brew install libpq
brew link --force libpq

then

PQ_LIB_DIR="$(brew --prefix libpq)/lib"

cargo install diesel_cli --no-default-features --features postgres

Starting Postgres

We use the latest Postgres image.

Below command requires rootful start of podman.

Persistence layer using Postgres that binds to the data folder inside this directory which will remove after Ctrl+C:

podman run --rm --name chat-data -v $(pwd)/data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres

Default creds

password: mysecretpassword
username: postgres

postgres://postgres:mysecretpassword@localhost/diesel_demo

In memory storage

Starting redis

podman run --rm --name chat-redis -d redis

Protobuf

Web client generation

Run in the web folders. See protobuf-ts

npx protoc --ts_out src/chat --proto_path ../chat-proto ../chat-proto/chat.proto

Also see

brew install protobuf@3
brew link --overwrite protobuf@3

About

Incomplete Slack clone using gRPC. Built on SolidJS, Diesel and Tonic


Languages

Language:TypeScript 72.4%Language:Rust 18.3%Language:JavaScript 7.4%Language:PLpgSQL 0.6%Language:HTML 0.5%Language:Sass 0.4%Language:Shell 0.3%Language:SCSS 0.1%