How lostcause/laravel-instagram-feed works
Laravel Instagram Feed manages authenticated Instagram profiles and exposes cached media feeds. The main workflow creates a profile, sends its user through OAuth, stores the resulting token, fetches and parses media, then serves cached feed data; scheduled commands refresh feeds and tokens. The graph also includes error notification and the HTTP client layer. Relationships are based on shown source references and README behavior; unsampled internals are represented only where documented, so some wiring is omitted.
Main entry points: Profile.php Profile model · Instagram.php Instagram API client · InstagramFeedServiceProvider.php Laravel service provider · RefreshAuthorizedFeeds.php Refresh feeds command
Components 18
Profiles and auth
- Create profile
src/Commands/CreateBasicProfile.php - Profile model
src/Profile.php - OAuth callback route
src/routes.php - OAuth callback handler
src/AccessTokenController.php - Access token
src/AccessToken.php - Profile and token store
database/migrations
Feed retrieval
- Instagram API client
src/Instagram.php - HTTP client wrapper
src/SimpleClient.php - Media parser
src/MediaParser.php - Feed cache
src/Profile.php - Request and token errors
src/Exceptions
Scheduled operations
- Refresh feeds command
src/Commands/RefreshAuthorizedFeeds.php - Refresh tokens command
src/Commands/RefreshTokens.php - Refresh failure email
src/Mail/FeedRefreshFailed.php
Laravel integration
- Laravel service provider
src/InstagramFeedServiceProvider.php
Other components
- Site user
- Application consumer
- Instagram API
Connections 27
- Site user → Create profile: creates profile
README.md - Create profile → Profile model: creates
src/Commands/CreateBasicProfile.php - Application consumer → Profile model: requests feed
README.md - Site user → Instagram API: authorizes access
README.md - Profile model → Instagram API client: builds auth URL
src/Profile.php - OAuth callback route → OAuth callback handler: routes callback
src/routes.php - OAuth callback handler → Profile model: loads and updates
src/AccessTokenController.php - Profile model → Instagram API client: requests tokens
src/Profile.php - Instagram API client → HTTP client wrapper: sends API requests
src/InstagramFeedServiceProvider.php - HTTP client wrapper → Instagram API: calls API
README.md - Profile model → Access token: stores token
src/Profile.php - Profile model → Profile and token store: persists profile
README.md - Access token → Profile and token store: persists token
src/AccessToken.php - Profile model → Instagram API client: fetches media
src/Profile.php - Instagram API client → Media parser: parses items
src/Instagram.php - Profile model → Feed cache: reads and writes
src/Profile.php - Refresh feeds command → Profile model: refreshes feeds
src/Commands/RefreshAuthorizedFeeds.php - Refresh feeds command → Refresh failure email: sends on failure
src/Commands/RefreshAuthorizedFeeds.php - Refresh feeds command → Request and token errors: handles bad tokens
src/Commands/RefreshAuthorizedFeeds.php - Refresh tokens command → Profile model: refreshes tokens
src/Commands/RefreshTokens.php - Profile model → Instagram API client: renews token
src/Profile.php - Refresh failure email → Profile model: checks authorization
src/Mail/FeedRefreshFailed.php - Laravel service provider → Refresh feeds command: registers command
src/InstagramFeedServiceProvider.php - Laravel service provider → Refresh tokens command: registers command
src/InstagramFeedServiceProvider.php - Laravel service provider → Create profile: registers command
src/InstagramFeedServiceProvider.php - Laravel service provider → OAuth callback route: loads routes
src/InstagramFeedServiceProvider.php - Laravel service provider → Instagram API client: binds client
src/InstagramFeedServiceProvider.php