A lightweight analytics tool to fetch posts from a subreddit, extract keywords, and identify trends. It enriches posts (sentiment/summary) with the help of gemma3 1b through ollama
Built with Micronaut and a local DynamoDB database.
- Framework: Micronaut
- Language: Java 21
- Database: AWS DynamoDB (Local)
- Build Tool: Gradle
- Java 21
- Docker & Docker Compose
- AWS CLI
docker-compose up -daws configure --profile localAWS Access Key ID : DUMMYKEY
AWS Secret Access Key : DUMMYSECRET
Default region name: eu-west-3
Default output format: jsonaws dynamodb create-table \
--table-name reddit-posts \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--billing-mode PAY_PER_REQUEST \
--endpoint-url http://localhost:8000 \
--region eu-west-3 \
--profile localOr run the shell:
create-table.shollama is BEEFY (>5GB). Make sure you have enough room for it
docker compose up -dThe admin GUI will be available here: dynamodb-admin
./gradlew run- Fetch Posts
Fetches and saves posts from Reddit.
curl -X POST "http://localhost:8082/reddit/fetch?subreddit=socialmedia&limit=50"- Get Top Keywords
Returns the most frequent keywords for a given subreddit.
curl "http://localhost:8082/analytics/top-keywords?subreddit=socialmedia&days=30"- Compare Keywords
Compares the frequency of specific keywords.
curl "http://localhost:8082/analytics/compare-keywords?subreddit=socialmedia&terms=tiktok,instagram"- Get top flairs
Returns the most frequent flairs used for a given subreddit.
curl "http://localhost:8082/analytics/top-flairs?subreddit=socialmedia"- Get the frequency evolution of a keyword over time
Get the frequency evolution of a keyword over time (by hour, day, week, month)
curl "http://localhost:8082/analytics/keyword-trends?subreddit=socialmedia&keyword=tiktok"