DEV Community

Cover image for AI Project from Scratch, The Idea , Alive Diary
Saad Alkentar
Saad Alkentar

Posted on

AI Project from Scratch, The Idea , Alive Diary

Why starting this series?

I've lately participated in the Google Gemini API Competition. Many of my friends and colleagues showed interest in the idea and implementation, so I decided to start a series of articles to explain the project from scratch.

  • I'll begin by discussing the original idea and how I used Google AI Studio to validate its feasibility.
  • Next, I'll explain how I extracted feature cards to define the app's requirements.
  • Then I'll go into detailed articles on building the backend and mobile app.

I've used Django (python) for API development, and Flutter (dart) for mobile app development. the code is publicly available on

Who is this for?

This series is for everyone! anyone with an interest in AI, Gemini, Python, Django, Dart, or Flutter is welcome!
This article is basically for:

  • AI Enthusiasts: I hope you can enjoy the idea (this article) and proof of concept with Google AI Studio, those articles require no experience, nor payments.

Money and titles may be hereditary, but brains are not.
Baroness Orczy, The Scarlet Pimpernel

  • Python Developers: After explaining the chain of thoughts, and proof the concept with Google AI Studio, I'll start with the API development. I'll try to stick to generic reusable Django apps when possible, then I'll start the AI app API implementation. I'll try to go into as many details as possible, but I don't believe it is for absolute beginners, so if you have little experience with Django and Python, those articles would suit you well.
  • Flutter Developers: After finishing the API with Django, I'll start building the mobile app with Flutter. I'll stick to Clean Architecture and use Bloc for state management. I don't believe these patterns suit absolute beginners, so if you are a mobile developer with little experience in Flutter, those articles are for you.

The Idea

No one loves "know it all"! Yes, we use ChatGPT, Gemini, and LLaMA, but as tools, without personality or experience. While I might spend hours talking to a friend about my problem, I would close ChatGPT as soon as it gave me its dead response (might be right, but as cold as dead).
The idea was to give the AI model personality, experience, and character. How to do that? As it is for all AI projects, the answer is Data

Data! data! data! I can't make bricks without clay.
Arthur Conan Doyle, The Adventure of the Copper Beeches

  • How to capture a person's personality? just talk to them.
  • Who do you talk to every day? your diary, or your therapist (maybe).

Here we are! it is a diary app. (I don't believe any AI can be trusted as an actual therapist yet)
Normal diaries are passive, you record interesting events when you feel like it, and they just listen to you! but not our diary, we already have an AI model, and it is a good place to use it.

Never trust anything that can think for itself if you can't see where it keeps its brain?
J.K. Rowling, Harry Potter and the Chamber of Secrets

Now we know the brain exists in Gemini, the character comes from our diary, and the experience comes from us!

Shaping the final idea;

  • We need an AI for the diary part, it should ask the user about his/ her day, preferably in an easygoing, non-judgmental manner with open questions and a lot of empathy.
  • Then we need to process the data from these conversations to build (or maybe fine-tune) a model with the user character and experiences.
  • We should be able to talk to the built model, asking it about the user's characters and experiences, it should respond in the same way the user does.

while shaping this idea, it felt like building the "Diary of Tom Riddle" (Harry Potter and The Chamber of Secrets) but without the evil part.
It sounds cool, but I have always wanted to have another item from Harry Potter stories; The Pensieve, it is a magical device used to store and review memories. so, since we are already building one magical item, it doesn't fall off the tree to build another.

  • We need an AI for the memories extraction, it should ask the right questions to build a memory, where? when? why? how? ... and so on.
  • Then we need to process the user responses to build the memory from a third-person perspective.
  • We should also be able to talk to our memories (their model).

And that is it!

Tell me your opinion on the idea? do you have any suggestions or improvement? or maybe a cooler idea to build?

The next article will go through proving that Gemini can do the magic!
Stay tuned ๐Ÿ˜Ž

Top comments (0)