Elcast is a dynamic livestreaming platform where users can discover and engage with content across gaming, entertainment, sports, music, and more. With a diverse range of channels and interactive experiences, Elcast offers something for every viewer and creator.
- π Authentication & Authorization β Users can sign up, log in, and manage their accounts.
- βοΈ Mails β Users can verify their email and receive mails for authentication, TOTP, and other security actions.
- π Password Recovery β Easily reset passwords via email.
- π« Account Deactivation β Users can deactivate their accounts if needed.
- π€ Telegram Integration β Users can connect their Telegram account to the Elcast Bot to receive security notifications alongside email alerts.
- π₯ Live Streaming β Start and watch live streams in real time.
- π¬ Chat System β Integrated live chat for viewers and streamers.
- πΊ Channel Management β Users can customize their streaming channels.
- β Follow System β Follow favorite streamers and get notified about their streams.
- π Notifications β Users can receive different live notifications.
- π TOTP Authentication β Additional security with Time-based One-Time Password (TOTP) authentication.
- π₯οΈ Session Management β Users can view all active sessions, see their locations (based on IP), and terminate them if needed.
- π Stream Categories & Tags β Easily discover content by browsing different categories.
- π i18n Support β Available in Russian and English for a localized experience.
- π Dark Mode β Seamless UI experience with light/dark mode toggle.
| Codebase | Description |
|---|---|
| Server | NestJS GraphQL API |
| Client | NextJS Client |
main- The primary development branch. All new features, bug fixes, and improvements are merged here after code review and testing. This branch should always be in a deployable state.production- The stable branch that reflects the live/production environment. Only thoroughly tested and approved changes from main are merged here before deployment.
Server: A backend service built with NestJS, utilizing GraphQL, Prisma, Redis, and other essential technologies.
Client: A frontend web application developed using Next.js, React, Apollo Client, and Tailwind CSS.
Package manager: pnpm
- Framework: NestJS
- Language: TypeScript
- Database ORM: Prisma
- Database: PostgreSQL
- GraphQL Server: Apollo Server with NestJS
- Session Management: Redis
- File Storage: AWS S3
- Email Service: Nodemailer
Scripts
start- Start the production serverstart:dev- Start the development server with hot reloaddb:push- Push database schema changesdb:seed- Seed the databasedb:studio- Open Prisma Studio for database managementlint,format- Code quality and formatting scripts
- Framework: Next.js
- Language: TypeScript
- State Management: Zustand
- GraphQL Client: Apollo Client
- Styling: shadcn/ui, Tailwind CSS
- Forms & Validation: React Hook Form, Zod
- Realtime: LiveKit for interactive streaming
- Internationalization:
next-intl
Scripts
dev- Start the development serverbuild- Build for productionstart- Start the production servercodegen- Generate GraphQL typeslint,format- Code quality and formatting scripts
To run this project, you will need to add the following environment variables to your .env file
NODE_ENVβ Defines the environment (development or production).APPLICATION_PORTβ Port on which the backend server runs.APPLICATION_URLβ Base URL of the backend.ALLOWED_ORIGINβ Defines allowed origin for CORS.GRAPHQL_PREFIXβ API prefix for GraphQL endpoints.
COOKIES_SECRETβ Secret for encrypting cookies.SESSION_SECRETβ Secret for signing sessions.SESSION_NAMEβ Name of the session cookie.SESSION_DOMAINβ Domain where session cookies are valid.SESSION_MAX_AGEβ Session expiration time.SESSION_HTTP_ONLYβ Whether the session cookie is HTTP-only.SESSION_SECUREβ Whether the session cookie requires HTTPS.SESSION_FOLDERβ Directory for storing session files in Redis.
POSTGRES_URIβ Connection string for PostgreSQL.REDIS_URIβ Connection string for Redis.
MAIL_HOSTβ Mail server host.MAIL_PORTβ Mail server port.MAIL_LOGINβ Mail server login.MAIL_PASSWORDβ Mail server password.
S3_ENDPOINTβ URL for the S3 storage provider.S3_REGIONβ AWS region for S3.S3_ACCESS_KEY_IDβ Access key ID for S3.S3_SECRET_ACCESS_KEYβ Secret access key for S3.S3_BUCKET_NAMEβ Name of the S3 bucket.
LIVEKIT_API_URLβ API endpoint for LiveKit.LIVEKIT_API_KEYβ API key for LiveKit.LIVEKIT_API_SECRETβ API secret for LiveKit.
TELEGRAM_BOT_TOKENβ API token for the Telegram bot.
NEXT_PUBLIC_SERVER_URLβ URL for the GraphQL API.NEXT_PUBLIC_MEDIA_URLβ URL for accessing media files. (S3 Storage)NEXT_PUBLIC_TELEGRAM_BOT_URLβ Telegram bot link for Elcast.NEXT_PUBLIC_LIVEKIT_WS_URLβ WebSocket URL for LiveKit.NEXT_PUBLIC_WEBSOCKET_URLβ WebSocket URL for GraphQL subscriptions.NEXT_PUBLIC_APP_URLβ Base URL of the frontend application.
Clone the project
git clone https://github.com/eldarcodes/elcast.git
cd elcast- Go to the project directory
cd apps/api- Install dependencies
pnpm install- Create an environment file
cp .env.example .env- Start PostgreSQL and Redis using Docker
docker-compose up -d- Run Prisma migrations (apply database schema changes):
pnpm prisma migrate dev- Seed database if needed
pnpm run db:seed- Start the API in development mode
pnpm run start:dev- Go to the project directory
cd apps/web- Install dependencies
pnpm install- Create an environment file
cp .env.example .env- Start client in development mode
pnpm run devContributions are always welcome!
Elcast is open to contributions, but I recommend creating an issue or leaving a comment to share what you're working on first to avoid conflicts.