Skip to content

Commit

Permalink
update models to be able to sync with sequalize
Browse files Browse the repository at this point in the history
  • Loading branch information
Emengkeng committed Oct 17, 2023
1 parent d16feae commit 353cb53
Show file tree
Hide file tree
Showing 35 changed files with 1,371 additions and 613 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jspm_packages/

# Logs
logs
sequalize_command.txt
logs.txt
*.log
npm-debug.log*
Expand Down
134 changes: 134 additions & 0 deletions NEWREADME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Unite - Video Conferencing Web App
## Submission for Microsoft Engage 2021 🌟

[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Apurva-tech/unite?logo=github&style=for-the-badge)](https://github.com/Apurva-tech/)
[![GitHub last commit](https://img.shields.io/github/last-commit/Apurva-tech/unite?style=for-the-badge&logo=git)](https://github.com/Apurva-tech/)
[![GitHub stars](https://img.shields.io/github/stars/Apurva-tech/unite?style=for-the-badge)](https://github.com/Apurva-tech/unite/stargazers)
[![My stars](https://img.shields.io/github/stars/Apurva-tech?affiliations=OWNER%2CCOLLABORATOR&style=for-the-badge&label=My%20stars)](https://github.com/Apurva-tech/unite/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/Apurva-tech/unite?style=for-the-badge&logo=git)](https://github.com/Apurva-tech/unite/network)
[![Code size](https://img.shields.io/github/languages/code-size/Apurva-tech/unite?style=for-the-badge)](https://github.com/Apurva-tech/unite)
[![Languages](https://img.shields.io/github/languages/count/Apurva-tech/unite?style=for-the-badge)](https://github.com/Apurva-tech/unite)
[![Top](https://img.shields.io/github/languages/top/Apurva-tech/unite?style=for-the-badge&label=Top%20Languages)](https://github.com/Apurva-tech/unite)
[![Issues](https://img.shields.io/github/issues/Apurva-tech/unite?style=for-the-badge&label=Issues)](https://github.com/Apurva-tech/unite)
[![Watchers]( https://img.shields.io/github/watchers/Apurva-tech/unite?label=Watch&style=for-the-badge)](https://github.com/Apurva-tech/unite/)

Video conferencing solutions with `Unite`
using peer-to-peer connection.

<p align="center">
<a href="https://unite-apurva.herokuapp.com/landing">
<img src="https://user-images.githubusercontent.com/59837325/125489372-57d3ad66-fb25-40f8-8d54-5514cbe4b648.png" alt="Unite-logo"/>
</a>
</p>

[![Generic badge](https://img.shields.io/badge/view-demo-blue?style=for-the-badge&label=View%20Demo%20Video)](https://youtu.be/OKKK1GOnlIU)

## Features and Interfaces

1. Landing Page and Feeback Form
- Seamless landing page with `Login with Google` button for user Login using Firebase Authentication
- ![image](https://user-images.githubusercontent.com/59837325/125426848-39db8eeb-3e84-424d-869c-5b344ba55ba1.png)

- One of the most important part of Agile is feedback, therefore the app has a feedback form in the footer
- ![image](https://user-images.githubusercontent.com/59837325/125427701-f6aed5f3-ca93-4cf7-8480-40d42b87e46b.png)

- Witness by journey of these 4 weeks, through a concise timeline on my landing page
- ![image](https://user-images.githubusercontent.com/59837325/125429293-88f38afe-be80-47ff-b662-2169d87bc476.png)

2. Home page
- Has a signout button with app cards for different features and left division shows the rooms created by user as well as recent rooms visited
- ![image](https://user-images.githubusercontent.com/59837325/125428224-08fcf962-46af-470a-abae-aaa893d2e0c7.png)

- Toggle between dark-light using the moon icon, according to your preference
- ![image](https://user-images.githubusercontent.com/59837325/125429518-79515f76-8392-413a-9d19-53894db9ee95.png)

- Preview app cards for the application
- ![image](https://user-images.githubusercontent.com/59837325/125429888-3f23518a-e1c1-4500-a345-c5735cf1a8ff.png)

3. Create Meeting
- Create a room and invite people to join by copying the meeting code
- ![image](https://user-images.githubusercontent.com/59837325/125431140-7f0a92a8-ca4c-48b5-a91d-e53e69b12cb5.png)

- Enter the common chat room that **persist the messages** using MongoDB
- ![image](https://user-images.githubusercontent.com/59837325/125432255-d9e05582-5ae0-4b2f-8a07-dba9605a4b6d.png)

4. Join Meeting
- Enter the copied meeting ID in a form and join the room with your loved ones.
- ![image](https://user-images.githubusercontent.com/59837325/125438181-fd819177-cb36-45bb-a7dd-8acfa5e21b66.png)

5. Video calling & Persistent text chat
- Chat with your friends, family and professional peers before, during and after the meeting.
- ![image](https://user-images.githubusercontent.com/59837325/125486957-00bbd600-02ea-4f4f-b040-fc5d25db3251.png)
- ![image](https://user-images.githubusercontent.com/59837325/125486640-4ff2bdb8-b2ec-40f8-96c1-4dbdae007af3.png)

- Screen Share options
- ![image](https://user-images.githubusercontent.com/59837325/125486807-1b603597-eb1d-4758-9cb2-d1d34f8462c4.png)

6. Schedule Meeting
- Schedule Meeting with Google Calendar and invite people by just entering their email addresses and the app schedules a meet for you with a unique meeting ID as well!
- ![image](https://user-images.githubusercontent.com/59837325/125440936-e8d4141a-c7b8-4577-b5b0-4cba3d9e63ab.png)

- Mail sent on scheduling a meeting
- ![image](https://user-images.githubusercontent.com/59837325/125441421-ee5199d3-3165-43c0-88d6-f9328477dfe2.png)
- ![image](https://user-images.githubusercontent.com/59837325/125441435-d1a53547-bb63-4b81-97e1-95d005298bac.png)

7. AI powered posture bot
- Using `Tf.js` posenet model, the bot notifies the user if they are sitting in a bad posture or too close to the screen.
- Keep your health in check and use this functionality with and without even being in a meeting
- ![image](https://user-images.githubusercontent.com/59837325/125442368-2b7b4202-9f07-4d9a-9122-69b221a03ef9.png)

## Tech stack

![image](https://user-images.githubusercontent.com/59837325/125461960-da7d575b-b1e8-43f4-ae22-6f3403df44d1.png)

### Tools and Languages:
<p align="left"> <a href="https://getbootstrap.com" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/bootstrap/bootstrap-plain-wordmark.svg" alt="bootstrap" width="40" height="40"/> </a> <a href="https://www.w3schools.com/css/" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/css3/css3-original-wordmark.svg" alt="css3" width="40" height="40"/> </a> <a href="https://expressjs.com" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/express/express-original-wordmark.svg" alt="express" width="40" height="40"/> </a> <a href="https://firebase.google.com/" target="_blank"> <img src="https://www.vectorlogo.zone/logos/firebase/firebase-icon.svg" alt="firebase" width="40" height="40"/> </a> <a href="https://cloud.google.com" target="_blank"> <img src="https://www.vectorlogo.zone/logos/google_cloud/google_cloud-icon.svg" alt="gcp" width="40" height="40"/> </a> <a href="https://git-scm.com/" target="_blank"> <img src="https://www.vectorlogo.zone/logos/git-scm/git-scm-icon.svg" alt="git" width="40" height="40"/> </a> <a href="https://heroku.com" target="_blank"> <img src="https://www.vectorlogo.zone/logos/heroku/heroku-icon.svg" alt="heroku" width="40" height="40"/> </a> <a href="https://www.w3.org/html/" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-original-wordmark.svg" alt="html5" width="40" height="40"/> </a> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/> </a> <a href="https://www.mongodb.com/" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/mongodb/mongodb-original-wordmark.svg" alt="mongodb" width="40" height="40"/> </a> <a href="https://nodejs.org" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/nodejs/nodejs-original-wordmark.svg" alt="nodejs" width="40" height="40"/> </a> <a href="https://sass-lang.com" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/sass/sass-original.svg" alt="sass" width="40" height="40"/> </a> <a href="https://www.tensorflow.org" target="_blank"> <img src="https://www.vectorlogo.zone/logos/tensorflow/tensorflow-icon.svg" alt="tensorflow" width="40" height="40"/> </a> </p>

## Points to remember while testing the app

1. Allow **permissions** for camera and mic
2. In case any **user is not broadcasted** it is probably due to server overload, **REFRESH** the window to solve this.
3. Make sure the **URL** is starting with https
4. While **scheduling a meet** make sure the start and end date follow a logical sequence or else it’ll show an error.
5. While testing the **Posture** bot, allow permissions for the camera and allow **notifications**, and **REFRESH** the page for changes to take effect.
6. Wait for the model to analyze, and check for **notifications**

## Instructions


1. `git clone https://github.com/Apurva-tech/unite.git`
2. `cd ./unite`
3. Install node dependencies
- `npm install`
4. Replace firebase API keys with your configurations
5. Create a `.env` file
- Add relevant credentials
- `cp .env.example .env`
5. `npm run dev`
6. The app is now running at http://localhost:3030/landing


## Useful Links

- [Deployed Website](https://unite-apurva.herokuapp.com/landing)
- [Demo Video](https://youtu.be/OKKK1GOnlIU)
- [Sprint Document](https://docs.google.com/presentation/d/11k8pLJPEV-XJwxIX4ysW9fKmHqFEZHcUWizFcFyVsns/edit?usp=sharing)
- [Design Document](https://docs.google.com/document/d/1IJcEbbhsbQna-tgcnfV_9_RhXQi4SURlrl3-0HypArE/edit?usp=sharing)

## Need help?

Feel free to contact me on [LinkedIn](https://www.linkedin.com/in/apurva866/)

[![Instagram](https://img.shields.io/badge/Instagram-follow-purple.svg?logo=instagram&logoColor=white)](https://www.instagram.com/mind.wrapper/) [![Twitter](https://img.shields.io/badge/Twitter-follow-blue.svg?logo=twitter&logoColor=white)](https://twitter.com/mindwrapper) [![Medium](https://img.shields.io/badge/Medium-follow-black.svg?logo=medium&logoColor=white)](https://medium.com/@apurva866)

---------

```javascript

if (youEnjoyed) {
starThisRepository();
}

```

-----------
18 changes: 18 additions & 0 deletions account.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* module.exports = (sequelize, DataTypes) => {
const Account = sequelize.define('Accounts', {
balance: {
type: DataTypes.DECIMAL,
allowNull: false,
},
});
Account.associate = (models) => {
Account.belongsTo(models.Users, {
foreignKey: {
allowNull: false,
},
});
};
return Account;
};
*/
5 changes: 4 additions & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const cors = require("cors");
const routes = require("./routes");
const errorHandler = require("./middlewares/error-handler");
const NotFoundError = require("./utils/errors/notfound.error");
import { func } from 'joi';
import db from './models';
require("dotenv/config");

Expand All @@ -22,7 +23,9 @@ app.use(express.urlencoded({ extended: true }));


(async () => {
await db.sequelize.sync();
await db.sequelize.sync().then(function(){
console.log('db is up')
});
})();
// sanitize request data
app.use(xss());
Expand Down
Loading

0 comments on commit 353cb53

Please sign in to comment.