Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .dev.vars.example
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
SUPABASE_URL=
SUPABASE_ANON_KEY=
REPLICATE_API_TOKEN=
4 changes: 0 additions & 4 deletions .github/workflows/update_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,3 @@ jobs:

- name: Call updateContent script
run: npm run updateContent
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,44 @@

It's really hard to keep up with open source machine learning. Almost every new Python repo on GitHub is an ML repo, so we made a website that displays all the latest Python repos in a HN-like list. We also added Replicate and HuggingFace models, and posts from r/{LocalLLaMA,MachineLearning,StableDiffusion}.

The website is updated every hour.
The website is updated every hour via GitHub Actions.

## Local Dev

```bash
npm install
cp .dev.vars.example .dev.vars # fill in values
npm run dev
cp .dev.vars.example .dev.vars # add your REPLICATE_API_TOKEN
npm run dev # uses local D1 database
```

## Deploy
To develop against the remote D1 database:
```bash
wrangler dev --remote
```

## Deploy (New Setup)

```bash
wrangler secret put SUPABASE_URL
wrangler secret put SUPABASE_ANON_KEY
# 1. Create D1 database
wrangler d1 create hype

# 2. Update database_id in wrangler.jsonc with the ID from step 1

# 3. Run migration
wrangler d1 execute hype --remote --file=migrations/0001_init.sql

# 4. Set secrets
wrangler secret put REPLICATE_API_TOKEN

# 5. Deploy
npm run deploy
```

Content updates hourly. Manual trigger: `npm run updateContent`.
## Data Updates

Content updates hourly via GitHub Actions, which calls the `/api/update` endpoint.

Manual trigger: `npm run updateContent`

## Want to run AI models yourself?

Expand Down
19 changes: 19 additions & 0 deletions migrations/0001_init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Create repositories table
CREATE TABLE IF NOT EXISTS repositories (
id TEXT NOT NULL,
source TEXT NOT NULL,
username TEXT NOT NULL,
name TEXT,
description TEXT,
stars INTEGER DEFAULT 0,
url TEXT,
created_at TEXT,
inserted_at TEXT DEFAULT (datetime('now')),
PRIMARY KEY (id, source)
);

-- Indexes for common queries
CREATE INDEX IF NOT EXISTS idx_repos_source ON repositories(source);
CREATE INDEX IF NOT EXISTS idx_repos_created ON repositories(created_at);
CREATE INDEX IF NOT EXISTS idx_repos_inserted ON repositories(inserted_at);
CREATE INDEX IF NOT EXISTS idx_repos_stars ON repositories(stars DESC);
141 changes: 5 additions & 136 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"private": true,
"type": "module",
"dependencies": {
"@supabase/supabase-js": "^2.12.1",
"chanfana": "2.8.3",
"hono": "4.11.1",
"mustache": "^4.2.0",
Expand Down
Loading