How victorh-silveira/insta-follow-manager works
Insta Follow Manager is a full-stack Instagram relationship triage app. Users authenticate, synchronize followers/following, browse cached lists by relationship type and display-name bucket, and unfollow or remove followers. The frontend is a Next.js UI over a FastAPI backend; application use cases coordinate Instagram and repository ports, with configurable Instagram adapters and SQLite caching. The README documents capabilities beyond the sampled excerpts; frontend-to-API wiring and some unsampled route details are therefore shown only as unverified links or omitted.
Main entry points: dependencies.py Dependency wiring · relationshipApi.ts Relationship API client · relationships.py Relationship routes · sqlite_profile_repository.py SQLite profile store
Components 27
Web interface
- Triage screen
frontend/src/app/page.tsx - Instagram login
frontend/src/components/InstagramLoginCard.tsx - Sync controls
frontend/src/components/SyncHeader.tsx - Relationship tabs
frontend/src/components/RelationshipTabs.tsx - Bucket filter
frontend/src/components/AlphabetBar.tsx - Profile actions
frontend/src/components/ProfileCard.tsx - Relationship API client
frontend/src/services/relationshipApi.ts
API presentation
- FastAPI app
backend/src/presentation/main.py - Auth routes
backend/src/presentation/api/routes/auth.py - Relationship routes
backend/src/presentation/api/routes/relationships.py - Health route
backend/src/presentation/api/routes/health.py - Dependency wiring
backend/src/presentation/api/dependencies.py
Use cases and domain
- Instagram authentication
backend/src/application/use_cases/auth_instagram.py - Relationship sync
backend/src/application/use_cases/sync_relationships.py - Filtered listing
backend/src/application/use_cases/list_profiles_by_bucket.py - Unfollow action
backend/src/application/use_cases/unfollow_profile.py - Remove follower
backend/src/application/use_cases/remove_follower.py - Profile model
backend/src/domain/entities/instagram_profile.py - Name buckets
backend/src/domain/value_objects/name_bucket.py - Instagram gateway port
backend/src/domain/gateways/instagram_gateway.py - Profile repository port
backend/src/domain/repositories/profile_repository.py
Adapters and persistence
- Instagrapi adapter
backend/src/infrastructure/gateways/instagrapi_gateway.py - Mock adapter
backend/src/infrastructure/gateways/mock_instagram_gateway.py - SQLite profile store
backend/src/infrastructure/persistence/sqlite_profile_repository.py - SQLite database
backend/src/infrastructure/persistence/database.py
Other components
- Manager
Connections 38
- Manager → Triage screen: uses
README.md - Triage screen → Relationship API client: requests data
- Instagram login → Relationship API client: requests auth
- Sync controls → Relationship API client: requests sync
- Relationship tabs → Relationship API client: requests lists
- Bucket filter → Relationship API client: filters lists
- Profile actions → Relationship API client: requests actions
- Relationship API client → Auth routes: calls API
- Relationship API client → Relationship routes: calls API
- FastAPI app → Auth routes: registers
backend/src/presentation/main.py - FastAPI app → Relationship routes: registers
backend/src/presentation/main.py - FastAPI app → Health route: registers
backend/src/presentation/main.py - Auth routes → Instagram authentication: invokes
backend/src/presentation/api/routes/auth.py - Relationship routes → Relationship sync: invokes
backend/src/presentation/api/routes/relationships.py - Relationship routes → Filtered listing: invokes
backend/src/presentation/api/routes/relationships.py - Relationship routes → Unfollow action: invokes
backend/src/presentation/api/routes/relationships.py - Relationship routes → Remove follower: invokes
backend/src/presentation/api/routes/relationships.py - Dependency wiring → Instagram authentication: constructs
backend/src/presentation/api/dependencies.py - Dependency wiring → Relationship sync: constructs
backend/src/presentation/api/dependencies.py - Dependency wiring → Filtered listing: constructs
backend/src/presentation/api/dependencies.py - Dependency wiring → Unfollow action: constructs
backend/src/presentation/api/dependencies.py - Dependency wiring → Remove follower: constructs
backend/src/presentation/api/dependencies.py - Dependency wiring → Instagrapi adapter: selects adapter
backend/src/presentation/api/dependencies.py - Dependency wiring → Mock adapter: selects adapter
backend/src/presentation/api/dependencies.py - Dependency wiring → SQLite profile store: constructs
backend/src/presentation/api/dependencies.py - Relationship sync → Instagram gateway port: fetches relationships
backend/src/application/use_cases/sync_relationships.py - Relationship sync → Profile repository port: replaces cache
backend/src/application/use_cases/sync_relationships.py - Filtered listing → Profile repository port: queries profiles
backend/src/application/use_cases/list_profiles_by_bucket.py - Unfollow action → Instagram gateway port: unfollows account
backend/src/application/use_cases/unfollow_profile.py - Unfollow action → Profile repository port: updates profile
backend/src/application/use_cases/unfollow_profile.py - Remove follower → Instagram gateway port: removes follower
backend/src/application/use_cases/remove_follower.py - Remove follower → Profile repository port: updates profile
backend/src/application/use_cases/remove_follower.py - Instagram authentication → Instagram gateway port: authenticates
backend/src/application/use_cases/auth_instagram.py - Profile model → Name buckets: derives bucket
backend/src/domain/entities/instagram_profile.py - SQLite profile store → SQLite database: reads and writes
backend/src/infrastructure/persistence/sqlite_profile_repository.py - SQLite profile store → Profile model: maps records
backend/src/infrastructure/persistence/sqlite_profile_repository.py - SQLite profile store → Name buckets: uses buckets
backend/src/infrastructure/persistence/sqlite_profile_repository.py - Instagrapi adapter → Instagram: communicates with