How waiminkhant123/post_and_chat-laravel works
Post & Chat is a Laravel social application for browsing and sharing posts, with authenticated posting, media uploads, social connections, blocking, chat, and administration. The main flow is a visitor or signed-in user reaching web routes, which dispatch post requests to the post controller; it reads and writes application data, may upload media to Cloudinary, and returns Blade views. Authentication, profiles, social actions, and chat are distinct product stages. README documents Supabase PostgreSQL and role-based security; sampled source confirms post authorization and Cloudinary uploads. Other controller and route wiring is inferred only at the subsystem level because those files were not sampled.
Main entry points: web.php Web routes · PostController.php Post controller · views Blade views · ProfileController.php Profiles
Components 24
Web entry and views
- Web routes
routes/web.php - API routes
routes/api.php - Blade views
resources/views
Identity and access
- Authentication
app/Http/Controllers/Auth - User accounts
app/Models/User.php - Authorization gates
app/Providers/AuthServiceProvider.php
Posts and media
- Post controller
app/Http/Controllers/PostController.php - Post API
app/Http/Controllers/api/PostApiController.php - Post data
app/Models/Post.php - Media data
app/Models/Media.php - Categories
app/Models/Category.php - Cloudinary
Social and chat
- Profiles
app/Http/Controllers/ProfileController.php - Follow actions
app/Http/Controllers/FollowController.php - Friend actions
app/Http/Controllers/FriendController.php - Block records
app/Models/Block.php - Chat actions
app/Http/Controllers/ChatController.php - Messages
app/Models/Message.php - Comments
app/Http/Controllers/CommentController.php - Comment data
app/Models/Comment.php
Administration
- Admin controls
app/Http/Controllers/ProfileController.php - Admin views
resources/views/admin
Other components
- Visitor or user
- Supabase PostgreSQL
Connections 39
- Visitor or user → Web routes: requests pages
- Web routes → Post controller: dispatches posts
- Web routes → Authentication: dispatches identity
- Web routes → Profiles: dispatches profiles
- Web routes → Follow actions: dispatches follows
- Web routes → Friend actions: dispatches friends
- Web routes → Chat actions: dispatches chat
- Web routes → Comments: dispatches comments
- API routes → Post API: dispatches API
- Post controller → Post data: queries posts
- Post controller → Media data: stores media records
- Post controller → Categories: validates category
- Post controller → Cloudinary: uploads media
- Post controller → Authorization gates: checks post gate
- Post controller → Blade views: renders post pages
- Post API → Post data: queries posts
- Post API → Media data: stores media records
- Post API → Blade views: returns responses
- Authentication → User accounts: creates or checks accounts
- Authentication → Blade views: renders auth pages
- Profiles → User accounts: updates profiles
- Profiles → Block records: records blocks
- Profiles → Cloudinary: uploads avatars
- Profiles → Blade views: renders profiles
- Follow actions → Supabase PostgreSQL: persists follows
- Friend actions → Supabase PostgreSQL: reads relationships
- Chat actions → Messages: reads and writes
- Chat actions → Blade views: renders chat
- Comments → Comment data: reads and writes
- Admin controls → User accounts: manages accounts
- Admin controls → Blade views: renders admin pages
- Admin controls → Admin views: renders administration
- Post data → Supabase PostgreSQL: persists posts
- Media data → Supabase PostgreSQL: persists media metadata
- User accounts → Supabase PostgreSQL: persists accounts
- Block records → Supabase PostgreSQL: persists blocks
- Messages → Supabase PostgreSQL: persists messages
- Comment data → Supabase PostgreSQL: persists comments
- Categories → Supabase PostgreSQL: persists categories