Skip to content

Sashka11111/cinema-online

Repository files navigation

🎬 Cinema Online

A comprehensive web platform for watching movies and series with extended social features, built on Laravel 11 using Livewire 3 and Filament 3.

πŸ“‹ Table of Contents

🎯 Project Overview

Cinema Online is a modern web platform for watching movies and series with a strong emphasis on social interaction and co-watching. The platform supports the Ukrainian language and includes full-text search with Ukrainian localization.

Highlighted Features:

  • 🎭 Full catalog of movies, series, cartoons, and anime
  • πŸ‘₯ Role system (user/moderator/admin)
  • πŸ” Full-text search with Ukrainian localization
  • 🏠 Co-watching rooms with WebSocket synchronization
  • πŸ“± Responsive design with dark/light theme support
  • πŸ” Social login (Discord, Telegram)
  • πŸ“Š Ratings, comments, and reviews system
  • πŸ“‹ Personalized user lists
  • 🎨 Admin panel

✨ Key Features

🎬 Content Management

  • Manage movies, series, and episodes
  • Tags and genres system
  • Information about actors, directors, and crew
  • Studios and production companies
  • Content collections
  • Rating system

πŸ‘€ User Features

  • Registration and authentication
  • User profiles
  • Personal lists (favorites, watched, planned)

πŸ’¬ Social Features

  • Comments on movies, episodes, and collections
  • Like/dislike system
  • Nested comments (replies)

🏠 Co-Watching Rooms

  • Private and public rooms
  • Video synchronization via WebSocket
  • Viewer limits
  • Password protection for private rooms
  • QR code invitations

πŸ” Search and Filtering

  • Full-text search with Ukrainian localization
  • Filtering by genres, years, ratings, etc.

🎨 Administration

  • Admin panel using Filament 3
  • Manage all entities
  • Moderation tools
  • Analytics and statistics
  • User and role management

πŸ›  Technology Stack

Backend

  • PHP 8.3+ – Main programming language
  • Laravel 11 – Web framework
  • Livewire 3 – Reactive components
  • Filament 3 – Admin panel
  • PostgreSQL – Database with full-text search
  • Laravel Reverb – WebSocket server for real-time features
  • Laravel Socialite – Social authentication

Frontend

  • CSS – Styling
  • Alpine.js (via Livewire) – Reactive JavaScript
  • Vite – Frontend asset bundler
  • Laravel Echo – WebSocket client

Additional Packages

  • Laravel Breeze – Authentication
  • Laravel Trend – Analytics and trends
  • Blade Icons – Icons (Clarity, BoxIcons, FontAwesome)
  • Laravel Lang – Ukrainian localization

πŸ— Architecture

Core Models and Relationships

Users and Authentication

  • User – Users with roles and profiles

Content

  • Movie – Movies and series with metadata
  • Episode – Episodes of series
  • Person – Actors, directors, and crew
  • Studio – Studios and production companies
  • Tag – Genres and tags
  • Selection – Curated content collections

Interaction

  • Comment – Polymorphic comments
  • CommentLike – Likes/dislikes on comments
  • CommentReport – Comment reports
  • Rating – Movie ratings
  • UserList – Polymorphic personal lists

Rooms and Viewing

  • Room – Co-watching rooms
  • WatchHistory – Viewing history
  • SearchHistory – Search history

Architectural Highlights

  • ULID as primary keys for all models
  • Polymorphic relationships for flexibility (comments, lists, selections)
  • JSON fields for performance optimization
  • Scoped models for automatic filtering
  • Custom Query Builders for complex queries
  • Policy classes for role-based authorization

πŸ“– Usage

The application is available at: http://cinema-online.pp.ua:99/

Main Routes

Public Pages

  • / – Home page with trending content
  • /movies – Movies catalog
  • /series – Series catalog
  • /cartoons – Cartoons catalog
  • /anime – Anime catalog
  • /selections – Curated collections
  • /person/{person} – Person profile

Content Pages

  • /movies/{movie} – Movie detail page
  • /movies/{movie}/comments – Comments on movie
  • /movies/{movie}/watch – Watch page
  • /movies/{movie}/watch/{episode} – Watch specific episode
  • /movies/{movie}/watch/{episode}/{room} – Watch with others in room

User Pages (Authentication required)

  • /profile – User profile
  • /my-lists – Personal lists
  • /rooms – Co-watching rooms

πŸ”§ Development

Project Structure


cinema-online/  
β”œβ”€β”€ app/  
β”‚ β”œβ”€β”€ Enums/ # Enums (statuses, roles, types)  
β”‚ β”œβ”€β”€ Events/ # WebSocket events  
β”‚ β”œβ”€β”€ Filament/ # Admin panel  
β”‚ β”œβ”€β”€ Http/ # Controllers and middleware  
β”‚ β”œβ”€β”€ Livewire/ # Livewire components  
β”‚ β”œβ”€β”€ Models/ # Eloquent models  
β”‚ β”œβ”€β”€ Policies/ # Authorization policies  
β”‚ └── ValueObjects/ # Value objects  
β”œβ”€β”€ database/  
β”‚ β”œβ”€β”€ factories/ # Factories for testing  
β”‚ β”œβ”€β”€ migrations/ # Database migrations  
β”‚ β”œβ”€β”€ seeders/ # Seeders for data population  
β”‚ └── fts-dict/ # Dictionaries for full-text search  
β”œβ”€β”€ resources/  
β”‚ β”œβ”€β”€ css/ # CSS styles  
β”‚ β”œβ”€β”€ js/ # JavaScript files  
β”‚ └── views/ # Blade templates  
└── tests/ # Tests

Code Standards

The project follows:

  • PSR-12 for PHP code
  • BEM methodology for CSS class naming
  • Conventional Commits for commit messages
  • Ukrainian localization for all UI strings

Contributing

  1. Fork the repository
  2. Create a new branch for your feature (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Create a Pull Request

πŸ“„ License

This project is licensed under the MIT License.

About

A graduation projectπŸ‘©β€πŸŽ“. Website for an online movie theater with the possibility of joint viewing

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors