๐ Moodiary: Mood-Based Playlist & NFT Diary¶
๐๏ธ Project Overview¶
- Student ID: 20220049
- Name: ๊ธฐ์ฑ์ด (Chaewoon Ki)
- Project Title: Moodiary: Mood-Based Playlist & NFT Diary
- Summary:
Moodiary analyzes a userโs diary entry with AI to generate emotion tags and scores, recommends a music playlist that matches those emotions, saves and downloads the result as a digital card (JSON), and finally mints it as an NFT on the Solana blockchain. The project strictly protects privacy by never storing the original text and keeping only its SHA-256 hash. By using AI to refine and classify personal emotions and blockchain to store them permanently in a tamper-proof format, it transforms emotional records into unique digital assets.
1. ๐งฉ Problem: What Problem Are You Solving?¶
While diary writing has become increasingly convenient in the digital age, it rarely connects personal records to emotional analysis or personalized content recommendations. Existing music recommendation services and mood-tracking apps face the following limitations:
- Lack of Automated Emotion Analysis: Users must manually select their mood, or systems rely on simple keyword matching, resulting in low accuracy.
- Privacy Concerns: Original diary text is stored on servers, posing a risk of personal data exposure.
- Lack of Creative Output: Emotion analysis results often end with basic statistics, without expanding into NFTs or other creative digital assets.
This problem is worth solving in a context where demand is growing for services that combine digital emotion analysis with personalized experiences. A platform that protects the original text while turning emotions into creative outputsโsuch as music playlists or NFTsโcan address key limitations in the current market.
2. ๐ก Solution: Your Proposed Approach¶
This project combines AI-based emotion analysis with blockchain-based NFT minting to securely analyze user-written diaries and transform them into creative digital assets.
1. Diary Writing & Privacy Protection: When a user writes a diary entry, the original text is never stored; only its SHA-256 hash and timestamp are saved, minimizing the risk of personal data leakage.
2. AI-Powered Mood Analysis: Firebase Functions call the OpenAI API (gpt-4o-mini) to return up to three emotion tags and their scores in JSON format, with a keyword-matching local analysis as a fallback if the model call fails.
3. Personalized Playlist Generation: For each extracted mood tag, the system randomly selects songs from a predefined music catalog, creating a playlist of up to 10 tracks.
4. Digital Card (JSON) Creation: Generates a downloadable JSON file containing mood, playlist, and provenance information.
5. NFT Minting: Mints NFTs via the Phantom wallet on the Solana devnet or mainnet, with the current absence of a metadata program meaning NFTs may not be automatically recognized in some environments.
6. AI & Blockchain Integration: AI analysis results (tags and scores) form the metadata for NFTs, turning a userโs emotions into unique digital assets, while the no-original-text storage design ensures privacy and blockchain provides permanent, verifiable records.
3. ๐ Why Blockchain (and Token)?¶
- Why Blockchain is Needed: When issuing emotion-based digital cards, they must remain permanent and tamper-proof. In a centralized server, records can disappear if the service shuts down or data is lost, but an NFT recorded on the blockchain can always be verified and owned as long as the network exists.
- Problem Blockchain Solves: The biggest advantage is privacy protection. In the past, a diary app in Korea leaked user data and used personal entries for commercial purposes. In this project, the original text is never stored on a central server. Even when minting an NFT, only the SHA-256 hash and creation timestamp are recorded, meaning no third party can view the contents. Users can safely and fully own their emotional records.
- Token Design and Purpose: NFT creation uses SOL to pay network fees and account creation costs, and a new Mint account issues an SPL token with 0 decimals and a supply of 1. Technically, this is a token, but due to its uniqueness and scarcity, it is treated as an NFT. While no project-specific token is currently issued, in the future it could be designed for purposes such as rewarding activity, running community governance, and enabling the exchange of creative works based on emotional data.
4. ๐ ๏ธ MVP or Prototype¶
Current Status: Working MVP
This project is fully implemented to allow a user to write a diary entry, analyze emotions via AI, generate a matching playlist, save and download it as a digital card (JSON), and finally mint it as an NFT on the Solana blockchain. Emotion analysis is handled by Firebase Functions calling the OpenAI API, and the results are used to generate a personalized playlist from a predefined music catalog. The minting process connects to the Phantom wallet, uses SOL to pay for network fees and account creation, and stores minted NFT information in the Firebase Realtime Database.
Key Features:
(1) Privacy protection by storing only SHA-256 hashes without original text
(2) AI-based emotion analysis with keyword matching fallback
(3) Mood tagโbased personalized playlist generation
(4) Digital card (JSON) creation and download
(5) Phantom walletโbased NFT minting and result storage
Code Repository: GitHub Link
Demo: (Demo Link) https://www.youtube.com/watch?v=gG8vZf9guSM
5. ๐ฌ Submission to Hackathons or Grant Programs¶
- Name of the Program Submitted To: QuSat Group Hackathon 2025
- Submission Link: https://devpost.com/software/moodiary-mood-based-playlist-nft-diary#updates
- Short Summary of Submitted Description: Moodiary is a service that analyzes a userโs diary entry with AI to produce emotion tags and scores, generates a playlist matching those moods, saves and downloads it as a digital card (JSON), and finally mints it as an NFT on the Solana blockchain. The original text is never stored; only its SHA-256 hash is kept to ensure privacy. By combining AI and blockchain, it turns personal emotional records into permanent digital assets.
6. ๐ค Reflection & Future Work¶
What I Learned: I gained a deep understanding that NFTs on the blockchain are technically SPL tokens, along with their issuance structure and ownership management. I also learned the importance of prompt design and exception handling for stable AI API calls, as well as how to design a system that uses meaningful data without storing the original text.
Biggest Challenges: Using localStorage UUID instead of Firebase Auth made it tricky to set up security rules, and implementing network switching and fee handling for Solana minting took considerable time. Handling cases where the OpenAI API did not follow the expected JSON format required additional exception logic.
Future Improvements: Refine the emotion classification system and connect each emotion to playlist recommendations through an LLM, replacing the current hardcoded mapping with dynamic generation. Additionally, add functionality to apply or trade the issued tokens, increasing the utility and real-world applicability of the NFTs.
7. ๐ References¶
- Solana Docs โ SPL Token Program: https://spl.solana.com/token
- Phantom Wallet Documentation: https://docs.phantom.app/
- Firebase Documentation: https://firebase.google.com/docs
- OpenAI API Reference: https://platform.openai.com/docs/api-reference
- SHA-256 Web Crypto API โ MDN Docs: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
- Related Projects: Solana NFT Mint Example, Firebase Functions with OpenAI Example