Skip to content

Commit

Permalink
Broadcasting System is Ready
Browse files Browse the repository at this point in the history
  • Loading branch information
SushilkumarDev committed Sep 2, 2024
1 parent 0447f8a commit aded174
Show file tree
Hide file tree
Showing 69 changed files with 5,229 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist
/node_modules
72 changes: 72 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Server

PROTOCOL=http # http or https
HOST=localhost
PORT=3016

# Time Zone corresponding to timezone identifiers from the IANA Time Zone Database es Europe/Rome default UTC

TZ=UTC

# Logs

DEBUG=true # true or false

# Cors
# Origin: Allow specified origins like '["https://example.com", "https://subdomain.example.com", "http://localhost:3000"]' or
# all origins '*' if not specified by default.
# Methods: Allow only GET and POST methods

CORS_ORIGIN='*'
CORS_METHODS='["GET", "POST"]'

# OIDC - OpenID Connect
# 1. Sign up for an account at https://auth0.com.
# 2. Navigate to https://manage.auth0.com/ to create a new application tailored to your specific requirements.
# For those seeking an open-source solution, check out: https://github.com/panva/node-oidc-provider

OIDC_ENABLED=false # true or false
OIDC_ISSUER_BASE_URL='https://server.example.com'
OIDC_BASE_URL='http://localhost:3016' # https://bro.mirotalk.com
OIDC_CLIENT_ID='ClientID'
OIDC_CLIENT_SECRET='ClientSecret'
OIDC_AUTH_REUIRED=false # set to true if authentication is required for all routes
SESSION_SECRET='mirotalk-bro-oidc-secret'

# Stun: https://bloggeek.me/webrtcglossary/stun/
# Turn: https://bloggeek.me/webrtcglossary/turn/
# Recommended: https://github.com/coturn/coturn
# Installation: https://github.com/miroslavpejic85/mirotalkbro/blob/main/docs/coturn.md
# Free one: https://www.metered.ca/tools/openrelay/ (Please, create your own account)
# Check: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/

STUN_SERVER_ENABLED=true # true or false
STUN_SERVER_URL=stun:stun.l.google.com:19302

TURN_SERVER_ENABLED=true # true or false
TURN_SERVER_URL=turn:a.relay.metered.ca:443
TURN_SERVER_USERNAME=e8dd65b92c62d3e36cafb807
TURN_SERVER_CREDENTIAL=uWdWNmkhvyqTEswO

# API
# The response will give you a entrypoint / URL for the direct join to the meeting.
# curl -X POST "http://localhost:3016/api/v1/join" -H "authorization: mirotalkbro_default_secret" -H "Content-Type: application/json" --data '{"room":"test"}'

API_KEY_SECRET=mirotalkbro_default_secret

# Ngrok
# 1. Goto https://ngrok.com
# 2. Get started for free
# 3. Copy YourNgrokAuthToken: https://dashboard.ngrok.com/get-started/your-authtoken

NGROK_ENABLED=false # true or false
NGROK_AUTH_TOKEN=YourNgrokAuthToken

# Sentry
# 1. Goto https://sentry.io/
# 2. Create account
# 3. Goto Settings/Projects/YourProjectName/Client Keys (DSN)

SENTRY_ENABLED=false # true or false
SENTRY_DSN=YourClientKeyDSN
SENTRY_TRACES_SAMPLE_RATE=0.5
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# git folder
.git

# npm
node_modules
npm-debug.log

# package
package-lock.json

# mac
.DS_Store

# cache
.cache

# personal
.env
docker-compose.yml
docker-push.sh
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 4,
};
109 changes: 109 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# MiroTalk Open Source Community Code of Conduct

## About the Code of Conduct

Equality is a core value at MiroTalk. We believe a diverse and inclusive
community fosters innovation and creativity, and are committed to building a
culture where everyone feels included.

MiroTalk open-source projects are committed to providing a friendly, safe, and
welcoming environment for all, regardless of gender identity and expression,
sexual orientation, disability, physical appearance, body size, ethnicity, nationality,
race, age, religion, level of experience, education, socioeconomic status, or
other similar personal characteristics.

The goal of this code of conduct is to specify a baseline standard of behavior so
that people with different social values and communication styles can work
together effectively, productively, and respectfully in our open source community.
It also establishes a mechanism for reporting issues and resolving conflicts.

All questions and reports of abusive, harassing, or otherwise unacceptable behavior
in a MiroTalk open-source project may be reported by contacting the MiroTalk
Open Source Conduct Committee at [email protected].

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of gender
identity and expression, sexual orientation, disability, physical appearance,
body size, ethnicity, nationality, race, age, religion, level of experience, education,
socioeconomic status, or other similar personal characteristics.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy toward other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Personal attacks, insulting/derogatory comments, or trolling
- Public or private harassment
- Publishing, or threatening to publish, others' private information—such as
a physical or electronic address—without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- Advocating for or encouraging any of the above behaviors

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned with this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project email
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the MiroTalk Open Source Conduct Committee
at [email protected]. All complaints will be reviewed and investigated
and will result in a response that is deemed necessary and appropriate to the
circumstances. The committee is obligated to maintain confidentiality with
regard to the reporter of an incident. Further details of specific enforcement
policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership and the MiroTalk Open Source Conduct
Committee.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home],
version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code_of_conduct.html][v1.4].
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc],
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[contributor-covenant-home]: https://www.contributor-covenant.org
[v1.4]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[golang-coc]: https://golang.org/conduct
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Use a lightweight Node.js image
FROM node:20-alpine

# Set working directory
WORKDIR /src

# Copy package.json and .env dependencies
COPY package.json .
COPY .env.template ./.env

# Install necessary system packages and dependencies
RUN apk add --no-cache \
bash \
vim \
&& npm install \
&& npm cache clean --force \
&& rm -rf /tmp/* /var/tmp/* /usr/share/doc/*

# Copy the application code
COPY app app
COPY public public

# Set default command to start the application
CMD ["npm", "start"]
Loading

0 comments on commit aded174

Please sign in to comment.