How keepo-dot/gator works
Gator is a command-line RSS feed manager: users register or log in, add feeds, follow or unfollow feeds, and list users and feeds. The CLI dispatches commands to handlers, which use configuration and PostgreSQL-backed data access. RSS fetching and parsing are present, but the sampled source does not establish how aggregation invokes them; that connection is left out.
Main entry points: commands.go Command dispatch · database Database queries · main.go Startup · config.go User config
Components 20
CLI runtime
- Startup
main.go - Command dispatch
commands.go - Shared state
state.go - Login middleware
mw_logged_in.go
Users and config
- User commands
handler_user.go - Registration
handler_register.go - Reset users
handler_reset.go - User config
internal/config/config.go - Config file
Feed management
- Feed commands
handler_feeds.go - Add feed
handler_rss.go - Follow feed
handler_follow.go - List follows
handler_following.go - Unfollow feed
handler_unfollow.go - Feed aggregation
handler_agg.go - RSS fetch and parse
handler_rss.go
Persistence
- Database queries
internal/database - PostgreSQL
Other components
- CLI user
- RSS sources
Connections 28
- CLI user → Startup: runs command
- Startup → User config: reads config
- Startup → Database queries: opens database
- Startup → Shared state: builds state
- Startup → Command dispatch: runs dispatch
- Command dispatch → Login middleware: wraps commands
- Command dispatch → User commands: dispatches
- Command dispatch → Registration: dispatches
- Command dispatch → Reset users: dispatches
- Command dispatch → Feed commands: dispatches
- Command dispatch → Add feed: dispatches
- Command dispatch → Follow feed: dispatches
- Command dispatch → List follows: dispatches
- Command dispatch → Unfollow feed: dispatches
- Command dispatch → Feed aggregation: dispatches
- User commands → Database queries: queries users
- User commands → User config: sets current user
- Registration → Database queries: creates user
- Registration → User config: sets current user
- Reset users → Database queries: resets users
- Feed commands → Database queries: lists feeds
- Add feed → Database queries: saves feed and follow
- Follow feed → Database queries: creates follow
- List follows → Database queries: lists follows
- Unfollow feed → Database queries: deletes follow
- Database queries → PostgreSQL: queries
- User config → Config file: reads and writes
- RSS fetch and parse → RSS sources: fetches RSS