Hey, this is a simple project i made for fun, which displays the pinned repositories of a GitHub user in a simple and clean way
A live version of the project can be found here
- Clone the repository
- Start the backend
deno run -A main.ts
- Open frontend in your browser:
Route | Description |
---|---|
/pinned/:username |
Displays the pinned repositories of the given user (returns an HTML document) |
/raw/:username |
Returns the pinned repositories in JSON format |
/image/:username |
Returns a rendered image (with transparent background) of the pinned repositories |
/image/:username
is currently disabled entirely
graph TB
A[User requests data]
A --> B(Is the user in the cache?)
B -- No --> C(Freshly fetch data)
B -- Yes --> D(Is the data on the main page older than 1 minute?)
D -- No --> E(Return cached data directly)
D -- Yes --> F(Have the pins on the main page significantly changed?)
F -- No --> G(Return cached data directly)
F -- Yes --> H(Freshly fetch data)
H --> I(Update cache)
C --> I