Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registered users over time #460

Open
3 tasks
hburn7 opened this issue Oct 6, 2024 · 2 comments
Open
3 tasks

Registered users over time #460

hburn7 opened this issue Oct 6, 2024 · 2 comments
Labels
area:stats good first issue Denotes something that is easy to implement and would make for a good initial contribution. type:feature

Comments

@hburn7
Copy link
Collaborator

hburn7 commented Oct 6, 2024

Overview

High level objective is to model the number of registered users over time. This is simply displaying a collection of time-series data.

  1. Write a database query that groups number of users by signup date (per day)
  2. Write a TimeSeriesDataPointDTO (if it doesn't exist) which maps this query result into a structure like object Y, DateTime X.
  3. Write a controller & service layer

Tasks

  • Create db query under the UserRepository @myssto if you think this should be in a StatsRepository instead let me know.
  • Create StatisticsService class (if it doesn't exist) with a method which maps the results to a collection of DTOs, i.e. ICollection<TimeSeriesDataPointDTO>
  • Create /api/v1/stats/registered-users route which returns
@hburn7 hburn7 added type:feature good first issue Denotes something that is easy to implement and would make for a good initial contribution. area:stats labels Oct 6, 2024
@myssto
Copy link
Contributor

myssto commented Oct 6, 2024

I think before we implement anything for the global stats page we should revisit caching. These will be expensive queries that will evaluate over entire tables and we shouldn't run them on every request. The results should be cached with a long lifetime

@hburn7
Copy link
Collaborator Author

hburn7 commented Oct 7, 2024

Could easily be cached on a 3-6 hour timer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:stats good first issue Denotes something that is easy to implement and would make for a good initial contribution. type:feature
Projects
None yet
Development

No branches or pull requests

2 participants