You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/project/2024/12-09-hackernews-new-jobs/index.mdx
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,16 +17,40 @@ import HackerNewsNewJobsImage from '../../../../content/project/2024/12-09-hacke
17
17
18
18
## Overview
19
19
20
-
Amet tempor ut incididunt in fugiat nisi aute pariatur adipisicing ipsum eiusmod laborum id. Cillum est nostrud eu incididunt magna nisi eiusmod eiusmod duis. Sint id ipsum occaecat laborum eiusmod nisi id veniam cillum in ullamco culpa minim ut. Aliqua aliquip ad nostrud incididunt dolore aliqua ullamco laboris excepteur esse veniam. Sunt aliquip enim eiusmod ea exercitation dolor aliqua esse elit ex non. Proident proident sit laborum ipsum.
20
+
Job ads aggregator for the HackerNews "Who’s Hiring" threads with focus on fresh and recurring job opportunities.
21
+
22
+
## Goals
23
+
24
+
Evaluate the potential of the idea and the level of interest for a website of this type. Build MVP quickly.
21
25
22
26
## Tech stack
23
27
24
28
- Next.js, ShadcnUI, TailwindCSS
25
29
- SQLite, better-sqlite3
26
30
- Keyv, Keyv LRU, node-cron, Docker
27
31
32
+
## Features
33
+
34
+
- Group companies into 3 categories: 1. First time, 2. New, 3. Old
35
+
- Visualize data with graphs
36
+
- Link and sort ads chronologically
37
+
- Search company posting history
38
+
- Automate parsing with cron jobs
39
+
- Improve performance with caching and server side rendering
40
+
- Deploy with Docker
41
+
42
+
## Implementation details
43
+
44
+
## Lessons learned
45
+
46
+
- Idea and project got most attention on HackerNews because the public is already profiled and familiar with "Who’s Hiring" threads.
47
+
- HackerNews is very strict with scraping their pages, best to use alternative data sources.
48
+
- Keyv cache instance is available only within the original Next.js app process, and `cache.clear()` call from the cron script that runs in a separate Node.js process does not have any effect. Solved by detecting database change and clearing cache in the original Next.js app. Cache that runs as a standalone process like Redis would also work.
49
+
- It is not possible to run cron in Docker as non-root user, so it is best to use Node.js or Go package for scheduling tasks inside Docker.
50
+
28
51
## Links
29
52
30
-
- Demo: <Linkhref="https://hackernews-new-jobs.arm1.nemanjamitic.com"variant="link-markdown"target="_blank"title="HackerNews new jobs demo" />
31
-
- Repository: <Linkhref="https://github.com/nemanjam/hn-new-jobs"variant="link-markdown"target="_blank"title="HackerNews new jobs repository" />
0 commit comments