Skip to content

feat: open page #34 #48

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

IkramBagban
Copy link
Contributor

@IkramBagban IkramBagban commented Mar 1, 2025

Resolves #34

  • add number of users, number of models trained, number of images generated, number of pack create requests, total revenue.
  • add daily charts
  • add seeding script to add dummy data to database
  • write types correctly and refactor the code
  • light & dark mode
  • add incremental site regeneration to revalidate data every hour

Dark
image
image

Light:
image
image

@IkramBagban IkramBagban mentioned this pull request Mar 2, 2025
@IkramBagban IkramBagban changed the title feat: open page feat: open page #34 Mar 3, 2025
@hkirat hkirat requested a review from yashmakhija March 13, 2025 23:44
app.get("/open", async (req, res) => {
console.log("in open");
const userCount = await prismaClient.user.count();
const trainedModelCount = await prismaClient.model.count({
Copy link
Contributor

Choose a reason for hiding this comment

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

this endpoint is doing too many DB calls. Can we make it more optimal?
Also cache this to 1 day intervals.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I already cached the data and revalidating every hour using ISR let me set it for a day

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.

Add a /open page
2 participants