This project simulates voice calling, video calling, and live streaming via Agora services.
- Python version: 3.10.11
- Pip version: 23.0.1
- Node version: v18.20.2
- Npm version : 10.5.0
- Install
virtualenv
if not already installed (Needed for First time use only) :pip install virtualenv
- Navigate to the
backend
directory:cd backend
- Create a virtual environment (Needed for First time use only) :
python -m venv venv
- Activate the virtual environment:
.\venv\Scripts\activate
- Install dependencies (Needed for First time use only) :
pip install -r requirements.txt
- Run the backend server:
python run.py
- Install
virtualenv
if not already installed (Needed for First time use only) :pip install virtualenv
- Navigate to the
backend
directory:cd backend
- Create a virtual environment (Needed for First time use only) :
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install dependencies (Needed for First time use only) :
pip install -r requirements.txt
- Run the backend server:
python3 run.py
- Node.js and npm
- Navigate to the
frontend
directory:cd frontend
- Install dependencies (Needed for First time use only):
npm install
- Start the frontend server:
npm start
-
To start the development server with a build version
npm run build
; Run till Step 2 from above, then :npm run build
-
To install the
serve
package globally for serving the production build:npm install -g serve
-
To serve the production build on port 3000:
serve -s build -l 3000
Copy the .env.example
file to .env
and use the correct Agora tokens.
backend/app/api/agoraTokenGeneration.py
: Defines the Agora API for token generation; the main function is inutils
.backend/app/api/meetingRoom.py
: Manages meeting rooms.
backend/app/models/agoraModels.py
: Pydantic models for FastAPI related to Agora.backend/app/models/meetingMgmtDB.py
: SQLAlchemy database initialization and table definitions.backend/app/models/meetingModels.py
: Pydantic models for FastAPI meeting management.
backend/app/utils/src
: Code directly copied from the official Agora repository, as the Python package is deprecated.backend/app/utils/agoraUtils.py
: Function to generate Agora tokens.backend/app/utils/database.py
: Handles all interactions with the database.
The backend is responsible for generating Agora verified tokens based on the username and channel name.
frontend/src/components/AgoraAudioCallFunctions.js
: Main function for handling Agora SDK audio, joining, publishing, etc.frontend/src/components/AudioCallRoom.js
: Contains backend API and meeting management logic, and uses Agora SDK functions fromAgoraAudioCallFunctions.js
.
frontend/src/utils/api.js
: Lists all imported APIs from the backend server.
frontend/src/pages/Home.js
: Home page for creating meetings, joining meetings, and setting the user ID (user authentication not configured).
frontend/src/App.js
: Defines the routes for the pages.
This project is created to simulate voice calling, video calling, and live streaming using Agora services.
dev_logs_DO_NOT_DELETE
: Contains development logs, errors faced, and notes for updates.
- Ensure to set the correct Agora tokens in the
.env
file.