https://github.com/markterence/hoshizora
星空 - some basic image or svg thing (a work in progress)
https://github.com/markterence/hoshizora
cloudflare-workers hono hono-api static-site vite
Last synced: about 2 months ago
JSON representation
星空 - some basic image or svg thing (a work in progress)
- Host: GitHub
- URL: https://github.com/markterence/hoshizora
- Owner: markterence
- License: mit
- Created: 2025-10-11T08:12:43.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-08T10:18:58.000Z (7 months ago)
- Last Synced: 2025-11-08T12:08:18.308Z (7 months ago)
- Topics: cloudflare-workers, hono, hono-api, static-site, vite
- Language: TypeScript
- Homepage: https://hoshizora.markterence.me/
- Size: 517 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
星空 (hoshizora)
- [The Blog](https://notes.markterence.me/66116/hoshizora-one-of-my-quick-weekend-project)
## Demo
Show usernames:
Hide usernames:
Empty, when no stargazers yet: (default message is "A quiet night sky" and cannot be changed)
**Example snippet:**
```html
```
## Live
```
https://hoshizora.markterence.me/github-stargazers/:github-username/:repo?show=show_usernames=1
```
Currently, the live version only accept my repositories(`markterence`) as I haven't set up a caching configuration and it's not production ready. This is also a precaution to avoid hitting GitHub API rate limits. You can open an issue to request adding your GitHub user/org handle to the allowed list (it must be your own not someone else's or your Github org you manage).
## Development
To install dependencies:
```sh
pnpm install
```
To run in development
```sh
pnpm run dev
```
**Setup Environment Variables:**
Create a `.env` file in your project root with the following variables:
```bash
GITHUB_API_TOKEN=github_pat_your_token_here
ALLOWED_GITHUB_OWNERS=user1,user2,organization1
```
- `GITHUB_API_TOKEN`: GitHub Personal Access Token with repo read permissions. (Create token in [GitHub Settings > Developer settings](https://github.com/settings/personal-access-tokens)
- `ALLOWED_GITHUB_OWNERS`: Comma-separated list of GitHub usernames allowed to use the service. Example: `markterence,myfriend1`
## Endpoints
### Stargazer SVG Card
```txt
GET /github-stargazers/:owner/:repo
```
**Query Params**
| Query | Description | Value
| --- | --- | --- |
| `show_usernames` | Should it show the first three user who starred the repo. | Example Value: `true`, `1` |
## LICENSE
- Website code, design, and content are licensed under [CC BY 4.0](LICENSE-CCBY).
- **TL;DR:** You are free to use, share, and adapt as long as you give appropriate credit.
- All backend source code files (backend logic if present) are licensed under the [MIT License](LICENSE).
See the individual license files for full terms.