Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wcygan/yap
realtime messaging platform
https://github.com/wcygan/yap
Last synced: 2 days ago
JSON representation
realtime messaging platform
- Host: GitHub
- URL: https://github.com/wcygan/yap
- Owner: wcygan
- Created: 2024-04-21T04:53:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-02T22:36:22.000Z (7 months ago)
- Last Synced: 2024-05-23T04:22:37.344Z (6 months ago)
- Language: Go
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Real-time Chat Application
## Quick Start
Install [Minikube](https://minikube.sigs.k8s.io/docs/start/) and [Skaffold](https://skaffold.dev/docs/install/#standalone-binary), then run:
```
minikube start
skaffold dev
```Then, in another terminal start the CLI:
```
cd yap-cli
go run cmd/main.go
```## Protocol Buffers
To generate the protocol buffers, run:
```
buf generate proto
```## ScyllaDB
For ScyllaDB, you can do
```
kubectl port-forward svc/chat-db 9042:9042
```Alternatively, you can start a scylla pod using [cqlsh](https://opensource.docs.scylladb.com/stable/cql/cqlsh.html) like this:
Then you can run some queries:
```
kubectl exec -it $(kubectl get pods -l app=scylla -o jsonpath='{.items[0].metadata.name}') -- cqlsh
``````sql
USE chat;
DESCRIBE TABLES;
select * from messages;
```## Connecting to PostgreSQL Locally
Pick a postgres node (`postgres-69c569c6c9-wj2zx`):
```
k get po
NAME READY STATUS RESTARTS AGE
auth-service-7b47d6d967-cj82q 1/1 Running 0 26s
postgres-69c569c6c9-wj2zx 1/1 Running 0 28s
yap-api-75dbfb86b5-c9h9d 1/1 Running 0 24s```
Port forward it:
```
kubectl port-forward postgres-69c569c6c9-wj2zx 5432:5432
```or just do
```
kubectl port-forward svc/auth-db 5432:5432
```Use a Database Driver and a connection string similar to the following:
```
postgres://postgres:your-password-here@auth-db:5432/postgres?sslmode=disable
```I like [DataGrip](https://www.jetbrains.com/datagrip/) or the [IntelliJ Postgres Driver](https://www.jetbrains.com/help/idea/postgresql.html).