This repository contains a Mini Tasks application designed to test and showcase Bob's capabilities as an AI coding assistant. Bob from IBM is your AI software development partner that understands your intent, repo, and security standards.
More details about Bob : https://www.ibm.com/products/bob
This repo demonstrates Bob's ability to:
- π Analyze code architecture and explain complex systems
- π Find and fix bugs in existing codebases
- β»οΈ Refactor code following best practices
- π Run applications locally with proper setup
- π¨ Create modern UIs from scratch
- π Generate comprehensive documentation
Bob_mini-tasks/
βββ Initial_Code/ # π΄ BEFORE - Buggy code to test Bob
β βββ README.md # Documentation of all bugs
β βββ backend_main.py # Example of problematic code
β
βββ Result_After_Bob/ # β
AFTER - Bob's refactored solution
β βββ backend/ # Production-ready FastAPI backend
β βββ frontend/ # Modern React UI
β βββ README.md # Complete documentation
β
βββ README.md # This file
Prompt: "Explain the architecture of this project"
Expected: Bob should analyze and explain:
- Backend structure (FastAPI, SQLAlchemy, async operations)
- Frontend architecture (React, Vite)
- Database layer and ORM patterns
- API endpoints and routing
- Clean architecture principles
Prompt: "Find all bugs or bad practices in this project"
Expected: Bob should identify:
- β
20+ bugs and issues (see
Initial_Code/README.md) - Database session leaks
- Dangerous
autocommit=Trueconfiguration - Missing error handling
- CORS issues
- Frontend API mismatches
- And provide fixes for each
Prompt: "Refactor the backend to follow best practices"
Expected: Bob should:
- β Convert to fully async operations
- β Implement dependency injection
- β Add Pydantic validation models
- β Fix all critical bugs
- β Add proper error handling
- β Implement clean architecture
Prompt: "Run the code locally"
Expected: Bob should:
- β Install dependencies (pip, npm)
- β Configure environment
- β Start backend server
- β Start frontend dev server
- β Verify both are running correctly
Prompt: "Create a Web UI to use the app"
Expected: Bob should:
- β Build a modern React interface
- β Implement all CRUD operations
- β Add error handling and loading states
- β Create responsive, beautiful design
- β Connect to backend API
Prompt: "Document this project"
Expected: Bob should create:
- β Comprehensive README files
- β API documentation
- β Setup instructions
- β Architecture diagrams
- β Code comments
- Identified 20+ bugs and bad practices
- Explained architecture in detail
- Provided comprehensive code review
- Converted to fully async operations
- Implemented dependency injection
- Added Pydantic validation
- Fixed all critical bugs
- Created clean architecture
- Built modern React frontend
- Implemented beautiful gradient design
- Added error handling and loading states
- Created responsive layout
- Set up backend server (FastAPI)
- Configured frontend (Vite + React)
- Ensured both run successfully
- Verified API connectivity
- Created comprehensive READMEs
- Documented all changes
- Provided setup instructions
- Added code examples
- β Async/Await - Non-blocking operations
- β Dependency Injection - Proper session management
- β Pydantic Validation - Type-safe APIs
- β Error Handling - HTTP exceptions
- β CORS Configuration - Frontend integration
- β
API Versioning -
/api/v1prefix - β Clean Architecture - Separated concerns
- β Modern React - Hooks and functional components
- β Beautiful UI - Gradient design with animations
- β Error Handling - User-friendly messages
- β Loading States - Visual feedback
- β Responsive Design - Mobile and desktop
- β Real-time Updates - Instant UI feedback
- β Type Hints - Full type coverage
- β Documentation - Comprehensive docs
- β Best Practices - Industry standards
- β Clean Code - Readable and maintainable
- β Testing Ready - Structured for tests
cd Initial_Code
cat README.md # See all the bugs Bob found# Backend
cd Result_After_Bob/backend
pip install -r requirements.txt
python3 -m uvicorn backend.main:app --reload --port 8001
# Frontend (in another terminal)
cd Result_After_Bob/frontend
npm install
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8001/api/v1
- API Docs: http://localhost:8001/docs
| Metric | Before Bob | After Bob |
|---|---|---|
| Bugs | 20+ critical issues | 0 bugs |
| Architecture | Mixed concerns | Clean separation |
| Async Support | None | Fully async |
| Validation | None | Pydantic models |
| Error Handling | Silent failures | HTTP exceptions |
| UI | Basic | Modern & beautiful |
| Documentation | Minimal | Comprehensive |
| Code Quality | Poor | Production-ready |
This repository demonstrates:
- Code Analysis - How to identify bugs and issues
- Refactoring - Transforming bad code into good code
- Best Practices - FastAPI and React patterns
- Architecture - Clean, maintainable structure
- Documentation - Professional documentation standards
- Initial Code: See
Initial_Code/for the buggy version - Solution: See
Result_After_Bob/for the fixed version - Refactoring Details: See
REFACTORING_SUMMARY.md - Backend Docs: See
Result_After_Bob/backend/README.md - Frontend Docs: See
Result_After_Bob/frontend/README.md
- Clone this repo
- Ask Bob to analyze the code
- Ask Bob to fix the bugs
- Ask Bob to run it locally
- Ask Bob to create a UI
- Compare results with
Result_After_Bob/
- Study the bugs in
Initial_Code/ - Review the fixes in
Result_After_Bob/ - Read
REFACTORING_SUMMARY.md - Understand the before/after comparison
- Showcase Bob's capabilities
- Demonstrate refactoring skills
- Show before/after transformations
- Highlight best practices
This repository proves Bob can:
- β Analyze complex codebases
- β Identify and fix bugs
- β Refactor following best practices
- β Create modern UIs
- β Deploy applications locally
- β Generate comprehensive documentation
Perfect for testing AI coding assistants or learning best practices!
Repository: https://github.com/vperrinfr/Bob_mini-tasks
License: MIT
Created by: Vincent Perrin & Bob AI Assistant