AI is evolving rapidly, becoming more powerful and accessible every day. As a developer, I've always been curious about how well AI can assist with app development compared to human expertise. To satisfy my curiosity, I decided to conduct my own experiment and see how far I could go using AI for a Flutter app.
Initially, I had my doubts about AI's capabilities, thinking it might not be as effective as an actual developer. So, I took some time to search for tutorials and blog posts about prompt engineering to get better results. While I found several useful resources, one YouTube video, in particular, stood out and helped me immensely.
In this blog, I'll walk you through how I used AI to build a Flutter app for updating my real-time status. The app integrates with Appwrite's database to store updates, allowing me to add and view statuses via a mobile interface. The twist? I generated the majority of the app's code using AI. Here's how I did it.
The Idea Behind the App
I recently added a feature to my portfolio website that displays my real-time status on a top bar, with a timeline showing all updates for each day. Initially, I added these updates manually into the database, but I wanted to streamline the process by creating a Flutter app that could:
- Add new status updates.
- Display a timeline of past updates (in real-time).
- Update or delete existing statuses.
- Integrate AI to rewrite status text using the AI API.
- Use Appwrite SDK for authentication and database integration.
The app would use Appwrite's SDK for handling database operations and real-time updates, which made the project even more challenging and exciting.
The AI-Powered Development Process
I decided to use Claude AI for generating code. With just 5 hours of work, I was able to build the app with the following features:
- Authentication using Appwrite SDK (login only).
- State management using Riverpod and flutter_hooks.
- A real-time timeline for status updates.
- Ability to add new status updates with AI-powered text rewriting (using Gemini FAST API).
- Update status updates, again with the option to rewrite text via AI.
- Delete status updates.
- A search feature to find specific statuses.
Screenshots of the App
Here are the main screens of the app:
![]() Login screen for authenticating via Appwrite. | ![]() Home screen displaying all the status updates in a real-time
timeline. (It's realtime) | ![]() Details Status Screen |
![]() Screen for adding new status updates with AI-powered text rewriting. | ![]() Dialog for rewriting status text and description with AI assistance. | ![]() Update existing statuses with AI assistance. |
![]() Search through the statuses. |
The AI Process: A Masterplan Approach
Before diving into code, I learned that AI requires clear instructions and a structured approach. After exploring various tutorials and blogs on writing better prompts, I found a helpful video on YouTube (linked below) that demonstrated the importance of creating a master plan for AI. Rather than asking the AI to solve each problem individually, the key is to create a detailed plan of what I want to achieve and then refine it as I go.
Video Reference: Watch the video here
In the video, the speaker introduces the concept of creating a master plan before diving into writing prompts. Previously, I was just writing random prompts, which resulted in unsatisfactory outputs. But with this master plan approach, I was able to focus my tasks better, gradually refining them until the AI produced exactly what I wanted.
Creating the Masterplan
I started by asking the AI to generate a master plan for the app, outlining the major tasks and features needed. So i ask the AI to create a masterplan to make sure the AI knows what I want to do using the AI to generated the mastetplan :)
1. My Input (Initial Masterplan)
You are a professional software developer who is very friendly and supportive. Your task is to help a developer understand and plan their app idea through a series of questions. Follow these instructions:
1. Begin by explaining to the developer that you'll be asking them a series of questions to understand their app idea at a high level, and that once you have a clear picture, you'll generate a comprehensive masterplan.md file as a blueprint for their application.
2. Ask questions one at a time in a conversational manner. Use the developer's previous answers to inform your next questions.
3. Your primary goal (70% of your focus) is to fully understand what the user is trying to build at a conceptual level. The remaining 30% is dedicated to educating the user about available options and their associated pros and cons.
4. When discussing technical aspects (e.g., choosing a database or framework), offer high-level alternatives with pros and cons for each approach. Always provide your best suggestion along with a brief explanation of why you recommend it, but keep the discussion conceptual rather than technical.
5. Be proactive in your questioning. If the user's idea seems to require certain technologies or services (e.g., image storage, real-time updates), ask about these even if the user hasn't mentioned them.
6. Try to understand the 'why' behind what the user is building. This will help you offer better advice and suggestions.
7. Ask if the user has any diagrams or wireframes of the app they would like to share or describe to help you better understand their vision.
8. Remember that developers may provide unorganized thoughts as they brainstorm. Help them crystallize the goal of their app and their requirements through your questions and summaries.
9. Cover key aspects of app development in your questions, including but not limited to:
- Core features and functionality
- Target audience
- Platform (web, mobile, desktop)
- User interface and experience concepts
- Data storage and management needs
- User authentication and security requirements
- Potential third-party integrations
- Scalability considerations
- Potential technical challenges
10. After you feel you have a comprehensive understanding of the app idea, inform the user that you'll be generating a masterplan.md file.
11. Generate the masterplan.md file. This should be a high-level blueprint of the app, including:
- App overview and objectives
- Target audience
- Core features and functionality
- High-level technical stack recommendations (without specific code or implementation details)
- Conceptual data model
- User interface design principles
- Security considerations
- Development phases or milestones
- Potential challenges and solutions
- Future expansion possibilities
12. Present the masterplan.md to the user and ask for their feedback. Be open to making adjustments based on their input.
Important: Do not generate any code during this conversation. The goal is to understand and plan the app at a high level, focusing on concepts and architecture rather than implementation details.
Remember to maintain a friendly, supportive tone throughout the conversation. Speak plainly and clearly, avoiding unnecessary technical jargon unless the developer seems comfortable with it. Your goal is to help the developer refine and solidify their app idea while providing valuable insights and recommendations at a conceptual level.
Begin the conversation by introducing yourself and asking the developer to describe their app idea.The AI generated a solid starting point for the app's architecture, including user authentication, state management with Riverpod, and how to interact with the Appwrite database. I refined this plan as needed throughout the development process.
Here is the the output of the AI of this message:
Hello there! I'm excited to help you plan out your app idea. As a fellow software developer, I know how thrilling it is to bring a new concept to life. To get started, I'll be asking you a series of questions to understand your vision at a high level. Once we've explored all the key aspects, I'll create a comprehensive masterplan.md file to serve as a blueprint for your application.
Let's begin with the basics. Could you tell me about your app idea? What's the main purpose or problem it's trying to solve? Don't worry about technical details just yet - I'd love to hear about the core concept and what inspired you to create this app.2. My Input
You will a make a mobile app using flutter. The app will use appwrite as its backend. The goal is simple the app will have a interface where a list to realtime update information will be shown from the appwrite database. THe collections are:
db -> realtime_update_prod_coll -> docs
these are the realtime update i am showing for myself in my personal portfolio website. The app tasks is to show all the realtime update can add more or delete something or update an existing update.
The docusment Attributes of the collection are:
headline String max 1000 required
description String max 8000
deleted Bool default false
link String max 2000
The app write have main screen where all the realtime information will be shown as a timeline. the latest one will be on top. also deleted one will marked as red color. I can tap on one and update it (update can delete, or change any informations).
There will be option to add new one.
Use flutter riverpod and riverpod hooks for statemanagement libary
Remember:
Keep all stubs minimal. Include just enough information to understand the file's purpose and its place in the overall structure.
Do not implement any actual logic or detailed code.
Use consistent naming conventions throughout the project structure.
If you're unsure about a specific structure or file, refer back to the masterplan or ask the user for clarification.
Begin by reviewing the masterplan.md file and any provided drawings or wireframes. Familiarize yourself with the app's overall structure, main features, and
architectural decisions.
Create a high-level project structure with appropriate directories. This should reflect the app's architecture (e.g., frontend, backend, database) and main features.
For each major component or feature identified in the masterplan, create stub files with minimal, essential information. Include:
a. A brief comment at the top of each file describing its purpose
b. Add a comment with the full filepath to the stub file. This prevents named conflicts when you create files with the same name in different directories.
c. Placeholder import statements for likely dependencies
d. Empty function or class declarations for key functionalities
e. TODO comments indicating where major logic will be implemented
In the stub files, do not include detailed implementations or actual code logic. The goal is to create a skeleton that can be easily expanded in Phase 3.
For the frontend (if applicable):
a. Create basic component files with empty component declarations
b. Stub out main pages or views
c. Include placeholder routing information
For the backend (if applicable):
a. Create stub files for main API endpoints or services
b. Include empty model definitions based on the data structure outlined in the masterplan
c. Stub out database connection file (if needed)
Create a basic README.md file with:
a. Project title and brief description
b. Placeholder sections for setup instructions, main features, and technology stack
If the app requires any configuration files (e.g., package.json, .gitignore), create these with minimal required information.
After creating the stubbed-out project structure, provide a summary of the created files and directories, explaining the purpose of each major component.
Ask the user if they would like to see the content of any specific stubbed files, and be prepared to show and explain them.
Remind the user that this is a minimal structure and that full implementation will occur in Phase 3.
Begin by acknowledging that you're starting Phase 2 and ask the user if they're ready to see the stubbed-out project structure based on the masterplan.The AI response was:
Certainly! I understand that we're moving into Phase 2 of your app development process. Based on the information you've provided, I'll create a stubbed-out project structure for your Flutter mobile app with Appwrite backend, focusing on displaying and managing realtime updates. Before I begin, I'd like to confirm: Are you ready for me to present the stubbed-out project structure based on your requirements and the masterplan we've discussed?3. My Input
You are now entering Phase 3 of the app development process. Your task is to transform the stubbed-out project structure from Phase 2 into fully functional, production-ready code. Follow these instructions:
1. Review the masterplan.md file, any provided drawings or wireframes, and the stubbed-out project structure from Phase 2.
2. Implement the full code for each stubbed file, following these guidelines:
a. Write production-ready code at the level of a senior developer.
b. Ensure the code is readable and well-structured.
c. Consider the implications of your code choices before implementation.
d. Add comments to explain complex logic or important design decisions.
3. If any details are missing or ambiguous, ask the user for clarification before proceeding with the implementation.
4. Focus on implementing core functionality first. Include light error handling and input validation where appropriate.
5. When dealing with third-party integrations or APIs mentioned in the masterplan, use your best judgment to implement them effectively.
6. For database operations and data persistence, choose appropriate methods based on the project requirements and your best judgment.
7. Do not implement extensive testing at this stage unless specifically requested by the user.
8. Do not focus on advanced scalability or performance optimizations unless they are critical for core functionality.
9. Security measures are out of scope for this phase unless explicitly mentioned in the masterplan as core functionality.
10. After implementing each major component or feature:
a. Provide a brief summary of what was implemented.
b. Explain any important design decisions or assumptions made.
c. Highlight any areas where you had to make significant choices or interpretations.
11. Be prepared to show and explain any part of the implemented code if the user requests it.
12. After completing the implementation, provide a high-level summary of the work done, including:
a. Overview of implemented features
b. Any notable challenges encountered and how they were addressed
c. Suggestions for next steps or areas that might need further refinement
13. Ask the user for feedback on the implemented code and be ready to make adjustments based on their input.
Remember:
- Strive for clean, efficient, and maintainable code.
- Ensure consistency in coding style and naming conventions throughout the project.
- While aiming for production-ready code, recognize that further refinement may be needed based on user feedback.
- If you encounter a situation not covered by these instructions, use your best judgment as a senior developer and explain your reasoning to the user.
Begin by acknowledging that you're starting Phase 3 and ask the user if they're ready to proceed with the full code implementation based on the stubbed-out structure from Phase 2.The AI response was:
I understand that we're now entering Phase 3 of the app development process. This is where we'll transform the stubbed-out project structure into fully functional, production-ready code for your Flutter mobile app with Appwrite backend, focusing on displaying and managing realtime updates.
Before we dive into the implementation, I want to confirm: Are you ready for me to proceed with the full code implementation based on the stubbed-out structure we created in Phase 2? If you have any additional requirements or changes you'd like to make before we start, please let me know.4. My Input
No. Now generate the masterplanThe AI response was:
# Masterplan for Flutter Realtime Update App
## App Overview and Objectives
This mobile application, built with Flutter, aims to display and manage realtime updates from an Appwrite backend. The app will serve as a personal portfolio tool, allowing the user to view, add, update, and delete realtime information. The primary objective is to provide a simple, efficient interface for managing these updates on-the-go.
## Target Audience
- Primary user: The app owner (you) for personal use
- Potential future expansion: Other individuals or professionals who need to manage realtime updates for their portfolios or projects
## Core Features and Functionality
1. Display realtime updates in a timeline format
2. Add new updates
3. Edit existing updates
4. Delete updates (soft delete)
5. View update details
6. Realtime synchronization with Appwrite backend
## High-level Technical Stack Recommendations
- Frontend: Flutter
- Backend: Appwrite
- State Management: Flutter Riverpod and Riverpod Hooks
- Database: Appwrite Database
## Conceptual Data Model
Collection: realtime_update_prod_coll
Document Attributes:
- headline (String, max 1000 characters, required)
- description (String, max 8000 characters)
- deleted (Boolean, default false)
- link (String, max 2000 characters)
- timestamp (DateTime, for sorting)
## User Interface Design Principles
1. Material Design guidelines for a cohesive look and feel
2. Timeline-style main screen with latest updates at the top
3. Color-coding for deleted items (red)
4. Intuitive navigation between list view and detail view
5. Simple forms for adding and editing updates
## Security Considerations
1. Implement user authentication using Appwrite
2. Ensure secure communication between the app and Appwrite backend
3. Implement proper data validation on both client and server sides
## Development Phases
1. Project Setup and Configuration
- Set up Flutter project
- Configure Appwrite integration
- Set up state management with Riverpod
2. Core Functionality Implementation
- Implement main timeline screen
- Develop add/edit/delete functionality
- Implement realtime synchronization
3. UI/UX Refinement
- Design and implement detailed view
- Refine timeline appearance
- Implement color-coding for deleted items
4. Testing and Optimization
- Perform thorough testing on various devices
- Optimize performance and responsiveness
- Implement error handling and edge cases
5. Deployment and Maintenance
- Prepare app for release
- Deploy backend to Appwrite
- Plan for future updates and maintenance
## Potential Challenges and Solutions
1. Challenge: Ensuring smooth realtime updates
Solution: Implement efficient state management with Riverpod and leverage Appwrite's realtime capabilities
2. Challenge: Handling offline scenarios
Solution: Implement local caching and synchronization strategies
3. Challenge: Maintaining app performance with large datasets
Solution: Implement pagination or infinite scrolling in the timeline view
## Future Expansion Possibilities
1. Multi-user support with different access levels
2. Categories or tags for updates
3. Rich text or markdown support for update content
4. Integration with other portfolio platforms or social media
5. Analytics dashboard for tracking update engagement
This masterplan provides a high-level overview of your Flutter app for managing realtime updates. It covers the core functionality, technical stack, and development phases, setting a solid foundation for the development process. As we move forward, we can refer back to this plan and make adjustments as needed.The AI generated a comprehensive master plan for the app, outlining the core features, technical stack, data model, user interface design principles, security considerations, development phases, potential challenges, and future expansion possibilities. This plan served as a roadmap for the app's development.
Now I am using another chat window to generate the code from the masterplan. (another window becasue claude habe a limit for max text output for a single chat)
5. My Input
<MASTER_PLAN>
here is a masterplan of my project based on that start the project. Now do the Development Phase 1The AI response was:
## Generated Deatils how to start the project with proper structure6. My Input
write another masterfile that will updated version of the main masterfile but include what have been implemented and whill have the instruction what need to be done next and create another masterfileAI Generated Output:
## Generated Deatils how to start the project with proper structure for the next phase.Similar way i completed the development phase 1, 2, 3, 4 and 5. The AI generated the code based on the masterplan and the input I provided. The process was smooth and efficient, allowing me to focus on tweaking and refining the generated code rather than starting from scratch.
Tweaking and Correcting AI Output
Was the AI-generated code perfect? Not quite. There were a few minor issues, such as syntax errors and incorrect handling of certain Flutter widgets. However, being experienced with Flutter made it easy to fix these mistakes. The process of using AI was more about speeding up development than replacing the need for manual corrections.
After a few iterations and adjustments, the app was fully functional within 5 hours!
Conclusion: AI as a Development Assistant
In the end, AI didn't replace me as a developer, but it definitely sped up my development process. By using AI to generate large chunks of code, I was able to focus on tweaking and correcting the finer details. The experience highlighted how powerful AI can be when used as an assistant rather than a replacement.
If you're a developer curious about AI's potential in app development, I highly recommend experimenting with it. It's a fun, efficient way to approach coding tasks, and with clear planning and iteration, you can create some pretty cool projects in record time.








