Skip to content

S3MER is a full stack dynamic live streaming platform, customizable features, multi-platform integration, and a developer-friendly API.

License

Notifications You must be signed in to change notification settings

RicardoGEsteves/s3mer

Repository files navigation

S3MER - Advanced Customizable Live Streaming Platform

(UPDATE) - with the latest dependencies updates, you will have to do some small config changes.

S3MER is an innovative and customizable live streaming platform designed to revolutionize the streaming experience. It offers a feature-rich environment akin to popular platforms, while integrating cutting-edge technologies for enhanced security, customization, and seamless user interaction.

Project Description:

🌟 S3MER Platform πŸŽ₯

This repository hosts a cutting-edge livestream platform built upon a robust tech stack utilizing TypeScript, React, Next.js, and TailwindCSS to provide a dynamic and responsive user interface. Leveraging the power of Shadcn-ui and Clerk, LiveStreamX delivers a visually immersive experience with personalized themes and advanced user authentication capabilities.

Demo Images

  • Home Page
    • logged in
    • live
    • live logged in

  • Dashboard
    • dashboard offline
    • dashboard live
    • dashboard about section
    • dashboard live chat

  • Search Results
    • offline
    • live

  • Live Chat
    • Chat & Community Tab
      >

  • Live Badge
    >

Technologies & Key Features

  • Frontend: TypeScript, React, Next.js, TailwindCSS, Shadcn-ui
  • Prisma & MySQL: Ensuring efficient data management and storage.
  • Socket.io & WebRTC: Enabling real-time communication and streaming capabilities.
  • WebSockets, Clerk & JWT-decode: Strengthening secure data transmission and authentication.
  • Livekit: Leveraging Livekit components, client, and server SDKs for enriched streaming functionalities.
  • Tanstack/react-table & Zustand: Facilitating seamless data handling and state management.
  • Uploadthing & Sonner: Streamlining file uploads and enhancing user interaction.
  • Svix & Webhooks: Providing a robust integration framework for external services.
  • NGROK: Enabling secure tunneling for local development and testing.
  • RTMP and WHIP connections: Supporting diverse streaming protocols for broad compatibility.
  • Server actions: Implementing comprehensive server-side functionalities for streamlined operations.

Features & Capabilities:

  • Real-Time Streaming: Utilizing WebRTC and WebSockets for seamless live streaming capabilities.
  • Security: Prioritizing robust security measures for user data and interactions. Integrated authentication, JWT, and additional security layers for user protection.
  • Efficient Data Management: Leveraging Prisma, MySQL, and other technologies for efficient data management.
  • Cutting-edge Technologies: Leveraging the latest in streaming technology to provide a seamless experience.
  • Customizable UI/UX: Developed with TailwindCSS and Shadcn-ui, ensuring an engaging user interface. Empowering users with extensive customization options for their streaming environments.
  • Scalable Architecture & Performance: Built with scalability in mind to accommodate growing user bases while maintaining optimal performance with a focus on delivering a smooth streaming experience.

Get Involved & Contribute

This project is continuously evolving, incorporating new technologies and enhancements to deliver an exceptional live streaming experience. Contributions and feedback from the community are highly encouraged and welcomed!

Contributions to S#MER are welcome! Whether you're passionate about enhancing user experience, optimizing performance, or adding new features, your contributions are valued.

Project Structure

β”œβ”€β”€ .github/               # GitHub configuration
β”‚   β”œβ”€β”€ workflows/         # GitHub Actions workflows for CI/CD
β”œβ”€β”€ actions/               # Server actions
β”‚   β”œβ”€β”€ auth.ts            # Authentication actions
β”‚   β”œβ”€β”€ db.ts              # Database actions
β”‚   β”œβ”€β”€ streams.ts         # Stream management actions
β”‚   β”œβ”€β”€ users.ts           # User management actions
β”‚   └── utils.ts           # Utility functions
β”œβ”€β”€ api/                    # Backend API
β”‚   β”œβ”€β”€ routes/             # API routes
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ streams.js
β”‚   β”‚   └── users.js
β”‚   β”œβ”€β”€ models/             # Database models
β”‚   β”‚   β”œβ”€β”€ User.js
β”‚   β”‚   └── Stream.js
β”‚   β”œβ”€β”€ middlewares/        # Express middlewares
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   └── errorHandler.js
β”‚   β”œβ”€β”€ utils/              # Utility functions
β”‚   β”‚   └── db.js
β”‚   β”œβ”€β”€ server.js           # Express server
β”‚   └── index.js            # Entry point
β”œβ”€β”€ app/                   # Next.js app
β”‚   β”œβ”€β”€ pages/             # Next.js pages
β”‚   β”‚   β”œβ”€β”€ _app.tsx       # Global app component
β”‚   β”‚   β”œβ”€β”€ _document.tsx  # Custom document
β”‚   β”‚   β”œβ”€β”€ index.tsx      # Home page
β”‚   β”‚   └── ....           # Other pages
β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”œβ”€β”€ Auth/
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Register.tsx
β”‚   β”‚   β”‚   └── ....
β”‚   β”‚   β”œβ”€β”€ Home/
β”‚   β”‚   β”‚   β”œβ”€β”€ HomeHero.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FeaturedStreams.tsx
β”‚   β”‚   β”‚   └── ....
β”‚   β”‚   β”œβ”€β”€ Layout/
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”‚   β”‚   └── ....
β”‚   β”‚   β”œβ”€β”€ Live/
β”‚   β”‚   β”‚   β”œβ”€β”€ LivePlayer.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LiveChat.tsx
β”‚   β”‚   β”‚   └── ....
β”‚   β”‚   β”œβ”€β”€ Profile/
β”‚   β”‚   β”‚   β”œβ”€β”€ ProfileHeader.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProfileContent.tsx
β”‚   β”‚   β”‚   └── ....
β”‚   β”‚   β”œβ”€β”€ Settings/
β”‚   β”‚   β”‚   β”œβ”€β”€ AccountSettings.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AppearanceSettings.tsx
β”‚   β”‚   β”‚   └── ....
β”‚   β”‚   └── Video/
β”‚   β”‚       β”œβ”€β”€ VideoPlayer.tsx
β”‚   β”‚       β”œβ”€β”€ VideoInfo.tsx
β”‚   β”‚       └── ....
β”œβ”€β”€ hooks/                 # Custom hooks
β”‚   β”œβ”€β”€ useAuth.ts
β”‚   β”œβ”€β”€ useStream.ts
β”‚   └── ....
β”œβ”€β”€ lib/                   # Shared lib
β”‚   └── services           # API clients
β”‚       β”œβ”€β”€ auth.ts
β”‚       β”œβ”€β”€ streams.ts
β”‚       └── users.ts
β”œβ”€β”€ prisma/                # Prisma schema & migrations
β”‚   β”œβ”€β”€ schema.prisma
β”‚   └── migrations/
β”œβ”€β”€ public/                # Static assets
β”‚   β”œβ”€β”€ fonts/
β”‚   β”œβ”€β”€ images/
β”‚   └── styles/
β”œβ”€β”€ store/                 # State management
β”‚   β”œβ”€β”€ index.ts
β”‚   └── slices/
β”‚       β”œβ”€β”€ authSlice.ts
β”‚       β”œβ”€β”€ streamsSlice.ts
β”‚       └── usersSlice.ts
β”œβ”€β”€ utils/                 # Utility functions
β”‚   β”œβ”€β”€ formatTime.ts
β”‚   └── ...
β”œβ”€β”€ next.config.js          # Next.js configuration
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ tsconfig.json
└── ....

Tech Stack

Typescript, React, Next.js, TailwindCSS, Shadcn-ui, Prisma, MySQL, Socket.io, WebRTC, WebSockets, Clerk, Clerk/themes, Livekit/components-react, Livekit-client, Livekit-server-sdk, Tanstack/react-table, Uploadthing, JWT-decode, Sonner, Svix, Ngrok, Zustand, Webhooks, RTMP and WHIP connections, Server actions and more.

Installation & Setup

# install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Setup .env file

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
CLERK_WEBHOOK_SECRET=

DATABASE_URL=''

LIVEKIT_API_URL=
LIVEKIT_API_KEY=
LIVEKIT_API_SECRET=
NEXT_PUBLIC_LIVEKIT_WS_URL=

UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=

Setup Prisma

# install prisma
npm i @prisma/client
# init
npx prisma init
# create a new migration
npx prisma migrate
# create a new database
npx prisma db push

npx prisma studio

Open http://localhost:3000 with your browser to see the result.

License

MIT