https://github.com/abhub23/github-metrics
The idea was to integrate Api's from github and make something cool out of it Hope your github profile beats the other. Please Do Checkout.
https://github.com/abhub23/github-metrics
api-wrapper githubapiwrapper
Last synced: 3 months ago
JSON representation
The idea was to integrate Api's from github and make something cool out of it Hope your github profile beats the other. Please Do Checkout.
- Host: GitHub
- URL: https://github.com/abhub23/github-metrics
- Owner: abhub23
- Created: 2025-01-26T06:53:03.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T11:10:06.000Z (3 months ago)
- Last Synced: 2025-02-22T12:19:47.234Z (3 months ago)
- Topics: api-wrapper, githubapiwrapper
- Language: TypeScript
- Homepage:
- Size: 3.51 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React + TypeScript + Vite + Github API's
This Project takes two Github profiles and compare them on various stats which are stated by the deveoper to code base of this Repository.
# How to run Locally?
First clone the repository into your machine
```bash
git clone https://github.com/abhub23/Github-Metrics.git
```Followed by installing required npm packages
```bash
npm install
```Make sure you have latest version of [Node](https://nodejs.org/en) and [TypeScript](https://www.typescriptlang.org/download/) installed in your System Locally
Finally run the following command to run on your localhost
```bash
npm run dev
```## New Things i have learned during this Project
- Giving types to my enviorment variables (env) for type safety using the **_vite-env.d.ts_** file from src in VITE
- The _vite-env.d.ts_ file looks like this for variable VITE_API
```typescript
// src/vite-env.d.ts or vite-env.d.ts in the root (both work)
///interface ImportMetaEnv {
readonly: string; // Declare VITE_API as a string type
}interface ImportMeta {
readonly VITE_API: string;
}
```- The env variables can be used using **_import.meta.env.VITE_API_**
- Also in Vite we don't need dotenv package, Vite handles that itself and env variables should always start with VITE\_ thats a convention