Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
2a04994
make room for alternative clients
LarsGJobloop Jun 18, 2023
fe2c7da
generate boilerplate
LarsGJobloop Jun 18, 2023
650cc7f
generate lockfile
LarsGJobloop Jun 18, 2023
d01f0aa
setup Dockerfile
LarsGJobloop Jun 18, 2023
872c14d
refine design sktech
LarsGJobloop Jun 18, 2023
3a11cf6
setup default palette
LarsGJobloop Jun 18, 2023
1e14095
update title
LarsGJobloop Jun 18, 2023
6857eba
set font type
LarsGJobloop Jun 18, 2023
e29db34
cleaned out demo app
LarsGJobloop Jun 18, 2023
4cbd9bf
setup custom favicon
LarsGJobloop Jun 18, 2023
1a3da8e
add ui-ux design file
LarsGJobloop Jun 18, 2023
9b414e6
import global css files
LarsGJobloop Jun 18, 2023
d5ddfa6
add react-router
LarsGJobloop Jun 18, 2023
14aaf1a
fix wrong dependency
LarsGJobloop Jun 18, 2023
41130a6
component: add AddRoom
LarsGJobloop Jun 18, 2023
16b8231
component: Admin
LarsGJobloop Jun 18, 2023
9f31640
fix wrong file extension
LarsGJobloop Jun 18, 2023
780e098
update design sketch
LarsGJobloop Jun 18, 2023
0f451f1
setup skeleton
LarsGJobloop Jun 18, 2023
5d34c15
add prettier
LarsGJobloop Jun 18, 2023
0122128
format project
LarsGJobloop Jun 18, 2023
11bb0d0
setup script
LarsGJobloop Jun 18, 2023
510a929
add skeleton routes components
LarsGJobloop Jun 18, 2023
2861cfa
add mock not connected
LarsGJobloop Jun 18, 2023
9507b79
add guard against room not connected
LarsGJobloop Jun 18, 2023
0158ef9
add nats.ws
LarsGJobloop Jun 18, 2023
3dfaaa8
refactor rename
LarsGJobloop Jun 18, 2023
409e213
refactor rename
LarsGJobloop Jun 18, 2023
3f573fa
add specific name to server
LarsGJobloop Jun 18, 2023
7d8b962
add field list of servers
LarsGJobloop Jun 18, 2023
b2876a7
switch to server ids
LarsGJobloop Jun 18, 2023
dc0b168
add type serverUrl
LarsGJobloop Jun 18, 2023
3b318ac
add dep uuid
LarsGJobloop Jun 18, 2023
ceb7205
add types for uuid
LarsGJobloop Jun 18, 2023
1fb4be6
setup chat service files
LarsGJobloop Jun 18, 2023
5605da8
format
LarsGJobloop Jun 18, 2023
45eed64
docs refined design sketch
LarsGJobloop Jun 18, 2023
11e4d56
remove nested router route
LarsGJobloop Jun 18, 2023
401b1c5
set server default to dev mode
LarsGJobloop Jun 18, 2023
b411090
really messy commit, its working tough
LarsGJobloop Jun 18, 2023
a8f0076
tidy
LarsGJobloop Jun 18, 2023
92761d9
extracted context
LarsGJobloop Jun 18, 2023
a714c4a
fix mangled import
LarsGJobloop Jun 18, 2023
f2b55a5
format project
LarsGJobloop Jun 18, 2023
40258c3
extract chat input
LarsGJobloop Jun 18, 2023
39167d4
extract feed
LarsGJobloop Jun 18, 2023
3e1b074
extracted connection logic
LarsGJobloop Jun 18, 2023
4c24ebc
format project
LarsGJobloop Jun 18, 2023
78159aa
extract remaining connection logic
LarsGJobloop Jun 18, 2023
19bf572
tidy up typing
LarsGJobloop Jun 18, 2023
d6a537c
tidy
LarsGJobloop Jun 18, 2023
09ce2b1
add css spacing variables
LarsGJobloop Jun 18, 2023
abb320f
fix css spacing variables
LarsGJobloop Jun 18, 2023
f748ab5
add basic styling to lobby
LarsGJobloop Jun 18, 2023
a1b334e
add styling to room layout
LarsGJobloop Jun 18, 2023
a884b2d
add basic styling to room
LarsGJobloop Jun 18, 2023
26f29dd
add basic css to message feed
LarsGJobloop Jun 18, 2023
18a4ac7
add some basic styling to chat input
LarsGJobloop Jun 18, 2023
15ae080
fix missing favicon
LarsGJobloop Jun 18, 2023
6b1ac9f
vite plugin compression
LarsGJobloop Jun 18, 2023
a8d6f3a
setup vite compression plugin
LarsGJobloop Jun 18, 2023
0fa0c30
add client server config
LarsGJobloop Jun 18, 2023
5f70105
disable client server config
LarsGJobloop Jun 18, 2023
c6e016b
update design sketch
LarsGJobloop Jun 20, 2023
2850c84
setup docker compose
LarsGJobloop Jun 20, 2023
2535786
update docs
LarsGJobloop Jun 20, 2023
0e3c87f
update external ports
LarsGJobloop Jun 20, 2023
3ad4f75
add docs to client
LarsGJobloop Jun 20, 2023
44510f8
cleanup folder for clients
LarsGJobloop Jun 20, 2023
9fb3cc8
rename message brooker
LarsGJobloop Jun 20, 2023
d8b9e61
update compose file with new folder names
LarsGJobloop Jun 20, 2023
3422b39
cleanup
LarsGJobloop Jun 20, 2023
560b75c
add architecture diagram
LarsGJobloop Jun 20, 2023
9d4f5f1
update docs with new diagram
LarsGJobloop Jun 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,53 @@

R Mess aims to be a realtime messaging application learning experience.

## Architecture

![Architecture Diagram](./docs/architecture.png)

- Static File Server
Delivers the Application files to the client, along with brooker adress
- Application
Frontend application for interacting with the chat room and connecting to the...
- Message Brooker
Responsible for accepting new subscriptions and publishing messages to subscribers

## Goal

- Frontend
- Chat Client
Some way of Reading and Posting messages.
- Creating and/or entering rooms
- Publishing and listening for messages in a room
- Framework [React](https://react.dev/)

- Backend
- Message Brooker, using the Publication-Subscription pattern
Some way of accepting messages and distributing them to all online clients.
- Message Brooker
- Enables clients to subscribe to rooms, publish messages and recive messages from other online clients
- ?? Persistance ??
- Framework [Nats](https://nats.io/)

## How to run

1. Ensure you have some way to run Docker Compose files
- Windows
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
- iOS
- [OrbStack](https://orbstack.dev/)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
- Linux
- [Docker Engine](https://docs.docker.com/engine/install/ubuntu/)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)

2. From the project root folder run ```$ docker compose up```

3. Open up open your browser and navigate to **http://localhost:5000**

## References

- [Publication Subscription Pattern](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern)
- [Connection Websockets](https://en.wikipedia.org/wiki/WebSocket)
- [Containers (Docker)](https://www.docker.com/resources/what-container/)
- [Lightweight Orchestration (Docker Compose)](https://docs.docker.com/compose/)

### Languages

Expand Down
5 changes: 0 additions & 5 deletions backend/Dockerfile

This file was deleted.

6 changes: 2 additions & 4 deletions client/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ module.exports = {
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
settings: { react: { version: "18.2" } },
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": "warn",
"react/prop-types": "off",
},
};
1 change: 1 addition & 0 deletions client/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
1 change: 0 additions & 1 deletion client/.prettierrc.json

This file was deleted.

4 changes: 1 addition & 3 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM lipanski/docker-static-website:latest

COPY ./server.config .

COPY ./dist .

CMD ["/busybox", "httpd", "-f", "-v", "-p", "3000", "-c", "server.config"]
CMD ["/busybox", "httpd", "-f", "-v", "-p", "80"]
12 changes: 10 additions & 2 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>R Mess</title>

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Oswald&display=swap"
rel="stylesheet"
/>

<title>R-Mess</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading