Skip to content

BackGwa/Perspective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perspective

Perspective is a WebRTC-based Peer-to-Peer real-time screen and camera sharing web application. It enables direct client-to-client connections for sharing media streams.

GitHub Contributors GitHub Forks GitHub Stars GitHub Issues License

Release CI/CD

Getting Started

Installation

  1. Clone the repository
git clone https://github.com/BackGwa/Perspective.git
cd Perspective
  1. Install dependencies
cd app
npm install

Environment Variables

Copy the .env.example file to .env in the app directory and configure the required values.

cp .env.example .env
Environment Variables
# PeerJS Server Configuration
VITE_PEERJS_HOST=
VITE_PEERJS_PORT=
VITE_PEERJS_PATH=
VITE_PEERJS_SECURE=true
VITE_STUN_SERVER_URL=

# Session Configuration
VITE_MAX_PARTICIPANTS=24
VITE_MAX_PASSWORD_RETRIES=3

# Media Quality Configuration
VITE_MAX_RESOLUTION_WIDTH=1920
VITE_MAX_RESOLUTION_HEIGHT=1080
VITE_MAX_FRAMERATE=30

# Connection Configuration
VITE_CONNECTION_TIMEOUT=30
VITE_RECONNECT_ATTEMPTS=3

Note If PeerJS server settings are left empty, the PeerJS public server will be used. For production environments, it is recommended to run your own PeerJS server.

Production Build

npm run build
npm run preview

Built files will be generated in the app/dist directory.

Architecture

Perspective uses a fully P2P architecture. It transmits media streams directly between host and participants through WebRTC, with the PeerJS server used only for signaling purposes. Media data never passes through the server, ensuring privacy.

It supports password authentication and session control through data connections, as well as NAT traversal via STUN servers.

For detailed architecture information, see ARCHITECTURE.md.

Contributing

Thank you for contributing to Perspective! For contribution guidelines, branch naming conventions, and PR guidelines, please refer to CONTRIBUTING.md.

Contributors

License

This project is distributed under the MIT License. See the LICENSE file for more details.