Building 5 Daily Utility Tools with AI: A Technical Practice

    This article walks through building five lightweight daily tools with AI coding assistance: batch image compression, a focus/break timer, a random lunch picker, a teleprompter, and a subscription ledger. It covers the shared architecture, key implementation constraints, a reusable prompt template, and when to add cloud capabilities. The goal is to show how to turn small, infrequent needs into runnable local tools without taking on subscription costs or backend operations.

    1. Background: Everyday Needs Fragmented by Subscriptions

    Both developers and everyday users face the same problem: the need itself is tiny, but the cost of getting it is high. Compressing a few images, glancing at a teleprompter while recording a video, randomly deciding what to have for lunch, or tracking how many memberships you pay for—features like these might take only a few dozen lines of code, yet they get bundled into large subscription packages. Users pay for a feature they use occasionally, and the marginal return is very low.

    From an engineering perspective, these needs share three traits: low but unpredictable usage frequency, clear functional boundaries, and sensitivity to data privacy. Together, they are the ideal scenario for building a lightweight tool yourself. The barrier used to be front-end development, UI design, and deployment. Today, AI coding tools can scaffold the project, implement the logic, and generate the interface from natural language, shrinking that barrier to a single conversation.

    Note that this article does not evaluate any specific product. Instead, it abstracts a methodology: describe the need clearly, and let AI produce something that actually runs.

    2. Overall Approach: Breaking Down Five Tool Categories

    Tool Core Technical Points Requires Network Data Leaves Device
    Batch image compression and resizing Canvas resampling, encoding quality control, packaged download No No
    Focus and break timer Timer state machine, browser notifications, local statistics No No
    “What to eat today” wheel Random algorithm, canvas animation, weight configuration No No
    Teleprompter Auto-scroll, speed adjustment, mirrored display No No
    Membership ledger Cycle calculation, expiry reminders, structured storage No No

    Unified architecture principle: a pure front-end single-page application with no backend dependency, with data stored in the browser’s local storage. This meets privacy needs and reduces operations cost to zero.

    3. Key Implementation Points

    3.1 Batch Image Processing: Don’t Report False Success

    This is the category most likely to be built wrong. The core logic is not “compress” but “approach the target and report honestly.”

    1. async function compressToTarget(file, maxEdge, targetBytes) {
    2. const bitmap = await createImageBitmap(file);
    3. let scale = Math.min(1, maxEdge / Math.max(bitmap.width, bitmap.height));
    4. let quality = 0.92;
    5. let blob;
    6. for (let i = 0; i < 8; i++) {
    7. const canvas = document.createElement('canvas');
    8. canvas.width = Math.round(bitmap.width * scale);
    9. canvas.height = Math.round(bitmap.height * scale);
    10. canvas.getContext('2d').drawImage(bitmap, 0, 0, canvas.width, canvas.height);
    11. blob = await new Promise(r => canvas.toBlob(r, 'image/jpeg', quality));
    12. if (blob.size <= targetBytes) return { blob, scale, quality, ok: true };
    13. if (quality > 0.5) quality -= 0.1; else scale *= 0.85;
    14. }
    15. return { blob, scale, quality, ok: false }; // Explicitly mark as not meeting the target
    16. }

    Three constraints that must be written into the prompt: never upscale small images by default; require the user to confirm a background color before converting a transparent channel to an opaque format; and explicitly flag failure when the target is not met—showing success is forbidden.

    3.2 Timer: A State Machine, Not a Boolean

    Replacing an isRunning boolean with three states—idle / running / paused—avoids the classic bug of accumulating time twice after resuming. The time source should be based on timestamp differences rather than an accumulated counter, which prevents drift when the tab moves to the background.

    3.3 Random Decisions and the Teleprompter

    The wheel uses weighted randomness with configurable weights; the animation uses an easing function to make the slowdown feel natural. For the teleprompter, the key points are adjustable scroll speed, font size and line spacing settings, horizontal mirroring to work with a beam splitter, and a click-to-pause interaction as a fallback.

    3.4 Membership Ledger: Cycles and Reminders

    A subscription is essentially “cycle + amount + next billing date.” When calculating the next date, handle short and long months as well as leap years. The reminder logic only needs to compare the local date when the page loads—no push service required.

    4. Prompt Template (Ready to Reuse)

    1. Build me a web tool for [tool name]. Give me a finished product I can open and run directly, and explain how to open it.
    2. Functional requirements:
    3. 1. Input and interaction: ...
    4. 2. Core processing logic and boundary conditions: ...
    5. 3. Errors and failures must be reported explicitly; false success is not allowed.
    6. 4. Results support preview and single/batch export, without overwriting the original data.
    7. 5. All processing happens locally in the browser; nothing is uploaded to a server.
    8. 6. Chinese UI, clear layout, adapted for desktop browsers.

    The value of the template is that it turns “boundary conditions” and “failure semantics” into hard constraints. These two points determine whether the output is a toy or a usable tool.

    5. Engineering Wrap-Up

    The weakness of local tools is that they don’t sync across devices and the data is easy to lose. If cross-device sync is needed later, you can bring in object storage to keep exported files, a logging service to troubleshoot errors, and monitoring alerts to track availability. But these cloud capabilities should only be added when truly necessary, to avoid taking on operations overhead again for an occasional small feature.

    The conclusion is straightforward: the more finely subscriptions fragment a need, the better the value of building your own. Master three things—abstracting the need, constraining the prompt, and a local-first architecture—and most small tools can be delivered within a single conversation.