Skip to content

Commit

Permalink
feat: add emoij set
Browse files Browse the repository at this point in the history
  • Loading branch information
thuongtruong109 committed Dec 22, 2024
1 parent 3e7dfd2 commit 749ea55
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 60 deletions.
71 changes: 38 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,52 @@
![Build status](https://img.shields.io/github/actions/workflow/status/thuongtruong109/shakemate/build.yml?logo=GitHub&label=build)
![Image status](https://img.shields.io/docker/automated/thuongtruong1009/shakemate?logo=Docker&label=shakemate)
[![Image status](https://img.shields.io/docker/automated/thuongtruong1009/shakemate?logo=Docker&label=shakemate)](https://hub.docker.com/r/thuongtruong1009/shakemate)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fshakemate.onrender.com&up_color=blue&logo=webrtc)](https://shakemate.onrender.com)
[![Donate](https://img.shields.io/badge/Donate-PayPal-ff3f59.svg)](https://paypal.me/thuongtruong1009)
![License](https://img.shields.io/github/license/thuongtruong1009/short1url)
![License](https://img.shields.io/github/license/thuongtruong109/shakemate)

# shakemate

> 🖇️ Connect to temp peers via internal network without authentication
## Preview
## 🎫 Preview

![Preview](/public/preview.png)

## Motivation
![Preview 2](/public/preview_2.png)

## 🔥 Motivation

I wanted to create a simple way to connect to peers via internal network without any authentication. This is useful for temporary connections where you don't want to go through the hassle of creating an account or sharing a link. Just connect to the server and start sharing. Usecases include sharing files, camera, chat, etc.

## Features

- 📦 **Zero-config**: No need to configure anything, just run the server and connect to it
- 🌐 **Internal network**: Connect to the server via internal network
- 🚀 **Fast**: No authentication required, just connect and start sharing
- 📱 **Responsive**: Works on all devices
- 📡 **Real-time**: Uses WebRTC for real-time communication
- 📁 **File sharing**: Share files with peers
- 📹 **Camera sharing**: Share your camera with peers
- 💬 **Chat**: Chat with peers
- 🎧 **Audio sharing**: Share audio with peers
- 📝 **Rich text editor**: Write notes with rich text editor

## Tech Stack

- **Fastify x ejs**: Web framework for Node.js with EJS template engine
- **Socket.io**: Real-time communication library
- **Peerjs**: Simple peer-to-peer with WebRTC
- **Docker**: Containerization platform
- **FontAwesome**: Icon library
- **JavaScript/Typescript**: Programming language
- **HTML/CSS**: Markup and styling language
- **Tinymce**: Rich text editor

## How to use

with npm/yarn/...
## 🪶 Features

- 📦 **Zero-config**: No need to configure anything, just run the server and connect to it
- 🌐 **Internal network**: Connect to the server via internal network
- 🚀 **Fast**: No authentication required, just connect and start sharing
- 📱 **Responsive**: Works on all devices
- 📡 **Real-time**: Uses WebRTC for real-time communication
- 📁 **File sharing**: Share files with peers
- 📹 **Camera sharing**: Share your camera with peers
- 💬 **Chat**: Chat with peers
- 🎧 **Audio sharing**: Share audio with peers
- 📝 **Rich text editor**: Write notes with rich text editor

## 🏗️ Tech Stack

- **Fastify x ejs**: Web framework for Node.js with EJS template engine
- **Socket.io**: Real-time communication library
- **Peerjs**: Simple peer-to-peer with WebRTC
- **Docker**: Containerization platform
- **FontAwesome**: Icon library
- **JavaScript/Typescript**: Programming language
- **HTML/CSS**: Markup and styling language
- **Tinymce**: Rich text editor
- **Cloudinary**: Image hosting service

## 🔨 How to use

with npm/yarn/pnpm...

```bash
npm install
```
Expand All @@ -58,8 +63,8 @@ docker-compose up

-> Then open `http://localhost:3000` in your browser

## License
## 🪪 License

[MIT](LICENSE) © Thuong Truong, 2024

<!-- https://github.com/miqrc/fastify-typescript-docker-rest-api/blob/master/src/controllers/main.service.ts -->
<!-- https://github.com/miqrc/fastify-typescript-docker-rest-api/blob/master/src/controllers/main.service.ts -->
23 changes: 12 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
version: "3.7"
version: '3.7'

services:
app:
image: thuongtruong1009/shakemate
container_name: shakemate
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- .:/app
app:
image: thuongtruong1009/shakemate
container_name: shakemate
build:
context: .
dockerfile: Dockerfile
ports:
- '3000:3000'
volumes:
- .:/app
- /app/node_modules
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"name": "shakemate",
"description": "🖇️ Connect to temp peers via internal network without authentication",
"author": {
"name": "Tran Nguyen Thuong Truong",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/thuongtruong109/shakemate.git"
},
"version": "1.0.0",
"main": "dist/app.js",
"license": "MIT",
Expand Down
15 changes: 7 additions & 8 deletions public/assets/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&display=swap');

* {
padding: 0;
margin: 0;
Expand Down Expand Up @@ -36,7 +33,7 @@ body {
color: white;
font-weight: 600;
font-size: 3rem;
font-family: "Black Ops One", system-ui;
font-family: 'Black Ops One', system-ui;
font-style: normal;
}

Expand Down Expand Up @@ -207,7 +204,7 @@ body {
}

.chat .chat-content-message {
background: #F0F0F0;
background: #f0f0f0;
border-radius: 0.75rem;
padding: 5px 10px;
max-width: fit-content;
Expand All @@ -216,7 +213,7 @@ body {
.chat .chat-content-message.you {
text-align: right;
margin-left: auto;
background: #6CACE4;
background: #6cace4;
color: white;
}

Expand Down Expand Up @@ -319,7 +316,9 @@ span {
visibility: hidden;
}

.tox, .tox-tinymce, .tox-editor-container {
.tox,
.tox-tinymce,
.tox-editor-container {
max-height: 50px !important;
height: 50px !important;
width: 230px !important;
Expand All @@ -334,4 +333,4 @@ span {
width: 80px !important;
height: 80px !important;
overflow: hidden !important;
}
}
15 changes: 13 additions & 2 deletions public/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,16 @@
<link rel="stylesheet" href="/assets/css/styles.css" />
<link rel="stylesheet" href="/assets/css/responsive.css" />
<link rel="icon" type="image/png" href="/assets/favicon.png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Shakemate</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link
href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap"
rel="stylesheet"
/>
<link href="https://fonts.googleapis.com/css2?family=Black+Ops+One&display=swap" rel="stylesheet" />
<title>Shakemate</title>
Binary file added public/preview_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import handleWS from './utils/handleWebsocket';
dotenv.config();

const server = fastify({ logger: true });
const PORT = +Number.parseInt(process.env.PORT) || 3000;

(async () => {
try {
startCron();
Expand All @@ -36,14 +38,13 @@ const server = fastify({ logger: true });
fastify.get('/ws', { websocket: true }, handleWS(server.log));
});


server.listen({ port: 3000, host: '0.0.0.0' }, (err) => {
server.listen({ port: PORT, host: '0.0.0.0' }, (err) => {
if (err) {
console.error(err)
process.exit(1)
console.error(err);
process.exit(1);
}
console.log('Server listening at http://localhost:3000')
})
console.log(`::: -> Server listening at http://localhost:${PORT}`);
});
} catch (err) {
server.log.error(err);
process.exit(1);
Expand Down

0 comments on commit 749ea55

Please sign in to comment.