A modern streaming platform built with SvelteKit that offers a seamless experience for watching embedded content. Features a rich user interface, comprehensive media management, and social features.
- TMDB API integration for extensive movie and TV show data
- Multiple provider support (VidSrc, VidSrc Pro, Embed.su)
- Advanced search with genre, year, and rating filters
- User authentication
- Watchlist
- Rich comment system with replies, mentions, and emoji support
- Comment moderation and reporting
- Server-side rendering (SSR)
- Image optimization and caching
- Rate limiting and Captcha protection
- Password reset functionality (WIP)
- SvelteKit 2.0 with TypeScript
- TailwindCSS
- Tiptap (Rich text editor)
- Emoji Mart
- Prisma ORM with MySQL
- JWT Authentication
- Sharp for image optimization
streamium/
├── src/
│ ├── lib/ # Components, services, stores
│ ├── routes/ # SvelteKit routes and API
│ └── app.html # App template
├── prisma/
│ └── schema.prisma # Database schema
└── static/ # Static assets
npm install
(Setting up a database is not necessary if you only want to launch streamium locally and watch content)
- Install MySQL if not already installed:
# Ubuntu/Debian
sudo apt install mysql-server
# macOS with Homebrew
brew install mysql
- Start MySQL service:
# Ubuntu/Debian
sudo systemctl start mysql
# macOS
brew services start mysql
- Create database and user:
# Log into MySQL as root
sudo mysql
# Create database and user (in MySQL prompt)
CREATE DATABASE streamium;
CREATE USER 'streamium'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON streamium.* TO 'streamium'@'localhost';
FLUSH PRIVILEGES;
exit;
- Copy the example environment file:
cp .env.example .env
- Update the .env file with your settings:
# Database - update with your MySQL credentials
DATABASE_URL="mysql://user:password@localhost:port/db"
# Authentication - generate a secure random string
JWT_SECRET="your-jwt-secret"
# TMDB API - get from https://www.themoviedb.org/settings/api
TMDB_API_KEY="your-tmdb-api-key"
TMDB_API_URL="https://api.themoviedb.org/3"
# Streaming Providers
VIDSRC_BASE_URL="https://vidsrc.cc/v2/embed"
VIDSRC_PRO_BASE_URL="https://vidsrc.pro/embed"
EMBEDSU_BASE_URL="https://embed.su/embed"
- Generate Prisma Client:
npx prisma generate
- Run migrations to create database tables:
npx prisma migrate dev
- (Optional) Create an admin user:
# Log into MySQL
mysql -u streamium -pstreamium123 streamium
# Create admin user (in MySQL prompt)
INSERT INTO users (username, email, passwordHash, isAdmin, createdAt, updatedAt)
VALUES ('admin', 'admin@example.com', '$2b$10$BK2yg8osv06HgfAiUoKQhu4zHNY5svt.uBuovXWBuM5JyPYkYZxlO', true, NOW(), NOW());
exit;
# Default admin password is 'admin123', generate a new one with bcrypt.
npm run dev
The application will be available at http://localhost:5173
-
If you get MySQL connection errors:
- Verify MySQL is running:
sudo systemctl status mysql
- Check credentials in .env file
- Ensure database exists:
mysql -u user -ppassword -e "SHOW DATABASES;"
- Verify MySQL is running:
-
If Prisma migration fails:
- Check DATABASE_URL in .env
- Try resetting database:
npx prisma migrate reset
- Check Prisma logs:
npx prisma migrate status
This project is licensed under the MIT License.
This project is provided strictly for research and educational purposes only. By using this software:
- You acknowledge that this is a research project and agree to use it in compliance with all applicable local, state, and federal laws.
- You understand that the author(s) provide this code "as is" without warranty of any kind, express or implied.
- You accept full responsibility for any use, misuse, or illegal use of this software.
- You agree that the author(s) cannot be held liable for any damages, legal issues, or consequences arising from the use of this software.
- You acknowledge that this project does not include, distribute, or promote any copyrighted or unlawful material.
- You understand that streaming copyrighted content without proper authorization may be illegal in your jurisdiction.
- You agree to use this software only with properly licensed and authorized content in accordance with your local laws.
The purpose of this project is to demonstrate modern web development techniques and architectures. Any actions and/or activities related to the material contained within this project is solely your responsibility.