Skip to content

Adds Support for multiple trackers on the main page.#37

Closed
Doonut wants to merge 4 commits into
Arcadia-Solutions:mainfrom
Doonut:add-all-trackers-support
Closed

Adds Support for multiple trackers on the main page.#37
Doonut wants to merge 4 commits into
Arcadia-Solutions:mainfrom
Doonut:add-all-trackers-support

Conversation

@Doonut
Copy link
Copy Markdown
Contributor

@Doonut Doonut commented Dec 25, 2025

Hey, I know this is a HUGE commit. I definitely took some guesses on what you would like with the project or not.

Refactor user stats to support multiple indexers and update tracker colors

This PR refactors the user stats API to support multiple indexers simultaneously and updates tracker colors to match actual brand colors. I did guess on some as I don't have access to every supported tracker.

Multi-Indexer Support

Changed from single indexer to multi-indexer format:

  • Before: API returned a single UserProfileVec for one indexer
  • After: API now returns Record<number, UserProfileVec> where each key is an indexer ID

The frontend components were updated to iterate over multiple indexers using Object.entries(), allowing charts to display data from multiple trackers simultaneously. Each tracker is now rendered with its own dataset and brand color.

Tracker Colors

  • Extracted real brand colors: Visited each tracker's website to identify and extract the most prominent colors from their logos / login buttons / gradients on the login page
  • Added color utility: Created trackerColors.ts with a mapping of tracker names to their brand colors

Impact

  • Charts can now display multiple trackers on the same graph with distinct colors
  • Better user experience when comparing stats across different indexers

@Doonut
Copy link
Copy Markdown
Contributor Author

Doonut commented Dec 25, 2025

Related to #7 and #22

pub date_to: NaiveDateTime,
}

fn parse_query_string(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't need to parse the query manually. I had some issues sending arrays as queries. Instead, either use another lib to deserialize the query, or use a POST request with a json body which is more robust

let user_stats_reduced = UserProfileVec::from_vec(user_stats);
.find_user_stats(&query.indexer_ids, &query.date_from, &query.date_to)
.await
.map_err(|e| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can just use ? to propagate the error

@FrenchGithubUser
Copy link
Copy Markdown
Contributor

done with 9c016af

since I didn't get a reply from you, I decided to do it myself. However, feel free to submit other PRs in the future, I'll try to not miss them next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants