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

Add "About Us" Section with Dynamic Stats #23

Closed
JustinhSE opened this issue Oct 12, 2024 · 10 comments · Fixed by #48
Closed

Add "About Us" Section with Dynamic Stats #23

JustinhSE opened this issue Oct 12, 2024 · 10 comments · Fixed by #48
Assignees
Labels
Enhancement 🚀 New feature or request hacktoberfest

Comments

@JustinhSE
Copy link
Collaborator

JustinhSE commented Oct 12, 2024

Overview

We aim to enhance our website by incorporating a new "About Us" section. This section will feature dynamic statistics that reflect the vibrancy and activity of our project. The statistics to be displayed include:

  • Number of contributors
  • Number of lines of code
  • Number of commits

These stats should be automatically updated by connecting them to our GitHub repository, ensuring real-time accuracy. For the implementation, we recommend using the Number Ticker component from Magic UI, as detailed in the documentation: Magic UI Number Ticker.

Task

  1. Develop and integrate an "About Us" section (use routing in Next.js).
  2. Implement the Number Ticker component to display the following statistics:
    • Total number of contributors
    • Total number of lines of code
    • Total number of commits
  3. Establish a connection with our GitHub repository to ensure the statistics are dynamically updated.
  4. Test the functionality to confirm the accuracy and responsiveness of the stats display.

Note: If you require assistance or have ideas for additional statistics or other enhancements, please contribute to the discussion thread below. Your input is valuable to us!

@JustinhSE JustinhSE added Enhancement 🚀 New feature or request hacktoberfest labels Oct 12, 2024
@JustinhSE JustinhSE changed the title Add "About Us" Section with Dynamic Stats to Homepage Add "About Us" Section with Dynamic Stats Oct 12, 2024
@JustinhSE
Copy link
Collaborator Author

For more info about this issue, you can use the GitHub api

Commit Count

To get the total number of commits:

  1. Use the "List commits" endpoint from the GitHub REST API[1].
  2. Make a GET request to https://api.github.com/repos/Namit2111/bible-verse-finder/commits .
  3. Set the per_page parameter to 1 and page to 1 to minimize data transfer.
  4. The response will include a Link header with a last URL. Extract the page parameter from this URL, which represents the total number of pages.
  5. Multiply the number of pages by the per_page value to get the total commit count.

Number of Contributors

To get the number of contributors:

  1. Use the "Get all repository contributors" endpoint[1].
  2. Make a GET request to https://api.github.com/repos/Namit2111/bible-verse-finder/contributors.
  3. Count the number of items in the response array to get the total number of contributors.

Lines of Code

  1. Use the "Get the weekly commit activity" endpoint.
  2. Make a GET request to https://api.github.com/repos/Namit2111/bible-verse-finder/stats/code_frequency.
  3. The response will be an array of weekly data points, each containing additions and deletions.
  4. Sum up all the additions and subtractions to get an estimate of the total lines of code.

@JustinhSE
Copy link
Collaborator Author

@d-beloved just briefly explain your approach so I can assign you

@d-beloved
Copy link
Contributor

@d-beloved just briefly explain your approach so I can assign you

I will look into this issue a bit more over the weekend. But your comments on getting the needed statistic is a good starting point @JustinhSE. When I get other ideas of what else can be incorporated, I will start a discussion here.

@maiHydrogen
Copy link
Contributor

hey @d-beloved !!!
Justin sir has asked me to communicate with you regarding the build of the about us page so can i get your discord or something where can we discuss more properly??

@d-beloved
Copy link
Contributor

d-beloved commented Oct 18, 2024 via email

@JustinhSE
Copy link
Collaborator Author

@d-beloved any updates?

@d-beloved
Copy link
Contributor

@d-beloved any updates?

@JustinhSE I'm speaking with @maiHydrogen, you will get feedback today on how we've agreed to go about it.

@JustinhSE
Copy link
Collaborator Author

JustinhSE commented Oct 21, 2024 via email

@d-beloved
Copy link
Contributor

@JustinhSE do you think the number of GitHub Stars should also be added, and a cta to have people star the project on GitHub?

@JustinhSE
Copy link
Collaborator Author

JustinhSE commented Oct 21, 2024 via email

@d-beloved d-beloved mentioned this issue Oct 28, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 🚀 New feature or request hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants