A community based topic aggregation platform built on atproto
1package communityFeeds
2
3import "context"
4
5// Service defines the business logic interface for feeds
6type Service interface {
7 // GetCommunityFeed returns posts from a specific community with sorting
8 // Supports hot/top/new algorithms, pagination, and viewer state
9 GetCommunityFeed(ctx context.Context, req GetCommunityFeedRequest) (*FeedResponse, error)
10
11 // Future methods (Beta):
12 // GetTimeline(ctx context.Context, req GetTimelineRequest) (*FeedResponse, error)
13 // GetAuthorFeed(ctx context.Context, authorDID string, limit int, cursor *string) (*FeedResponse, error)
14}
15
16// Repository defines the data access interface for feeds
17type Repository interface {
18 // GetCommunityFeed retrieves posts from a community with sorting and pagination
19 // Returns hydrated PostView objects (single query with JOINs)
20 GetCommunityFeed(ctx context.Context, req GetCommunityFeedRequest) ([]*FeedViewPost, *string, error)
21
22 // Future methods (Beta):
23 // GetTimeline(ctx context.Context, userDID string, limit int, cursor *string) ([]*FeedViewPost, *string, error)
24 // GetAuthorFeed(ctx context.Context, authorDID string, limit int, cursor *string) ([]*FeedViewPost, *string, error)
25}