Hacker News, but for Hack Club. A near-pixel clone of news.ycombinator.com built with SvelteKit + Supabase. Only the logo and "Hack Feed" header differ.
Features:
- Front page (HN gravity ranking) +
new,ask,show,jobsfeeds - Username + password auth (no email), identical to HN's
/login//submit - Submit link or text posts
- Up/down voting on posts (works without JavaScript)
- Per-user karma, user profiles
At supabase.com, create a project. Then SQL Editor → New query,
paste the contents of supabase/schema.sql, and run it. This creates the
tables, row-level-security policies, and the score/karma triggers..
No auth settings need changing — accounts are created and auto-confirmed server-side with the service-role key, so the default email provider is fine and users never deal with email..
cp .env.example .envFill in from Project Settings → API:
PUBLIC_SUPABASE_URL— Project URLPUBLIC_SUPABASE_ANON_KEY—anonpublic keySUPABASE_SERVICE_ROLE_KEY—service_rolesecret key (server-only, used to register users)
npm install
npm run devvOpen http://localhost:5173, click login, create an account, and submit a post.
Supabase Auth requires an email, but HN uses bare username/password. Each username maps to a stable
synthetic email (([email protected]) that users never see. Signup uses the service-role
client ((src/lib/server/admin.js) to create + auto-confirm the account and insert a profiles row;
login uses the normal anon client so the session lives in cookies ((@supabase/ssr).
src/
hooks.server.js per-request Supabase client + session helper
app.css HN-faithful styles
lib/
util.js time-ago, ranking, comment-tree
components/ Vote, PostList, Feed, Comment
server/
admin.js service-role client (lazy)
auth.js username -> email, validation
feed.js paginated post-list loader
routes/
+layout.svelte orange top bar + footer
+page front page (ranked)
newest|ask|show|jobs filtered feeds
item story permalink (link + text body)
submit new post (redirects to /login when logged out)
login login + create-account (HN style)
logout sign out
user profile
vote/+server.js POST upvote/downvote toggle
supabase/schema.sql database schema, RLS, triggers
rs
hema, RLS, triggers