THE SUMMARYAI-generated
AI Coding Workflow: From Idea to App
Key Concepts:
- AI-assisted coding workflow
- Model selection (Gemini 2.5 Pro, Deepseek V3)
- API key management (Requesty)
- R code integration
- Frontend framework (Next.js with T3 stack)
- Backend database (Superbase)
- Prompt engineering
- Token optimization
- AI coding tools (R code, Kodium)
1. Idea Brainstorming and Mockup Creation
- The process starts with an idea, such as creating an app to manage LLM benchmarks.
- Instead of directly prompting a model, a basic mockup of the desired UI is created using tools like Figma or Excalidraw.
- The mockup is then converted into a better-looking UI variant using prompts in ChatGPT (referencing the GPT40 designer video for specific prompts).
2. Model Selection and API Key Management
- Model Choice: Gemini 2.5 Pro is the primary model due to its cost-effectiveness and 1 million token context window. Deepseek V3 is used for simpler tasks to save money. Newer models are also explored.
- Problem: Managing multiple API keys and credits across different models is tedious.
- Solution: Transition from OpenRouter to Requesty for API key management.
- Reasons for Switching to Requesty:
- $1 sign-up credit and $5 extra credit for top-ups over $5.
- Seamless integration with R code.
- Improved dashboard with detailed usage statistics (model speed, language used, etc.).
- API key-based settings features.
- Reasons for Switching to Requesty:
3. Requesty Features and Benefits
- Logging Feature: Logs input and output data for public applications, enabling monitoring and fine-tuning of smaller local models.
- Usage Per Key: Allows tracking token consumption across different applications (e.g., bolt DIY, clin, rue code, custom apps).
- Fallback Models: Sets up a chain of fallback models in the policy, ensuring requests are fulfilled even if the primary model fails (e.g., using free Gemini 2.5 Pro with a paid version as fallback).
- Custom Prompt: Adds a custom system prompt to every request made through an API key, overriding the system prompts of applications like R code.
- GOU Coder System Prompt: A pre-built system prompt for R code that limits output to code, optimizing for less text and resulting in approximately 90% token savings.
- MCP Prompt Removal: Options to remove MCP prompts for additional token savings (30% and 10% respectively).
- Token Savings: Requesty helps save on token costs, and the $5 free credit is a bonus.
- Cache Reliability: The model cache breaks less often in Requesty, further contributing to cost savings.
4. R Code Integration and Project Initialization
- R Code Setup: R code is configured with Requesty as the provider, selecting the desired model (e.g., Gemini 2.5 Pro free) and setting up fallback models in Requesty.
- Project Initialization:
- Expo Mobile Apps: Basic expo starter kit.
- Next.js Apps: T3 stack is preferred for type safety and TRPC integration. Alternatively, a basic Next.js app can be used.
- Initial Prompt: The initial prompt removes pre-built pages, keeps the main homepage, removes all elements from it, and changes the project title to the desired name (e.g., "king bench").
5. UI Replication and Development
- The generated image of the UI is given to the AI coder (R code) to replicate.
- Gemini 2.5 Pro is effective at replicating the UI.
- Further prompting and manual coding are required to complete the app.
- Recommendation: Learning the programming language (e.g., React, Flutter) is essential for ensuring code quality and preventing errors.
6. Backend and Tooling
- Database: Superbase is the primary database, with Firebase as an alternative. R code is used to configure the database by providing endpoint and key details.
- MCP Servers: The fetch tool and serper search tool are used for searching new libraries, documentation, and scraping pages.
- Autocomplete: Kodium is used for autocomplete.
- Windsurf and Cursor: Not used due to model truncation and limited configuration options.
7. Conclusion
- The AI coding workflow involves a combination of model selection, API key management, prompt engineering, and manual coding.
- Requesty is a valuable tool for managing API keys, optimizing token usage, and setting up fallback models.
- Learning the programming language is crucial for ensuring code quality and preventing errors.
- The presented workflow is cost-effective, with many tools offering free tiers.
AI summaries can miss context or contain errors. Check important details against the original video.





