SlothDigest: Let a Local 4B AI Read Your 400 Unread WhatsApp Messages While You Sleep

# devchallenge# hf26challenge# ai# webdev
SlothDigest: Let a Local 4B AI Read Your 400 Unread WhatsApp Messages While You SleepRonit Solanki

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady ...

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

SlothDigest is an asynchronous, local-first group chat summarizer built for people who refuse to wake up and scroll through 400 unread WhatsApp messages just to find out whether a meeting moved by 15 minutes.

Instead of reading noisy group threads in real time, you upload your exported .txt chat logs into SlothDigest before going to bed (or trigger a manual digest anytime). At 3:00 AM, a scheduled Spring Boot batch job wakes up, parses the raw chat transcripts, and feeds them through a local open-weight LLM (qwen3.5:4b running on Ollama).

When you open the React (Vite) dashboard with your morning coffee, every chaotic group chat is already distilled into three clean sections:

  • A 2-Line Summary: Two short, factual sentences explaining what actually happened in the thread.
  • Action Items: Concrete tasks, decisions, and deadlines extracted from the noise (including who is responsible and when it is due).
  • Direct Mentions: A personalized list of messages that addressed or mentioned you by name (e.g., "Sam asked if you can bring the projector"), so you never miss a ping buried under 50 memes.

Busy students, developers in hackathon coordination threads, and anyone trapped in high-volume WhatsApp project groups get to be unapologetically lazier every morning without missing a single task or ping.

Demo



Code

GitHub logo ronitsolanki-01 / slothdigest

You upload or forward your group chat exports (e.g. WhatsApp .txt files) and a scheduled job summarizes them overnight. In the morning you open the app and find a 2-line summary per chat, plus action items and anything that mentions you. You never have to scroll through 400 messages.

SlothDigest

Upload your group-chat exports, go to sleep, and read a two-line summary per chat in the morning (plus action items and anything that mentions you). It runs on an open-weight model through Ollama so your chats never leave your machine.

Backend: Spring Boot 4.0, Spring AI 2.0 (Ollama), Spring Security 7 (JWT), JPA + H2, @Scheduled job Frontend: React + Vite + Tailwind

Prerequisites

  • Java 17+ (21 recommended), Maven 3.9+
  • Node 18+
  • Ollama running locally, with the model pulled: ollama pull qwen3.5:4b (change the model in application.properties; thinking is turned off in DigestAi.java)

Run

# 1. backend (http://localhost:8080)
cd backend
mvn spring-boot:run

# 2. frontend (http://localhost:5173), in another terminal
cd frontend
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

Try it

  1. Open http://localhost:5173 and create an account. Use the name your friends call you as display name, because that is how mentions of you are found.
  2. Upload sample-chat.txt (WhatsApp…

How I Built It

SlothDigest is built as a full-stack application with a React (Vite) frontend and a Java Spring Boot backend, orchestrated around local open-source AI inference via Spring AI 2.x and Ollama.

Tech Stack

  • Frontend: React + Vite organized into three focused screens: a Login / Register page, a Chat Export Upload page, and a Morning Digest Feed.
  • Backend: Java & Spring Boot with Spring Security + stateless JWT authentication (app.jwt.secret) supporting multi-user accounts, where each user's display name is dynamically injected into the prompt to detect direct mentions.
  • Database: File-based H2 database (jdbc:h2:file:./data/slothdigest) with Spring Data JPA / Hibernate for zero-setup local persistence (easily swappable to PostgreSQL in production).
  • Open-Source AI & Local Inference: Ollama serving the open-weight qwen3.5:4b model locally (plus nomic-embed-text configured for future semantic search/RAG features), integrated via Spring AI 2.x.

Architecture & Workflow

  1. Chat-Export Parser: Raw exported .txt chat logs are uploaded (up to 10MB multipart uploads), cleaned, and normalized into a compact Sender: text line-by-line format. To protect local memory and keep inference snappy on laptop hardware, the parser keeps the most recent 12,000 characters (app.digest.max-chars=12000) within an 8,192-token context window (num-ctx=8192).
  2. Slow-and-Steady Overnight Batch Job (@Scheduled): Rather than making the user stare at a loading spinner, a Spring @Scheduled cron job (0 0 3 * * *) runs every night at 3:00 AM to digest all pending chat exports in the background.
  3. Schema-Enforced Structured Output (BeanOutputConverter): Small local models can sometimes wrap JSON in markdown fences or drift off-schema. In DigestAi.java, I paired Spring AI's BeanOutputConverter<DigestResult> with OllamaChatOptions to enforce the exact JSON schema at the Ollama inference layer while disabling chain-of-thought reasoning traces (disableThinking()) and setting a low temperature (0.2) for fast, deterministic extraction:

java
public DigestResult summarize(String chatName, String readerName, String transcript) {
OllamaChatOptions options = OllamaChatOptions.builder()
.model(this.model) // qwen3.5:4b
.disableThinking() // no reasoning trace: faster, cleaner JSON
.outputSchema(converter.getJsonSchema()) // Ollama enforces this JSON schema
.build();

Prompt prompt = new Prompt(List.of(
        new SystemMessage(SYSTEM),
        new UserMessage(USER.formatted(chatName, readerName, transcript))),
        options);

String json = chatModel.call(prompt).getResult().getOutput().getText();
return converter.convert(json);
Enter fullscreen mode Exit fullscreen mode

}

Why Does Open Innovation Matter?

Group chat exports contain deeply personal, unfiltered conversations—phone numbers, internal project updates, deadlines, and candid banter among friends or teammates. Uploading private group chat logs to a closed, third-party cloud API is a non-starter for privacy.

Open innovation made SlothDigest possible in three ways that a closed API couldn't match: