Skip to content

Commit

Permalink
Merge branch 'develop' into feat/explore_pageV2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-SO authored Aug 12, 2024
2 parents 526995e + 11c0363 commit 4718e0c
Show file tree
Hide file tree
Showing 25 changed files with 1,477 additions and 1,261 deletions.
95 changes: 29 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,52 @@
# StreamETH Platform
# StreamETH Platform 🎥🌐

Welcome to the StreamETH platform repository! StreamETH produces world class Virtual Events and Marketing Content. This README provides you with all the necessary information to understand our platform, contribute to it, and get it up and running on your local machine.
Welcome to the StreamETH platform repository! StreamETH produces world-class Virtual Events and Marketing Content. This README provides you with essential information about our platform. 🚀

## Website Additions
If you are planning on hosting an event, you can contact us by filling this [Typeform](https://xg2nwufp1ju.typeform.com/to/UHZwa5M3?typeform-source=info.streameth.org)

For a better understanding of what StreamETH offers and how it functions, please visit our websites:

- **Public Website**: [streameth.org](https://streameth.org) - Discover what StreamETH is all about and the unique features we offer.
- **Application Site**: [app.streameth.org](https://app.streameth.org) - Interact with the StreamETH application.

## Documentation Resources

You can find detailed documentation on StreamETH's features and architecture here:

- **[Documentation Link](#)**: Dive deep into the technical details and operational aspects of StreamETH.

## StreamETH-Platform Summary
## StreamETH-Platform Summary 📋

StreamETH is designed to provide a seamless and flexible platform for hosting and attending events virtually or in a hybrid setting. It features:

- **Interactive Sessions**: Engage with speakers and attendees through live.
- **Scalability**: Cater to events of any size, from small gatherings to large conferences.
- **Customisation**: Tailor the event experience to meet the specific needs of your audience.
- **Interactive Sessions**: Engage with speakers and attendees through live. 💬
- **Scalability**: Cater to events of any size, from small gatherings to large conferences. 📈
- **Customisation**: Tailor the event experience to meet the specific needs of your audience. 🎨

## Goals of StreamETH

Our mission with StreamETH is to:
## Website Links 🌐

- Offer a sustainable and inclusive event-hosting platform.
- Continuously enhance user experience with innovative features.
- Foster a community-driven approach to virtual event management.

## Setup Quickstart

Setting up the StreamETH platform for development is straightforward. Here’s a quick rundown:

### Prerequisites

- Node.js (v18 or above)
- Yarn
- Git

### Environment Variables
For a better understanding of what StreamETH offers and how it functions, please visit our websites:

Create a `.env` file at the root of the project and include the following variables:
- **Public Website**: [streameth.org](https://streameth.org) - Discover what StreamETH is all about and the unique features we offer. 🏠
- **Application Site**: [streameth.org/studio](https://streameth.org/studio) - Interact with the StreamETH application. 🎬
- **Create an event with us**: [Create Event](https://xg2nwufp1ju.typeform.com/to/UHZwa5M3?typeform-source=info.streameth.org)

```bash
# Session secret key
SESSION_SECRET=Generate key: "openssl rand -base64 64"
## Goals of StreamETH 🎯

# WalletConnect Project ID
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id_here
Our mission with StreamETH is to:

# Infura Project ID
NEXT_PUBLIC_INFURA_ID=your_infura_project_id_here
- Offer a sustainable and inclusive event-hosting platform. 🌱
- Continuously enhance user experience with innovative features. 💡
- Foster a community-driven approach to virtual event management. 🤝
- Be the go-to event management platform for pre-production, production, and post-production 🎯

# Sanity Studio API Key
NEXT_PUBLIC_STUDIO_API_KEY=your_Livepeer_studio_api_key_here
## Submitting Issues 🐛

# Service Account Private Key for server-to-server interactions
SERVICE_ACCOUNT_PRIVATE_KEY=your_service_account_private_key_here
If you encounter any bugs, have feature requests, or want to suggest improvements, please open an issue on our GitHub repository by clicking [here](https://github.com/streamethorg/streameth-platform/issues). Your feedback helps us improve StreamETH for everyone. 📝

# Service Account Email
SERVICE_ACCOUNT_EMAIL=your_service_account_email_here
## ⚠️ Important Notice for Developers 🛠️

# Google API Key for services like Google Maps, etc.
GOOGLE_API_KEY=your_google_api_key_here
```
**Please Note**: At this time, StreamETH is not open for external code contributions. We are a small team focused on delivering a high-quality product, and we are not currently set up to manage external developer code contributions effectively. We appreciate your interest, but we kindly ask that you refrain from submitting pull requests or expecting to contribute code at this stage. 🙏

Make sure to replace your_..._here with your actual environment variable values.
However, we do welcome and appreciate [issue submissions!](https://github.com/streamethorg/streameth-platform/issues) If you encounter bugs 🐛, have feature requests, or want to provide suggestions, please feel free to open an issue. Your feedback is valuable to us. 🐛💡

### Running Locally
We plan to support full developer contributions in the future once we feel ready to manage them properly. We will update this README when that time comes. Thank you for your understanding. 🌟

```bash
git clone [email protected]:streamethorg/streameth-platform.git
cd streameth-platform
yarn install
yarn dev # or yarn dev
```
## Future Updates 🔮

## Contribution Guidelines
We value the community's interest in our project. We will update this README when we are ready to welcome full external contributions. Thank you for your patience and support as we continue to develop and improve StreamETH. 🙌

We welcome contributions from everyone. To contribute:
Stay tuned for exciting updates and features! 🎉

- **Issues**: Feel free to submit issues for bug reports, feature requests, or suggestions through our [Issues tab](#).
- **Pull Requests**: If you wish to contribute code, please make a pull request (PR) with a clear list of what you've done.
## Support

Read our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed information on how to contribute, commit messages, and the code review process.
We're here to help! If you have questions about our platform, please don't hesitate to reach out to [email protected].
4 changes: 0 additions & 4 deletions packages/app/app/studio/[organization]/clips/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ const EventClips = async ({ params, searchParams }: ClipsPageParams) => {
return undefined;
})();

if (!previewAsset) {
return notFound();
}

return (
<ClipContainer>
{previewAsset && (
Expand Down
22 changes: 14 additions & 8 deletions packages/app/app/studio/[organization]/destinations/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Destinations = async ({
case 'youtube':
return <SiYoutube color="#FF0000" className={className} />;
case 'twitter':
return <SiX className={className} />;
return null;
default:
return <LuRadio color="#000" className={className} />;
}
Expand Down Expand Up @@ -71,13 +71,19 @@ const Destinations = async ({
<TableRow key={_id}>
<TableCell className="flex items-center gap-4">
<div className="relative">
<Image
className="rounded-full"
src={thumbnail!}
width={50}
height={50}
alt={type}
/>
{type === 'twitter' ? (
<div className="bg-black w-[50px] h-[50px] rounded-full">
<SiX color="#fff" className="w-full h-full p-3" />
</div>
) : (
<Image
className="rounded-full"
src={thumbnail!}
width={50}
height={50}
alt={type}
/>
)}
{renderSocialTypeIcon(type)}
</div>

Expand Down
4 changes: 2 additions & 2 deletions packages/app/components/misc/Support/SupportForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ const SupportForm = ({
<FormItem className="mt-4 flex rounded-xl border border-dashed">
<FormControl>
<ImageUpload
placeholder="Click to upload image here. "
className="m-auto h-full w-full bg-neutrals-300 py-4 text-black"
placeholder="Click to upload image here. (Optional) "
className="m-auto min-h-[200px] w-full bg-neutrals-300 py-4 text-black"
aspectRatio={1}
path={`support`}
{...field}
Expand Down
14 changes: 9 additions & 5 deletions packages/app/components/misc/Support/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ import * as z from 'zod';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { toast } from 'sonner';
import { useSIWE } from 'connectkit';
import SupportForm from './SupportForm';
import { Button } from '../../ui/button';
import { SignInUserButton } from '../SignInUserButton';
import {
Credenza,
CredenzaContent,
CredenzaTitle,
CredenzaTrigger,
} from '@/components/ui/crezenda';
import { usePrivy } from '@privy-io/react-auth';
import { useAccount } from 'wagmi';
import { ConnectWalletButton } from '../ConnectWalletButton';

const Support = () => {
const [isLoading, setIsLoading] = useState(false);
const [messageSent, setMessageSent] = useState(false);
const { authenticated } = usePrivy();
const { address } = useAccount();
const [open, setOpen] = useState(false);
const form = useForm<z.infer<typeof supportSchema>>({
resolver: zodResolver(supportSchema),
Expand All @@ -40,6 +41,7 @@ const Support = () => {
toast.error('No wallet address found');
return;
}

createSupportTicketAction({
...values,
})
Expand All @@ -60,9 +62,11 @@ const Support = () => {
setMessageSent(false);
setOpen(false);
};
const isAuthenticated = authenticated || address;

return (
<Credenza open={open} onOpenChange={setOpen}>
<CredenzaContent className="!z-[999999] max-h-[700px] p-6 md:overflow-auto">
<CredenzaContent className="max-h-[700px] p-6 md:overflow-auto">
<CredenzaTitle>Contact Support</CredenzaTitle>
<div>
{messageSent && <p className="pb-2 font-bold">Message sent 🎉!!</p>}
Expand All @@ -88,10 +92,10 @@ const Support = () => {
</a>
</p>

{!authenticated ? (
{!isAuthenticated ? (
<div>
<p className="py-2">Sign in to send us a message</p>
<SignInUserButton />
<ConnectWalletButton />
</div>
) : messageSent ? (
<div>
Expand Down
7 changes: 3 additions & 4 deletions packages/app/components/misc/VideoCard/VideoCardWithMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ const VideoCardWithMenu = ({
link: string;
}) => {
const [thumbnail, setThumbnail] = useState<string | undefined>(undefined);

const memoizedSession = useMemo(() => session, []);

useEffect(() => {
const getThumbnail = async (session: IExtendedSession) => {
try {
Expand All @@ -40,8 +39,8 @@ const VideoCardWithMenu = ({
}
};

if (session) {
getThumbnail(session);
if (memoizedSession && !memoizedSession.coverImage) {
getThumbnail(memoizedSession);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [memoizedSession]);
Expand Down
7 changes: 5 additions & 2 deletions packages/app/components/misc/form/imageUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Dialog,
DialogContent,
DialogFooter,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
Expand Down Expand Up @@ -44,8 +45,10 @@ const ConfirmImageDeletion: React.FC<ConfirmImageDeletionProps> = ({
className="absolute right-2 top-2 z-10 cursor-pointer rounded-full border border-muted-foreground bg-white text-muted-foreground"
/>
</DialogTrigger>
<DialogContent className="flex flex-col items-center justify-center gap-5">
<p className="text-xl">Are you sure you want to remove this image?</p>

<DialogContent className="flex flex-col items-center justify-center gap-5 z-[99999999999] ">
<DialogTitle>Delete Image</DialogTitle>
<p className="text-xl">Are you sure you want to delete this image?</p>
<DialogFooter className="flex items-center gap-4">
<Button onClick={() => setOpen(false)} variant="ghost">
Cancel
Expand Down
9 changes: 9 additions & 0 deletions packages/app/lib/actions/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import { createSupportTicket } from '../services/supportService';

export const createSupportTicketAction = async ({
message,
telegram,
email,
image,
}: {
message: string;
telegram?: string;
email?: string;
image?: string;
}) => {
const authToken = cookies().get('user-session')?.value;
if (!authToken) {
Expand All @@ -14,6 +20,9 @@ export const createSupportTicketAction = async ({

const response = await createSupportTicket({
message,
telegram,
email,
image,
authToken,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/app/lib/services/sessionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const fetchSessionMetrics = async ({
const response = await fetch(`${apiUrl()}/streams/metric/${playbackId}`, {
cache: 'no-store',
});
console.log('response', response);

if (!response.ok) {
return {
viewCount: 0,
Expand Down
8 changes: 7 additions & 1 deletion packages/app/lib/services/supportService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ import { ISupport } from 'streameth-new-server/src/interfaces/support.interface'

export async function createSupportTicket({
message,
telegram,
email,
image,
authToken,
}: {
message: string;
telegram?: string;
email?: string;
image?: string;
authToken: string;
}): Promise<ISupport> {
const response = await fetch(`${apiUrl()}/tickets`, {
Expand All @@ -14,7 +20,7 @@ export async function createSupportTicket({
'Content-Type': 'application/json',
Authorization: `Bearer ${authToken}`,
},
body: JSON.stringify({ message }),
body: JSON.stringify({ message, telegram, email, image }),
});
if (!response.ok) {
throw 'Error creating ticket';
Expand Down
Loading

0 comments on commit 4718e0c

Please sign in to comment.