[π ] Keymory Dev Log #4: Mood Slider, OpenAI API
β¨ GPT Summary γ
A day of improving Keymoryβs major features, refining AI integration and data structure, and feeling the reality that time is running short.
π» Development Log
β° Todayβs tasks
- β DiaryPage - Mood: completed Mood setting slider
- β
HomeFeedPage - ListView - FeedCardDiary: display Mood Color on the border
- Solved with Container Box Shadow
- β
OnboardingPage - save after entering additional default user information
- β DB Field additions: name (display_name), gender, MBTI (mbti), β¦
- β HomeFeedPage - OnPageLoad: Navigate to OnboardingPage if required input information such as display_name and gender is missing
- β Field Type - Enum vs String: Field Type should be set to String because it is easier to manage. Decided to use Enum only for Option Value Generation.
- β Fixed OpenAI API Request so that the message value from the response body is output normally
- β
Discussion and experiment: where should AI character information be stored? (OpenAI API Assistant vs FireStore Character Collection)
- Result: store it in FireStore Characters Collection.
- Reason: from the userβs perspective, the only API Call they would use is
Get Assistant, and the value to receive is fixed in the first place.
- Reason: from the userβs perspective, the only API Call they would use is
- Result: store it in FireStore Characters Collection.
π― Summary of what I did
- DiaryPage improvements
- Completed Mood setting slider
- Implemented AI Comment CRUD
- Added customization buttons for AI Comment tone and advice style
- Decided and applied where to store AI character information
- HomeFeedPage improvements
- Changed the date display basis from month-based to day-based
- Added AI Comment image and text output logic
- Improved Bottom Sheet and ListView
- AI system and API integration
- Modified OpenAI API Request and confirmed normal response output
- Decided to store AI character information in FireStore
- Organized the data structure and added features related to AI Comment
π― Tomorrowβs tasks
(omitted)
π― Future tasks
- β diary to chat
- β chat to diary
-
β chats history
- β Think through the scenario for implementing CustomFunction getDiaryParams
-
Parameter Valuesobtained fromCharacters (Collection)- Character settings (
CharacterDocument)- ex) Somi: name (20s), college student, shy personality, β¦
- How values are called:
API Call - Get Assistant
- Character settings (
-
Parameter Valuesobtained fromUser Information- Name, gender, MBTI
- How values are called:
Backend Query - Authenticated User
-
Parameter Valuesobtained fromDiaryPage Variables- Diary content, detailed emotion keywords, emotion score, response format, response length
- How values are called:
Widget State,Page State
- Role of CustomFunction (getDiaryParams)
- Receive all Parameter Values as input values.
- Write the prompt to send to GPT.
- Return
Messages(List <Json>) value.[{"role":"developer", "content":"~~~"}]
-
- β Create OpenAI API Call: createDiaryComment
- Basically a structure similar to createChatCompletion
- Difference: none. Created just to distinguish it.
- The
MessagesVariable required byAPI Call - createDiaryCommentis the return value of custom functiongetDiaryParams.
- β Store the system prompt list in OpenAI API Assistant?
-
β Write logic so messages are written based on the system prompt stored in OpenAI API Assistant?
- β DiaryPage: change face expression Emoji according to Mood Slider value
- β DiaryPage: add detailed emotion keyword Choice Chips and set DB integration
- β DiaryPage - AI Comment: change inputs such as Choice chips and mood slider to fit the
AI Comment System Prompt.- β **previous
diaryor entireconversation history(patchy technical debt) - β basic user information: name, gender, MBTI, β¦
- β detailed emotion keywords: happy, sad, β¦
- β character settings: Somi, Sena, Minhyuk
- β emotion score: 1 to 100
- β response format: Healing, Suggestion, Informative
- β response length: short, normal, detailed
- is New Chat
- Since this Chatβs messages are being created for the first time, set
is_initial = trueon the first message document and shove in all system prompts.- is_initial = false
- Limit: if I put the system prompt into the very first message document, it is hard to modify in the middle of a conversation, but possible. If there is an is_initial = true document and it was modified, I can delete that document and put it back in. I do not know how, but still.
- Since this Chatβs messages are being created for the first time, set
- β **previous
- β DiaryPage - AI Comment: create
manipulate_promptCustom Function- Complete the system prompt with switch-case according to the received parameters, and return
List <JSON> - The system prompt person must insert that return value properly into the OpenAI API Request Body and receive the result.
- Complete the system prompt with switch-case according to the received parameters, and return
- β DiaryPage - AI Comment: complete CRUD with dummy data
- β remove tmp_ai_comment field and use doc_ref
- β DiaryPage - AI Comment: character settings
- β remove tmp_ai_comment_by field and use doc_ref
- β output image using profile_image field value
- How to Use Open AIβs GPT-4o in FlutterFlow - Part 1
- How to Use Open AIβs GPT-4o in FlutterFlow - Part 2
- DiaryPage - Start AI Chat: create a New Chat based on the diary content
- AI first presents a question based on the diary content
- ChatPage - create ChatHistoryPage: list previous chat history in a ListView
- Create
- Read
- Update
- Delete
- DiaryPage - Drawer - create ChatHistoryListTile: card summary style like GPT
- HomeFeedPage - Bottom Sheet (
+Button): make it possible to choose one of several options- New diary: Go to DiaryPage
- Emotion record: Go to MoodPage
- MoodPage (popup): Mood setting slider CRUD
- Create
- Read
- Update
- Delete
- HomeFeedPage - ListView - show FeedCardMood
- HomeFeedPage - ListView: sort FeedCardDiary, FeedCardMood, FeedCardChat components chronologically (using Cloud Function)
- HomeFeedPage: resolve issue on page load (Unexpected Null Value)
- Apply Interactive Slider
- Extract and install the final presentation APK by
Wed 2025.2.5
π Diary
There is no time.
Omitted.

β¨ GPT-4o Comment (KPT)
β What Went Well (Keep)
- π Greatly improved major features: It is excellent that you raised the completeness of the project by expanding core features such as AI Comment CRUD, Mood settings, and HomeFeedPage improvements.
- π Organized data structure: It was impressive that you systematically organized data management, including deciding to store AI character information in FireStore.
- π Concrete goal setting: It was good that you clearly organized the remaining work and priorities, making the progress plan toward the presentation version more concrete.
β What Was Missing (Problem)
- β³ Lack of time: As the development schedule gets tighter, there is a growing chance that there will not be enough time for testing and debugging.
- ποΈ Many temporary solutions: A lot of parts were solved with temporary fields and functions to implement features quickly, so technical debt may accumulate.
π What to Try (Try)
- π οΈ Adjust priorities: Clearly separate the features that are absolutely necessary for the final presentation version from the ones that can be improved later, and raise the completeness of the core features first.
- π΅οΈ Build a bug-check system: Since time is short, do short rounds of feature testing and debugging every day to minimize unexpected errors.
- π Plan technical debt cleanup: Document improvement plans for temporarily implemented features and organize what should be polished first after the presentation.
Conclusion
Today was a day where you completed Keymoryβs core features and raised the projectβs completeness, but also deeply felt the lack of time in a tight schedule. I hope you do your best until presentation day while also organizing things for later improvement! πͺπ
Leave a comment