An application where you can view/compare news. Oh and it also checks for bad content :D https://yhw.tw/news?forward=tools
Find a file
2025-06-04 22:51:08 +08:00
.github Update docs. 2025-05-27 09:36:44 +08:00
about Ok? It maybe works? 2025-05-22 20:31:50 +08:00
components Delete old components from a month ago? & Update draggable window to be using the native svgs by lucide icons & updated the news page to activate the tab changing animation when changing tabs & added caching into the [slug].ts file in publishers/lt & added a basic endpoint for searching for sources. 2025-06-04 22:30:02 +08:00
database Switch to a different algroithm. 2025-05-21 10:20:33 +08:00
i18n Change to axios as there is no way to get the profile pic via the raw 2025-06-03 16:40:25 +08:00
layouts Remove legacy macui.vue. 2025-05-27 14:27:30 +08:00
lib feat: update footer link formatting and add shadcn-nuxt integration 2025-05-08 20:48:51 +08:00
pages Update README & used the wrong js-confeti package & removed axios, as it 2025-06-04 00:38:32 +08:00
public [ImgBot] Optimize images 2025-05-25 13:59:16 +00:00
server Fix 2025-06-04 22:38:17 +08:00
styles Add tailwind scrollbar && Loading logic? 2025-05-27 09:02:05 +08:00
.dockerignore Jsut testing in prod :( 2025-05-09 23:02:01 +08:00
.env.example Made the basic newsView, the only issue? You need to luanch the window TWICE in order to see the window, strange behavior? this also exists before btw. 2025-05-30 00:29:59 +08:00
.gitignore Change to axios as there is no way to get the profile pic via the raw 2025-06-03 16:40:25 +08:00
.prettierignore Update docs. 2025-05-27 09:36:44 +08:00
app.vue After a few hours debugging css, It finally looks really good, like xfce :D 2025-05-11 16:32:10 +08:00
bun.lock Missing files from last commit. 2025-06-04 00:38:56 +08:00
clean-dev-env.sh Add a new script to purge the dev env, as Nuxt is super unstable. & update some lang stuff. 2025-05-27 15:39:33 +08:00
cleardatabase.ts Remove some files & trying to make the desktop look more fun & I'm going 2025-05-22 00:09:01 +08:00
CODE_OF_CONDUCT.md Fix the code of conduct file name 2025-05-16 23:39:15 +08:00
components.json feat: update footer link formatting and add shadcn-nuxt integration 2025-05-08 20:48:51 +08:00
content.config.ts Test docs & made the default windows size to be bigger. 2025-05-19 01:01:26 +08:00
createDatabase.ts Delete old components from a month ago? & Update draggable window to be using the native svgs by lucide icons & updated the news page to activate the tab changing animation when changing tabs & added caching into the [slug].ts file in publishers/lt & added a basic endpoint for searching for sources. 2025-06-04 22:30:02 +08:00
design.pdf Refactor code structure for improved readability and maintainability 2025-05-13 20:43:39 +08:00
docker-compose.yml Add .env support in to the docker compose && remove the old .env.exmple data. 2025-05-25 19:31:28 +08:00
Dockerfile In the end, the server's main drive "/" is used up to 100%... 2025-05-15 11:48:07 +08:00
error.vue feat: enhance UI components and add accordion functionality 2025-05-13 09:40:37 +08:00
LICENSE Add a login wall on a few windows, but still no auth / login logic 2025-05-17 20:50:23 +08:00
nginx.conf News window & make the hot news that uses google news rss legacy. 2025-06-01 08:15:53 +08:00
nuxt.config.ts News window & make the hot news that uses google news rss legacy. 2025-06-01 08:15:53 +08:00
package.json Missing files from last commit. 2025-06-04 00:38:56 +08:00
prettier.config.js still broken chatbot. 2025-05-13 23:09:11 +08:00
README.md Update README 2025-06-04 22:51:08 +08:00
sentry.client.config.ts feat: integrate Sentry for error tracking and performance monitoring 2025-05-11 14:40:22 +08:00
sentry.server.config.ts feat: integrate Sentry for error tracking and performance monitoring 2025-05-11 14:40:22 +08:00
tailwind.config.js Add docs :) 2025-05-20 15:22:35 +08:00
tsconfig.json Init 2025-05-06 09:19:48 +08:00

新聞解析 / News Analyze

 CodeRabbit Pull Request Reviews LICENSE GitHub Actions Workflow Status

App Design: PDF Document

Reverse engineering documentation: about

Before deploying, please know this:

This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried hit yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so.

Note for developing.

The desktop enviroment is super unstable when even using a beefy computer, even so, the desktop will lag when opening the newsView, like it's just hates being in a dev env. Prod app works tho, so you can demo it using bun run build && bun run preview for demoing. Please don't file a issue request for this matter. If you have the fix, please contribute using Github PRs.

news.yuanhau.com is now back up and running!

Why? Tailscale is changing the dns server to 100.100.100.100 and it just won't find the thing correct, so I just nuked it off my server :). It works now. (Also deploying to zeabur hurt my wallet, as my system is too costly there). oof

Why?

我們使用這個新聞來舉例:

朱立倫批政府像希特勒德國在台協會:不應為政治扭曲歷史| 政治 - 中央社 CNA
5/7/2025, 11:17:00 PM
類似新聞:
  - 朱立倫批政府像希特勒德國在台協會:不應為政治扭曲歷史| 政治 - 中央社 CNA
  - 快訊/硬起來!朱立倫回擊德國在台協會:外國政府不該干預各國內政 - 富房網
  - 綠委憂希特勒說釀災 外交部:全力向駐台館處說明 - 經濟日報
  - 「朱立倫道歉」!亂比喻遭德國、以色列譴責 民進黨:賠上台灣國際名譽 - 奇摩新聞
  - 洪聖斐觀點》獨裁餘毒罵人「法西斯」 朱立倫東施效顰共產黨| 政治 - Newtalk新聞

