diff --git a/Dockerfile b/Dockerfile index 87ec1f5a..251291ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM node:14 -WORKDIR /app +WORKDIR /src RUN apt-get update RUN apt-get install vim -y @@ -9,10 +9,8 @@ COPY package.json . RUN npm install -COPY api api +COPY app app COPY public public -COPY src src -COPY ssl ssl EXPOSE 3010/tcp EXPOSE 40000-40100/tcp diff --git a/README.md b/README.md index 62704fbe..9f3b378c 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Open the app with the following **supported browsers** & many more... - Recording your Screen, Audio or Video - Share any YouTube video in real time to your participants - Full Screen Mode on mouse click on the Video element -- Supports [REST API](api/README.md) (Application Programming Interface) +- Supports [REST API](app/api/README.md) (Application Programming Interface) ## DigitalOcean diff --git a/api/README.md b/app/api/README.md similarity index 100% rename from api/README.md rename to app/api/README.md diff --git a/api/meeting.js b/app/api/meeting.js similarity index 100% rename from api/meeting.js rename to app/api/meeting.js diff --git a/api/meeting.php b/app/api/meeting.php similarity index 100% rename from api/meeting.php rename to app/api/meeting.php diff --git a/api/meeting.py b/app/api/meeting.py similarity index 100% rename from api/meeting.py rename to app/api/meeting.py diff --git a/api/meeting.sh b/app/api/meeting.sh similarity index 100% rename from api/meeting.sh rename to app/api/meeting.sh diff --git a/api/restAPI.png b/app/api/restAPI.png similarity index 100% rename from api/restAPI.png rename to app/api/restAPI.png diff --git a/src/Logger.js b/app/src/Logger.js similarity index 100% rename from src/Logger.js rename to app/src/Logger.js diff --git a/src/Peer.js b/app/src/Peer.js similarity index 100% rename from src/Peer.js rename to app/src/Peer.js diff --git a/src/Room.js b/app/src/Room.js similarity index 100% rename from src/Room.js rename to app/src/Room.js diff --git a/src/Server.js b/app/src/Server.js similarity index 97% rename from src/Server.js rename to app/src/Server.js index 73220920..c7835279 100644 --- a/src/Server.js +++ b/app/src/Server.js @@ -35,7 +35,7 @@ let roomList = new Map(); app.use(cors()); app.use(compression()); -app.use(express.static(path.join(__dirname, '..', 'public'))); +app.use(express.static(path.join(__dirname, '../../', 'public'))); // Remove trailing slashes in url handle bad requests app.use((err, req, res, next) => { @@ -57,22 +57,22 @@ app.use((err, req, res, next) => { // all start from here app.get(['/'], (req, res) => { - res.sendFile(path.join(__dirname, '..', 'public/landing.html')); + res.sendFile(path.join(__dirname, '../../', 'public/view/landing.html')); }); // set new room name and join app.get(['/newroom'], (req, res) => { - res.sendFile(path.join(__dirname, '..', 'public/newroom.html')); + res.sendFile(path.join(__dirname, '../../', 'public/view/newroom.html')); }); // if not allow video/audio app.get(['/permission'], (req, res) => { - res.sendFile(path.join(__dirname, '..', 'public/permission.html')); + res.sendFile(path.join(__dirname, '../../', 'public/view/permission.html')); }); // privacy policy app.get(['/privacy'], (req, res) => { - res.sendFile(path.join(__dirname, '..', 'public/privacy.html')); + res.sendFile(path.join(__dirname, '../../', 'public/view/privacy.html')); }); // no room name specified to join @@ -86,7 +86,7 @@ app.get('/join/*', (req, res) => { log.debug('redirect:' + req.url + ' to ' + url.parse(req.url).pathname); res.redirect(url.parse(req.url).pathname); } else { - res.sendFile(path.join(__dirname, '..', 'public/Room.html')); + res.sendFile(path.join(__dirname, '../../', 'public/view/Room.html')); } }); diff --git a/src/ServerApi.js b/app/src/ServerApi.js similarity index 100% rename from src/ServerApi.js rename to app/src/ServerApi.js diff --git a/src/config.template.js b/app/src/config.template.js similarity index 100% rename from src/config.template.js rename to app/src/config.template.js diff --git a/ssl/README.md b/app/ssl/README.md similarity index 100% rename from ssl/README.md rename to app/ssl/README.md diff --git a/ssl/cert.pem b/app/ssl/cert.pem similarity index 100% rename from ssl/cert.pem rename to app/ssl/cert.pem diff --git a/ssl/https.png b/app/ssl/https.png similarity index 100% rename from ssl/https.png rename to app/ssl/https.png diff --git a/ssl/key.pem b/app/ssl/key.pem similarity index 100% rename from ssl/key.pem rename to app/ssl/key.pem diff --git a/package.json b/package.json index dbe2bbff..7c164970 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "Server.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "node src/Server.js", - "compile": "npx browserify public/modules/MediasoupClientCompile.js -o public/modules/MediasoupClient.js", + "start": "node app/src/Server.js", + "compile": "npx browserify public/sfu/MediasoupClientCompile.js -o public/sfu/MediasoupClient.js", "lint": "npx prettier --write ." }, "author": "Miroslav Pejic", diff --git a/public/modules/MediasoupClient.js b/public/sfu/MediasoupClient.js similarity index 100% rename from public/modules/MediasoupClient.js rename to public/sfu/MediasoupClient.js diff --git a/public/modules/MediasoupClientCompile.js b/public/sfu/MediasoupClientCompile.js similarity index 100% rename from public/modules/MediasoupClientCompile.js rename to public/sfu/MediasoupClientCompile.js diff --git a/public/Room.html b/public/view/Room.html similarity index 96% rename from public/Room.html rename to public/view/Room.html index 45cc86ab..98f7fdc5 100644 --- a/public/Room.html +++ b/public/view/Room.html @@ -17,8 +17,8 @@ MiroTalk SFU - Room Video Calls, Messaging and Screen Sharing. - - + + @@ -42,12 +42,12 @@ property="og:description" content="MiroTalk SFU calling provides real-time video calls, messaging and screen sharing." /> - + - - + + @@ -72,10 +72,10 @@ - - - - + + + + diff --git a/public/landing.html b/public/view/landing.html similarity index 91% rename from public/landing.html rename to public/view/landing.html index c1e9709a..a0596514 100644 --- a/public/landing.html +++ b/public/view/landing.html @@ -17,8 +17,8 @@ MiroTalk SFU - Free Video Calls, Messaging and Screen Sharing. - - + + @@ -44,11 +44,11 @@ property="og:description" content="MiroTalk SFU calling provides real-time video calls, messaging and screen sharing." /> - + - + @@ -63,7 +63,7 @@

