How mario-sh/thesocialnetwork works
TheSocialNetwork is a PHP/MySQL social network whose main flow is user authentication followed by feed and social interactions through AJAX endpoints. Separate branches cover friend requests, profile management, polling-based chat, and the moderator/admin back office. The README documents the frontend-to-API and API-to-MySQL architecture; sampled endpoint code confirms token validation and several domain operations. Some UI/API links and unsampled features are therefore shown only where documented, not inferred from naming.
Main entry points: auth_check.php Token validation · schema.sql MySQL database · auth Authentication · back-office Back-office pages
Components 22
Client experience
- Client pages
vues/clients - Browser API helpers
assets/js/utils.js - Sign-in and recovery
vues/clients/login.html - Feed interface
vues/clients/accueil.html - Friends interface
vues/clients/amis.html - Profile interface
vues/clients/profil.html - Chat interface
vues/clients/chat.html
Social features
- Posts and reactions
api/posts - Comments
api/posts - Friend requests
api/friends - Profile updates
api/profile/update_profile.php - Messaging
api/chat
API and data
- Authentication
api/auth - Token validation
api/auth_check.php - API configuration
api/config.example.php - MySQL database
database/schema.sql
Administration
- Back-office pages
vues/back-office - Admin sign-in
api/admin/login_admin.php - Dashboard statistics
api/admin/get_stats.php - User management
api/admin/manage_users.php - Post moderation
api/admin/manage_posts.php
Other components
- Visitor or member
Connections 33
- Visitor or member → Sign-in and recovery: opens
README.md - Sign-in and recovery → Authentication: submits credentials
README.md - Authentication → MySQL database: stores and checks tokens
README.md - Authentication → Sign-in and recovery: returns token
README.md - Client pages → Browser API helpers: uses API helpers
README.md - Browser API helpers → Authentication: sends AJAX requests
README.md - Feed interface → Posts and reactions: loads and changes posts
README.md - Feed interface → Comments: loads and adds comments
README.md - Friends interface → Friend requests: manages invitations
README.md - Profile interface → Profile updates: updates profile
README.md - Chat interface → Messaging: polls and sends
README.md - Back-office pages → Admin sign-in: authenticates
README.md - Back-office pages → Dashboard statistics: loads dashboard
README.md - Back-office pages → User management: manages users
README.md - Back-office pages → Post moderation: moderates posts
README.md - Posts and reactions → Token validation: requires token check
api/posts/get_posts.php - Comments → Token validation: requires token check
api/posts/add_comment.php - Friend requests → Token validation: requires token check
api/friends/get_friends.php - Profile updates → Token validation: requires token check
api/profile/update_profile.php - Messaging → Token validation: requires token check
api/chat/get_messages.php - Dashboard statistics → Token validation: requires token check
api/admin/get_stats.php - User management → Token validation: requires token check
api/admin/manage_users.php - Post moderation → Token validation: requires token check
api/admin/manage_posts.php - Token validation → MySQL database: validates token against
api/auth_check.php - Posts and reactions → MySQL database: reads and writes
api/posts/get_posts.php - Friend requests → MySQL database: reads and writes
api/friends/get_friends.php - Profile updates → MySQL database: updates profile
api/profile/update_profile.php - Messaging → MySQL database: reads and writes messages
api/chat/get_messages.php - Dashboard statistics → MySQL database: queries statistics
api/admin/get_stats.php - User management → MySQL database: reads and changes users
api/admin/manage_users.php - Post moderation → MySQL database: manages publications
README.md - Authentication → Token validation: protects later requests
README.md - API configuration → MySQL database: configures connection
README.md