Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podium (Updated Repositories to work given some deprecations) #1

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c598cd7
Working React Environment for my Chromebook
jomarip Oct 16, 2023
6d67a53
Update README.md
jomarip Oct 30, 2023
a7110c8
Update dependencies
jomarip Jan 16, 2024
e28ed6b
Working on Emulator
jomarip Jan 17, 2024
7c83ee7
Update Console Logging
jomarip Jan 19, 2024
77a0ebd
Console logging
jomarip Jan 23, 2024
8209d15
Upgraded CometChat SDK
jomarip Jan 24, 2024
a50d166
Update of the login logic & add logs
jomarip Jan 24, 2024
e7e20ee
Updated Call.js - group chat now seems to work
jomarip Jan 25, 2024
1f8603c
Merge branch 'podium' into upgrade-comet-sdk
jomarip Jan 25, 2024
a5430c1
Merge pull request #1 from jomarip/upgrade-comet-sdk
jomarip Jan 25, 2024
fd84be6
Updated Firebase Dependencies and Related internal code
jomarip Jan 26, 2024
f7380ec
Merge pull request #2 from jomarip/upgrade-comet-sdk
jomarip Jan 26, 2024
c92575c
Basic Particle Auth Infrastructure
jomarip Jan 28, 2024
87849fb
Working Particle Auth Sign-in
jomarip Jan 30, 2024
846fc34
Login with Firebase and Particle Auth
jomarip Jan 31, 2024
a626e90
Merge pull request #3 from jomarip/particle
jomarip Feb 5, 2024
fa7cbde
Creating the room to have speaker components
jomarip Feb 5, 2024
182f9d5
Successful Database Addition of Speaker
jomarip Feb 6, 2024
351bcf7
Custom UI and Buttons for Moderation
jomarip Feb 13, 2024
372840e
Update the Database to reflect community moderation
jomarip Feb 14, 2024
1c371b2
Refined the Moderation Tooling for thumbs up and down
jomarip Feb 14, 2024
18e43c9
minor refinement
jomarip Feb 14, 2024
1f9f8e5
Merge pull request #4 from jomarip/particle
jomarip Feb 14, 2024
498cf94
Timestamp for new users works
jomarip Feb 15, 2024
719206d
Ethers Integration for Movement
jomarip Feb 16, 2024
afa5081
Audio Room Gating Mechanisms- attempting integration
jomarip Feb 16, 2024
a158a75
alternative approach/check
jomarip Feb 16, 2024
449e03b
Working Ethers Call to SocialKeys
jomarip Feb 18, 2024
f98fd16
Social Keys working on movement
jomarip Feb 18, 2024
bcd09f9
Time Expiration Manipulation
jomarip Feb 18, 2024
71e27aa
Backend connection refinement
jomarip Feb 18, 2024
09d1750
Community Based Muting Works
jomarip Feb 18, 2024
9ffdd92
Merge pull request #5 from jomarip/moderation-tooling
jomarip Feb 18, 2024
c2179ea
Saving the Public Address for reference
jomarip Feb 18, 2024
d10a659
submission time
jomarip Feb 20, 2024
9f41f59
Merge pull request #6 from jomarip/moderation-tooling
jomarip Feb 20, 2024
bf14963
Update Readme for most recent build
jomarip Feb 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ buck-out/
# CocoaPods
/ios/Pods/

