How tiodwisatrio/sosmedhub works
Sosmedhub is a Laravel application for scheduling Instagram posts. Its main workflow is account registration and approval, connecting an Instagram Business account through Facebook, composing and scheduling media with a caption, then automatic publication and failure notification. The graph also preserves account administration, post history, and the shared user/account/post data layer. Relationships for unsampled publishing, Facebook OAuth, and notification internals are shown only where the README documents the behavior; their implementation details were not inspected.
Main entry points: ScheduledPostController.php Post composer · ScheduledPostService.php Post service · PublishScheduledPostJob.php Publish job · SocialAccount.php Connected account
Components 24
Access & accounts
- User
app/Models/User.php - Registration & login
routes/auth.php - Approval gate
app/Http/Middleware/EnsureUserIsApproved.php - Account management
Modules/SocialAccount/app/Http/Controllers/Admin/SocialAccountController.php - Facebook connect
Modules/SocialAccount/app/Http/Controllers/Admin/FacebookConnectController.php - Instagram API
Modules/SocialAccount/app/Services/InstagramGraphService.php
Post scheduling
- Post composer
Modules/Scheduler/app/Http/Controllers/Admin/ScheduledPostController.php - Post validation
Modules/Scheduler/app/Http/Requests/Concerns/ValidatesPostFormats.php - Schedule slots
Modules/Scheduler/app/Rules/OnScheduleSlot.php - Post service
Modules/Scheduler/app/Services/ScheduledPostService.php - Media processing
Modules/Scheduler/app/Services/MediaProcessor.php
Publishing
- Due-post dispatch
Modules/Scheduler/app/Console/DispatchDuePostsCommand.php - Publish job
Modules/Scheduler/app/Jobs/PublishScheduledPostJob.php - Publication runner
Modules/Scheduler/app/Services/PublicationRunner.php - Instagram publisher
Modules/SocialAccount/app/Services/InstagramPublisher.php - Failure notification
Modules/Scheduler/app/Notifications/PostFailedNotification.php
Shared data
- Connected account
Modules/SocialAccount/app/Models/SocialAccount.php - Scheduled post
Modules/Scheduler/app/Models/ScheduledPost.php - Post media
Modules/Scheduler/app/Models/ScheduledPostMedia.php - Publication records
Modules/Scheduler/app/Models/ScheduledPostPublication.php
Other components
- Post creator
- Laravel scheduler
Connections 22
- Post creator → Registration & login: registers / signs in
README.md - Registration & login → Approval gate: enters gated app
- Post creator → Facebook connect: connects account
README.md - Facebook connect → Facebook: authorizes through
README.md - Account management → Instagram API: requests profile / tokens
Modules/SocialAccount/app/Http/Controllers/Admin/SocialAccountController.php - Account management → Connected account: persists account
Modules/SocialAccount/app/Http/Controllers/Admin/SocialAccountController.php - User → Connected account: owns
Modules/SocialAccount/app/Models/SocialAccount.php - Post creator → Post composer: composes and schedules
README.md - Post composer → Post validation: validates formats
- Post composer → Schedule slots: checks schedule slot
- Post composer → Post service: stores or updates
Modules/Scheduler/app/Http/Controllers/Admin/ScheduledPostController.php - Post composer → Connected account: selects account
Modules/Scheduler/app/Http/Controllers/Admin/ScheduledPostController.php - Post service → Scheduled post: writes post
Modules/Scheduler/app/Services/ScheduledPostService.php - Post service → Post media: manages media
Modules/Scheduler/app/Services/ScheduledPostService.php - Post service → Publication records: manages formats
Modules/Scheduler/app/Services/ScheduledPostService.php - Post service → Media processing: processes uploads
Modules/Scheduler/app/Services/ScheduledPostService.php - Laravel scheduler → Due-post dispatch: runs due checks
- Due-post dispatch → Publish job: dispatches due posts
- Publish job → Publication runner: runs publication
- Publication runner → Instagram publisher: publishes media
- Instagram publisher → Instagram: publishes to
README.md - Publish job → Failure notification: notifies on failure
README.md