├── .github └── FUNDING.yml ├── icon.ico ├── img ├── 1.png ├── 2.png └── icon.png ├── package.json ├── CHANGELOG.md ├── default_app.js ├── .all-contributorsrc ├── CONTRIBUTING.md ├── LICENSE.md ├── main.js ├── README.md ├── css └── style.css ├── index.html ├── CODE_OF_CONDUCT.md └── js └── main.js /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: https://liberapay.com/DevCreatives/donate 2 | -------------------------------------------------------------------------------- /icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcreatives/Group-Chatting/development/icon.ico -------------------------------------------------------------------------------- /img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcreatives/Group-Chatting/development/img/1.png -------------------------------------------------------------------------------- /img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcreatives/Group-Chatting/development/img/2.png -------------------------------------------------------------------------------- /img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devcreatives/Group-Chatting/development/img/icon.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron", 3 | "productName": "Electron", 4 | "main": "main.js" 5 | } 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "Group Chatting" will be documented in this file. 4 | 5 | ## Group Chatting [1.0.0] - 2019-09-01 (Released) 6 | ### Added 7 | - Added firebase support added by [@viveksharmaui](https://github.com/viveksharmaui). 8 | - Added Electron JS support added by [@viveksharmaui](https://github.com/viveksharmaui). 9 | - Added vannila JS added by [@viveksharmaui](https://github.com/viveksharmaui). 10 | -------------------------------------------------------------------------------- /default_app.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron'); 2 | const app = electron.app; 3 | const BrowserWindow = electron.BrowserWindow; 4 | 5 | var mainWindow = null; 6 | 7 | // Quit when all windows are closed. 8 | app.on('window-all-closed', function() { 9 | app.quit(); 10 | }); 11 | 12 | app.on('ready', function() { 13 | mainWindow = new BrowserWindow({ 14 | width: 800, 15 | height: 600, 16 | autoHideMenuBar: true, 17 | useContentSize: true, 18 | }); 19 | mainWindow.loadURL('file://' + __dirname + '/index.html'); 20 | mainWindow.focus(); 21 | }); 22 | -------------------------------------------------------------------------------- /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "viveksharmaui", 10 | "name": "Slim Coder", 11 | "avatar_url": "https://avatars1.githubusercontent.com/u/28563357?v=4", 12 | "profile": "https://viveksharmaui.js.org", 13 | "contributions": [ 14 | "code", 15 | "infra", 16 | "bug", 17 | "doc", 18 | "test" 19 | ] 20 | } 21 | ], 22 | "contributorsPerLine": 7, 23 | "projectName": "EasyRTC-Peer-2-Peer-Video-Calling-React", 24 | "projectOwner": "Techistan", 25 | "repoType": "github", 26 | "repoHost": "https://github.com", 27 | "skipCi": true 28 | } 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution instructions 2 | 3 | ## Shipping a new functionality 4 | 5 | 1. You can only contribute on master branch. 6 | 2. Fork this repo. 7 | 3. Pull latest master branch. 8 | 4. Contribute something great. 9 | 5. Don't forget to write unit/integration/e2e/stress test. 10 | 6. Create pull request of your branch to master branch. 11 | 7. Wait for Travis CI test to be passed. 12 | 8. Wait for reviewer to review pull request file changes (This process can take upto few day's so relax). 13 | 9. Wait for admistrator to merge pull request with master branch. 14 | 10. After doing all above steps now wait to see your changes in master and in production (This process can takes upto few weeks or months when we RELEASED new version). 15 | 16 | 17 | **Happy Contributing** 18 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Group Chatting 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | var app = require('app'); // Module to control application life. 2 | var BrowserWindow = require('browser-window'); // Module to create native browser window. 3 | var path = require('path'); 4 | // Keep a global reference of the window object, if you don't, the window will 5 | // be closed automatically when the JavaScript object is garbage collected. 6 | var mainWindow = null; 7 | 8 | // Quit when all windows are closed. 9 | app.on('window-all-closed', function() { 10 | // On OS X it is common for applications and their menu bar 11 | // to stay active until the user quits explicitly with Cmd + Q 12 | if (process.platform != 'darwin') { 13 | app.quit(); 14 | } 15 | }); 16 | 17 | // This method will be called when Electron has finished 18 | // initialization and is ready to create browser windows. 19 | app.on('ready', function() { 20 | // Create the browser window. 21 | mainWindow = new BrowserWindow({ 22 | width: 900, 23 | height: 600, 24 | icon:path.join(__dirname, 'img/icon.png') 25 | }); 26 | // and load the index.html of the app. 27 | mainWindow.loadURL('file://' + __dirname + '/index.html'); 28 | // Emitted when the window is closed. 29 | mainWindow.on('closed', function() { 30 | // Dereference the window object, usually you would store windows 31 | // in an array if your app supports multi windows, this is the time 32 | // when you should delete the corresponding element. 33 | mainWindow = null; 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) 4 | 5 | 6 | ## Contributors ✨ 7 | 8 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