env.js
env.js
android/java_pid2209.hprof
36 changes: 31 additions & 5 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useEffect, useState} from 'react';
import {View, Text, TouchableOpacity, StyleSheet} from 'react-native';
import {CometChat} from '@cometchat-pro/react-native-chat';
import {CometChat} from '@cometchat/chat-sdk-react-native';
import {CometChatCalls} from '@cometchat/calls-sdk-react-native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {NavigationContainer} from '@react-navigation/native';
import AsyncStorage from '@react-native-async-storage/async-storage';
Expand Down Expand Up @@ -34,26 +35,51 @@ const App = () => {
const initCometChat = async () => {
const appID = `${cometChatConfig.cometChatAppId}`;
const region = `${cometChatConfig.cometChatRegion}`;
console.log("This is the appID cometChat is configured to use: ", appID);
console.log("This is the region cometChat is configured to use: ", region);

//Basic CometChat Sign in
const appSetting = new CometChat.AppSettingsBuilder()
.subscribePresenceForAllUsers()
.subscribePresenceForAllUsers()
.setRegion(region)
.autoEstablishSocketConnection(true)
.build();
CometChat.init(appID, appSetting).then(
() => {
console.log("Initialization completed successfully");
}, error => {
console.log("Initialization failed with error:", error);
}
);

//CometCall (audio & video) sign in
const callAppSettings = new CometChatCalls.CallAppSettingsBuilder()
.setAppId(appID)
.setRegion(region)
.build();
CometChat.init(appID, appSetting).then(

CometChatCalls.init(callAppSettings).then(
() => {
console.log('CometChat was initialized successfully');
console.log('CometChatCalls was initialized successfully');
},
(error) => {
console.log('CometChatCalls initialization failed with error:', error);
},
(error) => {},
);
};

const initAuthenticatedUser = async () => {
console.log("Initiate Authenticated User...");
const authenticatedUser = await AsyncStorage.getItem('auth');
setUser(() => (authenticatedUser ? JSON.parse(authenticatedUser) : null));
console.log("User is set");
};

useEffect(() => {
initCometChat();
console.log("initCometChat done");
initAuthenticatedUser();
console.log("initAuthenticatedUser done");
}, []);

const search = (navigation) => () => {
Expand Down
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# How to build an Clubhouse Clone with React Native

Read the full tutorial here: [**>> How to build an Clubhouse Clone with React Native**](https://www.cometchat.com/tutorials/#)
# How to build an audioroom app - Podium with React Native

## Technology

This demo uses:

- @cometchat-pro/react-native-calls
- @cometchat-pro/react-native-chat
- @cometchat/calls-sdk-react-native,
- @cometchat/chat-sdk-react-native,
- @ethersproject/shims,
- @particle-network/rn-auth,
- @react-native-async-storage/async-storage,
- @react-native-community/cli,
- @react-native-picker/picker,
Expand All @@ -16,6 +16,7 @@ This demo uses:
- @react-navigation/native,
- @react-navigation/stack,
- emoji-mart-nativebeta,
- ethers,
- firebase,
- react-native-autolink,
- react-native-document-picker,
Expand Down Expand Up @@ -53,7 +54,7 @@ To run the demo follow these steps:
4. From the Quick Start copy the **APP_ID, APP_REGION and AUTH_KEY**. These will be used later.
5. Also copy the **REST_API_KEY** from the API & Auth Key tab.
6. Navigate to the Users tab, and delete all the default users and groups leaving it clean **(very important)**.
7. Download the repository [here](https://github.com/hieptl/club-house/archive/main.zip) or by running `git clone https://github.com/hieptl/club-house.git` and open it in a code editor.
7. Download the repository by running `https://github.com/jomarip/podium.git` and open it in a code editor.
8. [Head to Firebase and create a new project](https://console.firebase.google.com)
9. Create a file called **env.js** in the root folder of your project.
10. Import and inject your secret keys in the **env.js** file containing your CometChat and Firebase in this manner.
Expand All @@ -76,22 +77,20 @@ export const cometChatConfig = {
cometChatAuthKey: xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx,
cometChatRestApiKey: xxx - xxx - xxx - xxx - xxx - xxx - xxx - xxx,
};


export const particleInfoConfig = {
particleId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
clientKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
};

```

11. cd to your root folder and hit npm i --force to install the packages.
12. Run cd to the ios folder then run pod install to install the pods. Once pods are installed run cd .. to go back to the root folder.
13. Run the app on iOS using npx react-native run-ios & on Android using npx react-native run-android
14. Make sure to include env.js in your gitIgnore file from being exposed online.
15. If you would like to test your application on IOS and you are using a Macbook - Apple Chip, you need to follow this link to configure your xcode and your ios project. [CometChat - Set up for IOS](https://prodocs.cometchat.com/docs/ios-setup)
16. If you would like to test your application on Android and you have to face with an issue related to ANDROIRD_ROOT_SDK. Please refer to this [link](https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil) to get the solution.

Questions about running the demo? [Open an issue](https://github.com/hieptl/club-house/issues). We're here to help ✌️
12. Use node.js version14.17 or greater
For running on android you will need an android device or emulator
13. adb reverse tcp:8081 tcp:8081 (command to connect device)
14. npx react-native run-android (to build the project - helps to have the adb running with attached device)
15. npm start

## Useful links

- 🏠 [CometChat Homepage](https://app.cometchat.com/signup)
- 🚀 [Create your free account](https://app.cometchat.com/apps)
- 📚 [Documentation](https://www.cometchat.com/docs/home/welcome)
- 👾 [GitHub](https://www.github.com/cometchat-pro)
- 🔥 [Firebase](https://console.firebase.google.com)
- 🔷 [React Native](https://reactnative.dev)
Loading