This service provides personalized feed functionality for the CircleConnect platform.
- Personalized feed based on user's joined communities
- Recommendation system based on post popularity, user preferences, and demographics
- Feed sorting options (by date, relevance, popularity)
- User preference management
-
GET /api/feed- Retrieve personalized feed for authenticated user- Query parameters:
sort_by- Sort method (date, relevance, popular)community_id- Filter by communitytags- Filter by tagspage- Page numberlimit- Items per page
- Query parameters:
-
GET /api/feed/recommended- Get recommended posts- Query parameters:
page- Page numberlimit- Items per page
- Query parameters:
GET /api/feed/preferences- Get user feed preferencesPUT /api/feed/preferences- Update user feed preferences
- Go 1.21+
- MongoDB
- PostgreSQL
- Clone the repository
- Copy
.env.exampleto.envand modify as needed - Run
go mod downloadto install dependencies - Run
go run main.goto start the service
docker-compose up -dPORT- Server port (default: 4004)MONGO_URI- MongoDB connection URIPOSTGRES_URI- PostgreSQL connection URIMONGO_DB_NAME- MongoDB database nameENVIRONMENT- Runtime environment (development/production)JWT_SECRET- Secret key for JWT validationUSER_SERVICE_URL- User service endpoint URLPOST_SERVICE_URL- Post service endpoint URLCOMMUNITY_SERVICE_URL- Community service endpoint URL