Slim Coder

💻 🚇 🐛 📖 ⚠️
18 | 19 | 20 | 21 | 22 | 23 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! 24 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-size: contain; 4 | } 5 | #container 6 | { 7 | background-color:#ECF0F1; 8 | box-shadow:15px 15px 15px rgba(100,100,100,0.3); 9 | border-radius:5px; 10 | overflow-y:scroll; 11 | height:80%; 12 | margin-top:5px; 13 | } 14 | #container div div div p:hover 15 | { 16 | font-size:30px; 17 | } 18 | #container::-webkit-scrollbar { 19 | width: 1em; 20 | } 21 | 22 | #container::-webkit-scrollbar-track { 23 | -webkit-box-shadow: inset 6px 6px 6px rgba(0,0,0,0.1); 24 | border-top-right-radius:4px; 25 | border-bottom-left-radius:4px; 26 | } 27 | 28 | #container::-webkit-scrollbar-thumb { 29 | background-color: rgba(11,11,11,0.7) ; 30 | border-radius:3px; 31 | } 32 | #div 33 | { 34 | border-bottom:2px solid rgba(112,112,112,0.1); 35 | } 36 | #formsubmit 37 | { 38 | position: absolute; 39 | top:0px; 40 | padding-left:40%; 41 | padding-bottom:100%; 42 | padding-right:100%; 43 | visibility: hidden; 44 | } 45 | #select img 46 | { 47 | width:25%; 48 | height:40%; 49 | position: absolute; 50 | left:37%; 51 | border-radius:100px; 52 | } 53 | #select h4 54 | { 55 | position:absolute; 56 | padding-left:40%; 57 | border-bottom:5px solid rgba(111,111,11,0.3); 58 | top:45%; 59 | font-size:50px; 60 | } 61 | #select p 62 | { 63 | position: absolute; 64 | background-color:white; 65 | top:55%; 66 | width:100%; 67 | height:30%; 68 | overflow-y: scroll; 69 | font-size:30px; 70 | } 71 | #select p::-webkit-scrollbar { 72 | width: 0.4em; 73 | } 74 | 75 | #select p::-webkit-scrollbar-track { 76 | -webkit-box-shadow: inset 6px 6px 6px rgba(0,0,0,0.1); 77 | border-top-right-radius:4px; 78 | border-bottom-left-radius:4px; 79 | } 80 | 81 | #select p::-webkit-scrollbar-thumb { 82 | background-color: rgba(11,11,11,0.7) ; 83 | border-radius:3px; 84 | } 85 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ChatEasy 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 |
18 |
19 | 20 | 21 | 22 | 23 |
24 |
25 |
26 |
27 | 28 | 29 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at sharma_vivek62@yahoo.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | var database = firebase.database(); 2 | var name=localStorage.getItem("name") ; 3 | var NAME = []; 4 | var chat=localStorage.getItem("chat"); 5 | var CHAT = []; 6 | var counter ; 7 | var gender=localStorage.getItem("gender"); 8 | var GENDER = []; 9 | var date; 10 | var DATE = []; 11 | var Id=0 ; 12 | var USERNAME=[]; 13 | var PASSWORD=[]; 14 | var LOGINGENDER=[]; 15 | var password=localStorage.getItem("password"); 16 | var interval=setInterval(myMethod, 10000); 17 | myMethod(); 18 | if(gender==null || name==null || name==undefined) 19 | { 20 | } 21 | else { 22 | var navbar = document.getElementById('navbar'); 23 | navbar.innerHTML = "

User : "+ name.charAt(0).toUpperCase()+name.slice(1).toLowerCase()+"

"; 24 | document.getElementById('btnb').style.display="inline"; 25 | document.getElementById('btnc').style.display="inline"; 26 | document.getElementById('btna').style.display="none"; 27 | document.getElementById('btnd').style.display="none"; 28 | } 29 | function newUser() 30 | { 31 | var male =document.getElementById('male'); 32 | var female = document.getElementById('female'); 33 | var other = document.getElementById('other'); 34 | var getname = document.getElementById('name'); 35 | password = document.getElementById('password'); 36 | localStorage.setItem("password",password.value); 37 | name = getname.value.toLowerCase(); 38 | localStorage.setItem("name",name); 39 | if (name!='' && password!='') { 40 | if(male.checked==true) 41 | { 42 | gender = male.value; 43 | localStorage.setItem("gender",gender); 44 | } 45 | else if(female.checked==true) 46 | { 47 | gender = female.value; 48 | localStorage.setItem("gender",gender); 49 | } 50 | else 51 | { 52 | gender = other.value; 53 | localStorage.setItem("gender",gender); 54 | } 55 | } 56 | redirect(); 57 | } 58 | function addChat(){ 59 | var inputText = document.getElementById('input'); 60 | if (inputText.value=='') { 61 | alert('Please Enter Your Message'); 62 | } 63 | else{ 64 | chat = inputText.value.charAt(0).toUpperCase()+inputText.value.slice(1).toLowerCase(); 65 | date = Date(); 66 | } 67 | save(); 68 | inputText.value = ''; 69 | } 70 | function myMethod(){ 71 | database.ref('chatapplicationdata/').once('value').then(function(snapshot) { 72 | for(var i in snapshot.val()){ 73 | NAME[Id]= snapshot.val()[i].name; 74 | CHAT[Id]= snapshot.val()[i].chat; 75 | GENDER[Id]= snapshot.val()[i].gender; 76 | DATE[Id]= snapshot.val()[i].date; 77 | Id++; 78 | }}); 79 | render(); 80 | } 81 | function render() 82 | { 83 | var container = document.getElementById('container'); 84 | container.innerHTML = ''; 85 | for(var j=Id-1; j>=0 ; j--) 86 | { 87 | if(GENDER[j]=="female") 88 | {container.innerHTML += "

"+NAME[j].charAt(0).toUpperCase()+NAME[j].slice(1).toLowerCase()+"

"+CHAT[j]+"

"+DATE[j]+"
";} 89 | else 90 | {container.innerHTML += "

"+NAME[j].charAt(0).toUpperCase()+NAME[j].slice(1).toLowerCase()+"

"+CHAT[j]+"

"+DATE[j]+"
";} 91 | } 92 | Id=0; 93 | } 94 | function save() 95 | { 96 | database.ref('chatapplicationdata/').push({ 97 | chat, 98 | name, 99 | gender, 100 | password, 101 | date 102 | }); 103 | myMethod(); 104 | redirect(); 105 | } 106 | function modala() 107 | { 108 | document.getElementById('formsubmit').style.visibility="visible"; 109 | document.getElementById('container').style.display="none"; 110 | document.getElementById('formsubmit').style.backgroundColor="rgba(200,200,200,1)"; 111 | document.getElementById('formsubmit').innerHTML='


Gender

Male
Female
Other
'; 112 | } 113 | function modalb() 114 | { 115 | document.getElementById('formsubmit').style.visibility="visible"; 116 | document.getElementById('container').style.display="none"; 117 | document.getElementById('formsubmit').innerHTML='


'; 118 | } 119 | function redirect() 120 | { 121 | window.location="index.html"; 122 | } 123 | function logout() 124 | { 125 | var logout= confirm("Are You Sure You Wanna Logout ? "); 126 | if ( logout== true) { 127 | localStorage.clear(); 128 | redirect(); 129 | } else { 130 | redirect(); 131 | } 132 | } 133 | function login() 134 | { 135 | document.getElementById('formsubmit').style.visibility="visible"; 136 | document.getElementById('container').style.display="none"; 137 | document.getElementById('formsubmit').innerHTML='


'; 138 | } 139 | function checkLogin() 140 | { 141 | var username = document.getElementById('loginusername'); 142 | var password = document.getElementById('loginpassword'); 143 | if(username.value!="" && password.value!="") 144 | { 145 | database.ref('chatapplicationdata/').once('value').then(function(snapshot) { 146 | for(var i in snapshot.val()){ 147 | if(snapshot.val()[i].name==username.value.toLowerCase() && snapshot.val()[i].password==password.value) 148 | { 149 | localStorage.setItem("name",snapshot.val()[i].name); 150 | localStorage.setItem("password",snapshot.val()[i].password); 151 | localStorage.setItem("gender",snapshot.val()[i].gender); 152 | redirect(); 153 | } 154 | else { 155 | login(); 156 | } 157 | }}); 158 | } 159 | } 160 | function showitem(Id) 161 | { 162 | document.getElementById('div').style.display="none"; 163 | document.getElementById('navbar').style.display="none"; 164 | document.getElementById('formsubmit').style.visibility="none"; 165 | document.getElementById('container').style.display="none"; 166 | document.getElementById('showitem').style.display="inline-block"; 167 | if(GENDER[Id]=="female") 168 | { document.getElementById('showitem').innerHTML= "

"+NAME[Id].charAt(0).toUpperCase()+NAME[Id].slice(1).toLowerCase()+"

"+CHAT[Id]+"

";} 169 | else 170 | {document.getElementById('showitem').innerHTML= "

"+NAME[Id].charAt(0).toUpperCase()+NAME[Id].slice(1).toLowerCase()+"

"+CHAT[Id]+"

";} 171 | } 172 | --------------------------------------------------------------------------------