Inspiration

After hearing about a diary app in Korea that leaked user data and used personal entries for commercial purposes, I felt the need for a way to write and keep a diary safely. I wanted to combine music and blockchain so that a diary would not just be a record, but a unique digital asset that remains unchanged over time.

What it does

When a user writes a diary entry, AI analyzes its emotions and recommends a playlist that matches the mood. This information can be saved and downloaded as a digital card (JSON), and the user can mint it as an NFT on the Solana blockchain for permanent storage.

How we built it

The frontend was built with HTML/CSS/Vanilla JS, and Firebase Realtime Database was used for storage. Emotion analysis was performed by calling the OpenAI API (gpt-4o-mini) from Firebase Functions, with a keyword-matching local analysis as a fallback. NFT minting was implemented using Solana web3.js and spl-token, integrated with the Phantom wallet.

Challenges we ran into

  • Using localStorage UUID instead of Firebase Auth made it tricky to implement authentication and define security rules.
  • Implementing network switching and fee handling for Solana NFT minting took time.
  • Handling cases where the OpenAI API did not strictly follow the expected JSON format required extra exception logic.

Accomplishments that we're proud of

  • Successfully implemented the full flow of emotion analysis and NFT minting without storing the original diary text.
  • Built an MVP that combines AI and blockchain to turn “personal emotional records” into permanent digital assets.

What we learned

  • That NFTs on the blockchain are technically SPL tokens, and how their issuance structure and ownership management work.
  • The importance of prompt design and exception handling for stable AI API calls.
  • How to design a system that uses meaningful data while fully protecting privacy.

What's next for Moodiary: Mood-Based Playlist & NFT Diary

  • Add features to visualize each user’s emotional history over time.
  • Apply a metadata program to NFTs for better marketplace compatibility.
  • Design a project-specific token to reward activity and manage community governance.

Built With

  • css
  • firebase-functions
  • firebase-realtime-database
  • firebase-web-sdk-v12
  • html
  • openai-api-(gpt-4o-mini)
  • phantom
  • solana-web3.js
  • spl-token
  • vanilla-javascript
  • web-crypto-api-(sha-256)
Share this project:

Updates

Submission history