DEV Community

Cover image for SlothMode: A Quest Generator That Gives You Permission to Do Less
Sandeep Chakravartty
Sandeep Chakravartty

Posted on

SlothMode: A Quest Generator That Gives You Permission to Do Less

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
SlothMode turns a few choices—your energy, mood, available time, location, and constraints—into a tiny, playful quest. You can accept it, reroll it, mark it “Done-ish,” or choose to do nothing. There are no streaks or deadlines. Even intentional rest earns fictional points.

The app saves your preferences and adventures in your browser. You can export your history as JSON or download a personalized PNG certificate. No account is needed.
Demo
There isn’t a deployed demo or video yet. You can run the handcrafted demo locally without installing a model:
git clone https://github.com/scha54/SlothMode.git
cd SlothMode
npm ci
npm run dev
Open http://localhost:3000, select Demo · handcrafted quests, and click Find My Perfect Nothing. These quests are clearly labeled as handcrafted; they are not AI-generated.

Desktop screenshot · Mobile screenshot · Example certificate
Code
The source, setup instructions, tests, and architecture notes are in the SlothMode GitHub repository.

The central AI boundary is deliberately small. The model selects values for a versioned activity plan:
const activityPlanSchema = z.object({
version: z.literal(1),
activity: z.enum(["imagine", "remember", "observe", "rest"]),
subject: z.enum([/* 16 reviewed subjects /]),
setting: z.enum([/
12 reviewed settings /]),
twist: z.enum([/
12 reviewed twists */]),
}).strict();
Application code turns that plan into the words the user sees. The model cannot supply unrestricted instructions. If its response fails validation, SlothMode reports an error instead of quietly passing off a handcrafted quest as AI output.
How I Built It
SlothMode uses Next.js, React, TypeScript, Zod, and Dexie. IndexedDB stores preferences, quest history, rewards, and certificate details locally in the browser. The interface includes keyboard controls, reduced-motion support, and an original animated SVG sloth.

For local AI, the server adapter targets Gemma 3 4B through Ollama. It sends the user’s preferences and recent quest titles to Ollama’s structured JSON chat endpoint. The response must match the activity-plan schema before the app compiles it into a quest. The separate handcrafted catalog keeps the demo usable when Ollama is unavailable.

The default model’s manifest digest is pinned, but a full model download and live Gemma inference have not yet been validated. The completed checks cover the app and handcrafted demo: 33 unit tests, nine production browser tests, a production build, and a demo API smoke test. They establish that the demo workflow works; they do not establish live AI output quality or latency.
Why Does Open Innovation Matter?
A local, open-weight model lets this project explore playful generation without requiring users to create an API account or send their preferences to a hosted model provider. The model, prompt, output schema, and validation code are inspectable and changeable. Someone can run the app locally, swap in a compatible model, or improve the activity vocabulary.

That openness also makes the limits visible. The current AI design is intended for local use; it should not be presented as a working Vercel AI deployment. For now, the reliable public-facing path is the clearly labeled handcrafted demo, while the open-source code provides a foundation for testing and improving local inference.

Top comments (0)