How mnaki/pireflics works
Main Components
A. Frontend Layer:
• Client-side application (Views - EJS templates)
• Static assets (JS, CSS, images)
• Client-side player component
B. Backend Layer:
• Authentication system
• Movie management
• Torrent handling
• Subtitle management
• User management
C. Services Layer:
• Crawler Service
• Subtitle Service
D. Data Layer:
• Database models (User, Movie, Subtitle, Token, Comment, Torrent)
[Client Layer]
• ↑↓
[Web Server Layer (Sails.js)]
• ↑↓
[Services Layer]
• ↑↓
[Data Layer]
Component Details
a) Client Layer (Blue):
• Movie viewer component
• Search interface
• User authentication views
• Profile management
b) Web Server Layer (Green):
• Controllers section:
• AuthController
• MovieController
• SubtitleController
• TorrentController
• UserController
• Policies section:
• Authentication middleware
• Session management
c) Services Layer (Orange):
• CrawlerService (for fetching torrent data)
• SubtitleService
• Torrent streaming service
d) Data Layer (Purple):
• Database models:
• User
• Movie
• Subtitle
• Token
• Comment
• Torrent
Flow Indicators
• User request flow
• Authentication flow
• Torrent streaming flow
• Data retrieval flow
Technical Details
• Sails.js framework
• WebSocket connections (for streaming)
• RESTful API endpoints
• Authentication flow
• File storage system
Additional Notes
• Relationship between the torrent streaming system and the video player
• Where subtitle processing occurs
• Authentication checkpoints
• Caching mechanisms if any
Integration points with external torrent providers
• Rectangles for services
• Hexagons for external services
• Rounded rectangles for user interfaces
This will create a comprehensive visualization of how Pireflics handles torrent-based video streaming while maintaining a Netflix-like user experience.