DEV Community

Naman Sachdeva
Naman Sachdeva

Posted on • Edited on

“Not a startup, not a dev team — just me building an AI for emotions.❤️🤖"

Hey Guys 👋
I’m still learning — not a full-stack expert, not building a huge startup — just someone who likes playing with code and visuals.

I recently made this little tool: you type a mood (like “dreamy ocean”, “sunset hustle”, or “calm coding flow”) and it generates a background gradient and a fresh motivational quote for you. If you’ve got your own server/API key, it can even call an AI backend to make totally custom gradients + quotes.

✅ What it does

  • If you pick from predefined moods (Happy, Calm, Sad, Energetic), it uses preset gradients + quotes.
  • If you choose “AI” mode and type your own prompt, the tool will:
    1. Send the prompt to a backend endpoint /generate-gradient
    2. Receive a custom gradient (2 HEX colours) + a quote from AI
    3. Apply the gradient and adjust the text colour automatically so it’s always readable

🛠 Why I built it

I wanted something more than static themes: a tool that feels your mood and paints accordingly. Also, I found learning this colour-contrast logic (checking brightness and adjusting text colour) surprisingly fun.

🧩 Tech bits

  • Frontend: HTML + CSS + vanilla JS — no big framework.
  • Backend (optional): Express + Node → endpoint accepts JSON { prompt } and returns { gradient, quote }.
  • Bonus: client-side checks for URL validity, fallback when server is missing, and smooth background + text transition. 🚀 Try it out

Would love your feedback — is the colour contrast good? Does the quote feel fresh?

Thanks for checking this out — and if you’re building your own little tool too, drop your link below!

💬 Would love to hear your thoughts — drop a comment if you tried it, found a bug, or have an idea to improve it!
—Naman Sachdeva

Top comments (0)