Flutter Interview Challenge Copilot Prompt¶
Project Overview¶
Create a Flutter interview challenge project for a financial expense tracking app with intentionally flawed implementation. The app should work but contain various issues for candidates to identify and fix. Each implementation should be unique while preserving the core issues to identify.
App Structure and Features¶
Before Starting¶
- Ensure you have Flutter installed and set up on your machine.
- Prompt the user with a plan for the project structure and features before starting the project creation.
Project creation¶
- Create a new Flutter project named
app_demousingflutter create app_demo.
Core Features¶
- User authentication (login/register with various approaches)
- Expense tracking and management (with different UI presentations)
- Expense analysis (charts, summaries, or statistics)
- User settings or profile (implementation varies)
Project Structure Guidelines¶
Design a project structure that includes these key components but feel free to adapt the organization: - Models for data representation (with intentional flaws) - State management implementation (using provider or alternatives) - UI screens for core functionality - Services for business logic and data handling - Reusable widgets or components
Recommended Dependencies¶
Choose from these or similar packages depending on the implementation approach: - State management: provider, riverpod, bloc, or mobx - Local storage: shared_preferences, hive, or sqflite - Routing: go_router, auto_route, or native Navigator - Utilities: intl, uuid, or similar packages - Optional: chart libraries or date-handling packages
Implementation Guidelines with Intentional Flaws¶
Create an implementation that includes the following intentional flaws, but feel free to vary the actual code implementation, class and method names, and UI design. The essential issues should remain for candidates to identify.
Models Implementation¶
- User Model
- Include these intentional issues:
- Store user credentials (especially password) as plain text
- Omit input validation for email format and password requirements
- Missing proper equality comparison (no overridden equals/hashCode)
- Non-immutable data structures (avoid final fields)
- Poor serialization/deserialization patterns
-
Feel free to add or rename fields (e.g., username, firstName/lastName instead of name)
-
Expense Model
- Include these intentional issues:
- Missing validation for numerical fields (allow negative amounts)
- Using primitive types instead of strongly typed options (String for category instead of enum)
- Inefficient date handling and formatting
- Missing proper value equality comparison
- Non-immutable data structures
- Poor serialization/deserialization patterns
- Feel free to customize the model with additional fields or rename existing ones
Services Implementation¶
- Authentication Service
- Include these intentional issues:
- Store credentials in plain text (SharedPreferences or similar)
- No proper error management or typed exceptions
- Missing input validation
- Artificial delays without loading states
- Hard-coded values or missing configurations
-
Implementation can vary (singleton, constructor injection, static methods, etc.)
-
Expense Management Service
- Include these intentional issues:
- Inefficient in-memory data management
- Missing proper data persistence strategy
- No pagination for potentially large datasets
- Inefficient data transformations and manipulations
- Poor error handling
- No optimistic updates
- Implementation approach can vary (repository pattern, direct database access, etc.)
State Management Implementation¶
- Authentication State
- Include these intentional issues:
- Excessive rebuilds (too many notifyListeners or similar)
- Business logic mixed with state management
- Missing loading/error states
- Poor separation of concerns
- Direct access to services from UI without proper abstraction
-
Implementation can use any state management pattern of choice with these flaws
-
Expense State Management
- Include these intentional issues:
- Direct collection manipulation without immutability
- Inefficient state updates causing excessive rebuilds
- Missing proper loading and error states
- Poor caching strategy
- Business logic in UI components
- Implementation can vary (provider, BLoC, MobX, etc.) while preserving the core issues
UI Implementation¶
- Authentication UI (Login/Register)
- Include these intentional issues:
- Minimal form validation or error handling
- Missing loading indicators
- Poor UX for error states
- Business logic in UI components
- Inefficient widget structure causing rebuilds
-
Visual design and specific layout can vary widely
-
Expense Management UI
- Include these intentional issues:
- Inefficient list rendering (avoid ListView.builder or similar optimizations)
- No loading indicators or poor loading state handling
- No error handling for failed operations
- Limited feedback for user actions
- Poorly structured widget tree with unnecessary rebuilds
- Visual presentation and specific components can vary
Navigation Implementation¶
- Include these intentional issues:
- Unprotected routes (no authentication guards)
- Poor deep link handling
- No error handling for navigation failures
- Business logic mixed with navigation
- Inconsistent navigation patterns
- Implementation can use any routing approach (go_router, Navigator 2.0, auto_route, etc.)
Testing Implementation¶
- Include these intentional issues:
- Limited test coverage
- Missing critical test cases (edge cases, error scenarios)
- Hard-to-test components due to tight coupling
- No separation of concerns for testability
- Missing proper test utilities or helpers
Documentation Requirements¶
Project Documentation¶
- Create Docs Directory
- Create a docs directory to store evaluation materials
-
Add this directory to .gitignore to hide it from candidates
-
Create Evaluation Files in Docs Directory
- Create evaluation criteria document with scoring rubric
- Document all intentional issues categorized by type
-
Outline expected solutions a senior developer should propose
-
Create README.md
- Include instructions for running the app
- List intentional improvement opportunities (without revealing all issues)
- Provide test credentials for authentication
- Include a diagram of the application flow (using mermaid or other format)
- Make the README informative but not revealing all intentional flaws
Evaluation Documentation Guidelines¶
Evaluation Criteria Document¶
Create a comprehensive evaluation rubric that includes: - Total score system (50 points) with senior threshold (35+ points) - Evaluation areas covering: - Design principles and SOLID understanding - Architecture patterns and layer separation - State management approaches and implementation - Async code and lifecycle management - Code quality and maintainability - Testing approach and coverage - Error handling and resilience - UX considerations and improvements - Scalability and extensibility planning - Production quality considerations - Each criterion should be scored 0-5 with clear expectations for senior level - Include assessment ranges defining senior, semi-senior, and junior levels
Intentional Issues Document¶
Document all intentional flaws in a structured format: - Categorize issues by component type and area - For each issue, explain: - The nature of the problem - Why it's problematic (security, performance, maintainability, etc.) - How a senior developer should identify it - Key areas to document: - Model and data structure issues - Service layer problems - State management inefficiencies - UI/UX limitations - Architectural concerns - Security vulnerabilities - Performance bottlenecks - Testing gaps
Expected Solutions Document¶
Create a guide outlining potential solutions a senior developer might propose: - For each issue category, describe ideal approaches - Include various potential solutions rather than a single "correct" answer - Cover improvements in: - Data models and validation - Service layer architecture - State management patterns - UI components and user experience - Overall architecture and organization - Security implementations - Performance optimizations - Testing strategies