How k3vo2003/red_social works
Project Type and Purpose
• This is a monolithic, full-stack PHP social-network application (“red_social”) following an MVC pattern.
• Key features (inferred from Controllers and Models): user authentication (login/register), profiles, posting text and video, live streaming, comments/likes/follows, and payments/transactions.
High-Level Architecture Components
a. Client Layer
• Web browser or mobile webview sending HTTP(S) requests.
• Renders HTML/CSS/JS produced by the Views.
b. Web Server & PHP Runtime
• Apache/Nginx with mod_php or PHP-FPM processes.
• public/index.php as the front controller.
c. Routing & Configuration
• config/routes.php maps URIs to specific controller actions.
• config/*.php holds database, OAuth, and other environment settings.
d. Application Layer (MVC)
• Controllers (app/Controllers): AuthController, HomeController, PostController, VideoController, LiveController, PaymentController, ApiController, ProfileController.
• Models (app/Models): User, Post, Video, Live, Transaction, Comment, Like, Follower. These encapsulate database interactions (Active Record or similar).
• Views (app/Views): PHP templates under auth/, home/, posts/, videos/, live/, profile/ plus shared layouts.
e. Persistence Layer
• Relational database (MySQL/PostgreSQL) defined by SQL migrations in database/migrations/*.
f. External Services
• OAuth providers (configured via config/oauth.php) for social login.
• Payment gateway (e.g., Stripe/PayPal) invoked by PaymentController.
• Potential streaming server or CDN for live video (LiveController may interact with an RTMP/WebSocket service).