- mirotalk-logo + mirotalk-logo

@@ -130,7 +130,7 @@
- mirotalksfu-screen + mirotalksfu-screen

Screen Sharing

@@ -142,7 +142,7 @@

- mirotalksfu-webcam + mirotalksfu-webcam

WebCam Streaming

@@ -154,7 +154,7 @@

- mirotalksfu-audio + mirotalksfu-audio

Audio Streaming

@@ -165,7 +165,7 @@

- mirotalksfu-chat + mirotalksfu-chat

Chat

@@ -177,7 +177,7 @@

- mirotalksfu-recording + mirotalksfu-recording

Recording meeting

@@ -189,7 +189,7 @@

- mirotalksfu-whiteboard + mirotalksfu-whiteboard

Collaborative Whiteboard

@@ -201,7 +201,7 @@

- mirotalksfu-filesharing + mirotalksfu-filesharing

File Sharing

@@ -212,7 +212,7 @@

- mirotalksfu-privacy + mirotalksfu-privacy

Total privacy

@@ -224,7 +224,7 @@

- mirotalksfu-security + mirotalksfu-security

Maximum security

@@ -242,7 +242,7 @@

Meet the team

- Team member author + Team member author
Miroslav Pejic
@@ -271,7 +271,7 @@
- + diff --git a/public/newroom.html b/public/view/newroom.html similarity index 95% rename from public/newroom.html rename to public/view/newroom.html index 2acfaebf..454e397e 100755 --- a/public/newroom.html +++ b/public/view/newroom.html @@ -17,8 +17,8 @@ MiroTalk SFU - Create your Room name and start the new call. - - + + @@ -44,11 +44,11 @@ property="og:description" content="MiroTalk SFU calling provides real-time video calls, messaging and screen sharing." /> - + - + @@ -63,7 +63,7 @@ @@ -136,7 +136,7 @@ - - + + diff --git a/public/permission.html b/public/view/permission.html similarity index 95% rename from public/permission.html rename to public/view/permission.html index 37706b24..d357daac 100755 --- a/public/permission.html +++ b/public/view/permission.html @@ -17,8 +17,8 @@ MiroTalk SFU - Allow Video or Audio access to join in the Room. - - + + @@ -35,12 +35,12 @@ property="og:description" content="MiroTalk SFU calling provides real-time HD quality and latency simply not available with traditional technology." /> - + - + @@ -55,7 +55,7 @@ @@ -117,7 +117,7 @@ - + diff --git a/public/privacy.html b/public/view/privacy.html similarity index 95% rename from public/privacy.html rename to public/view/privacy.html index c45565f3..a35d9870 100755 --- a/public/privacy.html +++ b/public/view/privacy.html @@ -17,8 +17,8 @@ MiroTalk SFU - privacy policy. - - + + @@ -35,12 +35,12 @@ property="og:description" content="MiroTalk SFU calling provides real-time HD quality and latency simply not available with traditional technology." /> - + - + @@ -55,7 +55,7 @@ @@ -113,7 +113,7 @@ - +