git clone https://github.com/codecruz/gitstats-dashboard.git
cd gitstats-dashboard
Navigate to the backend
directory:
cd backend
Create a .env
file in the backend
directory based on the .env.example
file:
cp .env.example .env
Open the .env
file and fill in your GitHub token and username/organization name:
GITHUB_TOKEN=your_personal_access_token
GITHUB_USERNAME=your_github_username_or_organization
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_HOST=your_database_host
Install the backend dependencies:
npm install
Start the backend server:
npm start
Navigate to the frontend
directory:
cd ../frontend
Install the frontend dependencies:
npm install
Build the Tailwind CSS:
npm run build:css
The updateStats.js
script is responsible for populating the database with repository statistics (views, unique views, clones, unique clones) from the GitHub API. It will also add new repositories to the database if they are not already present.
Run the updateStats.js
script to populate the database with GitHub repository statistics:
node backend/updateStats.js
This will fetch data from the GitHub API and store it in the database, creating daily statistics for each repository.
Note: You should run this script periodically to keep your repository statistics up to date. You can automate this process with a cron job or run it manually as needed.
http://localhost:3000
in your web browser to view the statistics dashboard.If you would like to contribute to this project, please fork the repository and create a pull request with your changes. Ensure that your code adheres to the project’s coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
This project uses the following technologies:
These technologies combine to create a full-stack application that gathers GitHub repository statistics and displays them on a dashboard.