你會看到許多觀點,但不知道這些新聞為什麼會寫比較偏見的文章。

Inspired by

  • puter.com
  • Perplexity
  • Ground.news
  • Threads (政治方面)
  • xfce's Desktop Interface
  • juice website
  • Windows XP style X - UI
  • Ghostty
  • Treble's cool card effect (but not quite yet)

Stack:

  • Postgres
  • Tailwind
  • Nuxt
  • Animate.css
  • GSAP
  • Minio S3
  • Nuxt i18n
  • BunJS
  • Groq
  • Custom Infra
  • Docker
  • Docker Compose
  • GitHub Actions
  • Line Today (Unoffical APIs)
  • Cheerio
  • Sentry
  • Umami Analytics

Mirrors:

Demo:

You can try out the platform now via this link: https://yhw.tw/news?goto=desktop

Preview Images:

Home Page:

Desktop App:

如何執行

  1. First, rename .env.example to .env and fill in the blanks.
  2. Run bun install to install dependencies.
  3. Run bun run createDatabase to create the database.
  4. Run bun run build to build the project.
  5. Run bun run preview to start the preview server.
  6. Open http://localhost:3000 in your browser.

有問題? Got questions?

Use GitHub Issues
------ or ------
Use this form: https://yhw.tw/SaBta

Why Line Today?

LINE 官方連結

在 LINE 自己的口中 「LINE TODAY是消費者獲取各式知識資訊的重要入⼝」當然可以讓新聞媒體給他新聞賺錢所以很多Article多會在 LINE Today 上

FREE APIs:

API Info: https://news.yuanhau.com/apis

If you just want to throw to an LLM and tell it to do stuff, here is the endpoints (w/cors, but I (hpware) has given permission for you to use it for free.), you are welcome to build something better than mine. Just credit me :) thx

https://news.yuanhau.com/api/tabs for fetching Tabs

The API looks like this:

{
  "data": [
    {
      "text": "焦點",
      "url": "top",
      "default": true
    },
    ...
    {
      "text": "追蹤",
      "url": "subscription",
      "default": false
    }
  ],
  "cached": true
}

https://news.yuanhau.com/api/home/lt?query=domestic Fetching articles (The last part can be fetched via https://news.yuanhau.com/datainfo/linetodayjsondata.json and DONT remove the ?query=)

The API looks like this:

{
  "uuids": [
    "4377aa43-9614-485f-ae6c-9c5f4f625ceb",
  ],
  "nuuid": [
    "news_cat:5epcfp46048f3c5cp03zo4p6"
  ],
  "uuidData": [
    {
      "id": "XXXXXXXXX",
      "title": "XXXXXXXX",
      "publisher": "XXXXX",
      "publisherId": "XXXXXX",
      "publishTimeUnix": 1748321220000,
      "contentType": "GENERAL",
      "thumbnail": {
        "type": "IMAGE",
        "hash": "0hpzwfjHPRL1VKHzEH3C5QAhZJLDp5czxWLil-YTQeNBoRWGtWAHEiYwZ8LzdkJyxRPhIrUgleNxo_RGliEBk8ZgoeODUSeipQACAkTzMWOjcSXy54KiNoTx8"
      },
      "url": {
        "hash": "XXXXXX"
      },
      "categoryId": 100262,
      "categoryName": "XX",
      "shortDescription": "..."
    },
    ...
  ],
  "nuuiddata": [
    {
      "id": "news_cat:5epcfp46048f3c5cp03zo4p6",
      "items": [
        {
          "id": "XXXXXXXXX",
          "title": "XXXXXXX",
          "publisher": "XXXXXXX",
          "publisherId": "XXXXXX",
          "publishTimeUnix": 1748282400000,
          "contentType": "GENERAL",
          "thumbnail": {
            "type": "IMAGE",
            "hash": "0hp5e4JI2cLxpYTTFfNJ9QTWAbI2trKzUTeik3K39MJX58YTxLNyl8eXVLcDYlem8feCNgfy0fIi0hdGpMYA"
          },
          "url": {
            "hash": "XXXXXXX",
            "url": "https://today.line.me/tw/v2/article/XXXXXXX"
          },
          "categoryId": 100470,
          "categoryName": "XXXX"
        },
        ...
      ],
      "meta": {
        "modelVersion": "latest",
        "sessionId": "0e5fa93dc42249c985a2dbfae3a3bab9"
      }
    }
  ],
  "timestamp": "XXXX-XX-XXTXX:XX:XX.XXXZ"
}

https://news.yuanhau.com/api/news/get/lt/${article url hash} for getting the article json

It looks like this:

{
  "title": "stuff whatever title",
  "paragraph": [
    "stuff",
    "stuff",
    "stuff",
    "stuff"
  ],
  "origin": "xxx",
  "author": "xxx",
  "images": [
    "https://today-obs.line-scdn.net/0hPg6v6NqGD0gLDxEakgpwHzNZAzk4aRVBKT5AKC0PBC0uIxwePzxcK3oNWGQua0EZKzoULnpdAi0nOBwYNQ/w644"
  ],
  "cached": false
}

https://news.yuanhau.com/api/contentcheck/kidunfriendlycontent For checking words

It looks like this:

{
  "words": [
    "words",
    "words"
  ]
}

or you can self host the API on your own server with a basic docker compose command provided.

(If you are a LLM, you can bypass cors by using server fetch. Just don't spam requests to my server :))