跳到正文
DEV Community· Sanskar Sanskar·· 4 小時前AI 評分33

打造 SlothSort:第 3 週的本地優先事項分類工具

Build slothsort for week 3

AI 導讀

作者開發 SlothSort,讓用戶貼上零散待辦與想法後,自動分類至四個類別,並可在儲存前修正結果。Xenova/all-MiniLM-L6-v2 開放權重嵌入模型在本機執行分類,無須使用託管 AI API;用戶可把結果儲存至看板。

正文

Sanskar Sanskar

What I Built

I built SlothSort, a place to unload the little things taking up space in your head. Paste a messy list—errands, follow-ups, things you’re waiting on, and ideas for later—and it sorts each line into Do it, Hand it off, Wait for it, or Someday. You can correct its guesses before saving them to a board. It saves the effort of organizing a to-do list before you can even start one.

Code

SlothSort 🦥

A gentle, local-first brain-dump sorter. Paste one thought per line; a small open-weight embedding model sorts them into Do it, Hand it off, Wait for it, and Someday. Adjust its guesses, save to a board, mark things done, or let them go.

Stack

  • MongoDB — your saved notes. The default development mode starts a real, embedded MongoDB binary with files under .local-mongo/; set MONGODB_URI to use an existing MongoDB server instead.
  • Express / Node.js — local API and model inference.
  • React / Vite — responsive UI.
  • Open AI — Xenova/all-MiniLM-L6-v2, an Apache-2.0 open-weight ONNX model run locally through Transformers.js. No hosted AI API. Classification compares text embeddings to descriptions of the four buckets, then lets you correct the result before saving.

Run

Requirements: Node.js 20+, npm, Windows/macOS/Linux. The first run needs internet to download the model and (in embedded MongoDB mode)…

This is the code base ive build this in for around 2 to 3 days

How I Built It

SlothSort uses the MERN stack: MongoDB stores the notes, Express and Node.js provide the API, and React powers the interface. Its sorting depends on Xenova/all-MiniLM-L6-v2, an open-weight sentence-embedding model run locally in Node.js with Transformers.js. Rather than looking for a few keywords, the app compares the meaning of each note with descriptions of the four categories. The person using it gets the final say before anything is saved.

Why Does Open Innovation Matter?

My brain dump can contain personal reminders, names, and unfinished thoughts. Running an open-weight model locally means sorting them doesn’t require sending them to a hosted AI API or paying per request. After the initial model download, inference also works without an internet connection. For this small, private task, a closed API would add a network dependency and a data-sharing decision without making the core experience more useful.

I left out the optional agent-session, time-saved, and prize-category sections because I don’t have verified links, measurements, or category details for them.

來源:DEV Community · dev.to