Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ€“ all from the browser, and deployed in milliseconds.

๐Ÿ˜Š Mood Tracker

Track your moods throughout the day. Pick from Happy, Sad, Angry, or Tired โ€” each with its own emoji, color scheme, and dynamic background.

Features

  • ๐ŸŽจ Dynamic background โ€” page color changes based on selected mood
  • ๐Ÿ˜Š๐Ÿ˜ข๐Ÿ˜ ๐Ÿ˜ด Emoji indicators โ€” each mood entry shows its emoji
  • ๐Ÿ“ Required text โ€” describe how you're feeling (empty submissions blocked)
  • ๐Ÿ’พ Blob storage โ€” moods persisted via Val Town's std/blob (JSON)
  • โฐ Timestamps โ€” each entry saved with an ISO timestamp

Architecture

Rendering mermaid diagram...

Data shape

Each mood entry stored in blob storage:

{ "id": 1, "mood": "happy", "text": "Sunny day!", "timestamp": "2026-05-23T06:00:00.000Z" }

File structure

main.ts                          โ† Hono backend (API + blob persistence)
frontend/
  index.html                     โ† HTML shell
  index.tsx                      โ† React entrypoint
  favicon.svg                    โ† App icon
  components/
    App.tsx                      โ† Root component (state + dynamic bg)
    MoodForm.tsx                 โ† Mood selector + text input + validation
    MoodList.tsx                 โ† Displays mood history with emoji cards
    moods.ts                     โ† Shared mood config (emoji, colors)