-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hacktoberfest: Swipe: A Peer to Peer Chat Application
A P2P Chat application in Node JS using Budo/Watchify module to bundle for browser. Tested on Mozilla Firefox 53.x Can be extended to Live streaming over network as well as quick file sharing. Signed-off-by: Progyan Bhattacharya <[email protected]>
- Loading branch information
Progyan Bhattacharya
committed
Oct 3, 2017
1 parent
508c632
commit b2588d2
Showing
10 changed files
with
534 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015", "stage-0", "react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"modules": true | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"parser": "babel-eslint", | ||
"rules": { | ||
"quotes": [2, "single"], | ||
"strict": [2, "never"], | ||
"react/jsx-uses-react": 2, | ||
"react/jsx-uses-vars": 2, | ||
"react/react-in-jsx-scope": 2 | ||
}, | ||
"plugins": [ | ||
"react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.sublime-project | ||
dist/ | ||
node_modules/ | ||
*.log | ||
*.sublime* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"node": true, | ||
"browser": true, | ||
"esnext": true, | ||
"newcap": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
| ||
ISC License (ISC) | ||
|
||
Copyright (c) 2016, Progyan Bhattacharya <[email protected]> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# *************************************************************************** | ||
# | ||
# Note: This file has been deprecated and exists for backward compatibility. | ||
# Please use package.json to add dependencies to the Node modules | ||
# your application requires. | ||
# | ||
# *************************************************************************** | ||
# | ||
|
||
# | ||
# For a list of globally installed modules - see file: npm_global_module_list. | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<!-- Metadata --> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> | ||
<meta name="description" content="PEER TO PEER CHAT" /> | ||
<meta name="keyword" content="peer, rtc, chat, swipe, progyan, nodejs" /> | ||
<meta name="author" content="Progyan Bhattacharya" /> | ||
<!--[if IE]> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<![endif]--> | ||
<title>SwiPE</title> | ||
<!-- BOOTSTRAP CORE STYLE CSS | ||
https://getbootstrap.com/ --> | ||
<link href="assets/css/bootstrap.css" rel="stylesheet" /> | ||
<!-- EMOTICONS --> | ||
<link href="assets/css/emoticons.css" rel="stylesheet" /> | ||
<!-- CUSTOM STYLE --> | ||
<link href="assets/css/style.css" rel="stylesheet" /> | ||
<!-- jQuery SCRIPT V1.12.3 --> | ||
<script src="assets/js/jquery-1.12.3.min.js" type="text/javascript"></script> | ||
<!-- BOOTSTRAP CORE SCRIPT JS | ||
https://getbootstrap.com/ --> | ||
<script src="assets/js/bootstrap.js" type="text/javascript"></script> | ||
<!-- CUSTOM SCRIPT --> | ||
<script src="node_modules/aria2/bundle.js"></script> | ||
<script src="assets/js/script.js" type="text/javascript"></script> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div class="head"> | ||
<h2>SwiPE</h2> | ||
<i>Swipe and Share</i> | ||
</div> | ||
<!-- Panel --> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="panel panel-primary"> | ||
<div class="panel-heading"> | ||
CONNECT TO PEERS | ||
</div> | ||
<div class="panel-body"> | ||
<div class="form-group"> | ||
<textarea class="form-control id_con" id="seed" placeholder="Your ID"></textarea> | ||
</div> | ||
<div class="form-group"> | ||
<textarea class="form-control id_con" id="peer" placeholder="Peer ID"></textarea> | ||
</div> | ||
<div class="form-group"> | ||
<button class="btn btn-info" type="button" id="connect"> CONNECT </button> | ||
<button class="btn btn-info" type="button" id="disconnect"> DISCONNECT </button> | ||
</div> | ||
<div class="panel-footer"> | ||
<span class="glyphicon glyphicon-calendar"></span> | ||
<span id="date_time"></span> | ||
<script type="text/javascript">window.onload = real_time('date_time');</script> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-8"> | ||
<div class="panel panel-info" id="chat_current"> | ||
<div class="panel-heading"> | ||
<div class="username"> PEER </div> | ||
<label id="lastseen">Offline</label> | ||
</div> | ||
<div class="panel-body" id="chat_box"> | ||
<!-- MESSAGES HERE --> | ||
<ul class="media-list" id="messages"> | ||
</ul> | ||
</div> | ||
<div class="panel-footer"> | ||
<div class="input-group" id="input"> | ||
<input type="text" class="form-control" id="message" autocomplete="off" placeholder="Enter Message" /> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-info" type="button" id="send"> | ||
<span class="glyphicon glyphicon-send"></span> | ||
</button> | ||
<button class="btn btn-info" type="button" id="attach"> | ||
<span class="glyphicon glyphicon-paperclip"></span> | ||
<input type="file" multiple id="file"/> | ||
</button> | ||
</span> | ||
</div> | ||
<div id="ftp"> | ||
<div id="status"></div> | ||
<div class="progress" id="progress"> | ||
<div class="progress-bar progress-bar-striped active" role="progressbar" | ||
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0px"></div> | ||
</div> | ||
<button class="btn btn-info" type="button" id="close"> Close </button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<footer class="footer"> | ||
<!-- Copyright --> | ||
<div class="copy"> | ||
<span class="anchor"> © Progyan Bhattacharya || CS50 Final Project || 2016 </span> | ||
<p class="license"> | ||
ISC License (ISC) | ||
Copyright © 2016, Progyan Bhattacharya <[email protected]> <br/> | ||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
</p> | ||
</div> | ||
</footer> | ||
<script type="text/javascript" src="bundle.js" charset="utf-8"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.