A feature-rich command-line to-do list application built with C# .NET 8, featuring email notifications via SendGrid integration and comprehensive testing.
- Task Management: Create, edit, delete, and mark tasks as complete
- Data Persistence: Automatic JSON file storage with crash-safe data handling
- Email Integration: SendGrid-powered email notifications and task summaries
- Rich Display: Color-coded table output with task status indicators
- Cross-Platform: Runs on Windows, macOS, and Linux
- Comprehensive Testing: Edge case testing with MSTest framework
# Clone the repository
git clone <repository-url>
cd Week2CLISprint
# Build the application
cd ToDoCliApp
dotnet build
# Run the application
dotnet runThe application will automatically create a data directory at:
- Windows:
%APPDATA%\ToDoCliApp\todo.json - macOS/Linux:
~/.config/ToDoCliApp/todo.json
- List all to-do items - View all tasks with status indicators
- Add a new to-do item - Create tasks with optional due dates
- Edit a to-do item - Modify existing task details
- Delete a to-do item - Remove tasks permanently
- Mark as complete/incomplete - Toggle task completion status
- Email Configuration - Set up SendGrid integration
- Send Task Reminder Email - Email specific task reminders
- Send To-Do List Summary Email - Email complete task summary
- Exit - Save and quit the application
To enable email features:
- Get a SendGrid API key
- Choose option 6 (Email Configuration) from the main menu
- Enter your SendGrid API key and email addresses
- Configuration is saved to
email-config.json
Week2CLISprint/
├── ToDoCliApp/ # Main application
│ ├── Program.cs # Main program logic
│ ├── ToDoItem.cs # Task data model
│ ├── EmailService.cs # SendGrid email integration
│ ├── EmailConfig.cs # Email configuration model
│ └── ToDoCliApp.csproj # Project dependencies
├── ToDoCliApp.Tests/ # Test suite
│ ├── ToDoItemEdgeCaseTests.cs # Comprehensive edge case tests
│ └── ToDoCliApp.Tests.csproj # Test project dependencies
└── README.md # This file
Run the comprehensive test suite:
cd ToDoCliApp.Tests
dotnet testThe test suite includes:
- Extreme Input Testing: Very long strings, special characters, Unicode
- Edge Case Scenarios: ID conflicts, concurrent access, data corruption
- Data Persistence Testing: JSON serialization, file recovery, large datasets
- Framework: .NET 8.0
- Language: C# with nullable reference types
- Data Storage: JSON files using System.Text.Json
- Email Service: SendGrid API integration
- Testing: MSTest framework with edge case coverage
- Platform: Cross-platform console application
| # | Name | Created | Due | Done | Notes |
|---|-------------------|--------------|------------|------|--------------------------|
| 1 | Create CLI App | 2025-07-09 | 2025-07-10 | [x] | |
| 2 | Add SendGrid | 2025-07-09 | - | [ ] | Email integration |
| 3 | Write Tests | 2025-07-10 | 2025-07-11 | [x] | Edge case testing |
- Automatic Backups: Previous data is preserved during updates
- Error Recovery: Graceful handling of corrupted files
- Consistent Storage: Data location doesn't change based on run directory
- Safe Serialization: Robust JSON handling with error recovery
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
dotnet test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Send individual task reminders with:
- Task details and due dates
- Priority indicators
- Custom message content
Generate comprehensive email reports including:
- All pending tasks
- Completed tasks summary
- Overdue task alerts
- Daily/weekly summaries
Data disappeared after update?
- Check
%APPDATA%\ToDoCliApp\for your data file - See
DATA_RECOVERY_EXPLANATION.mdfor recovery steps
Email not sending?
- Verify SendGrid API key is valid
- Check email configuration in option 6
- Ensure sender email is verified in SendGrid
Build errors?
- Ensure .NET 8.0 SDK is installed
- Run
dotnet restoreto restore packages - Check that test files are in
ToDoCliApp.Tests/directory
This project is part of an AI programming course sprint exercise.
Built with ❤️ using .NET 8 and SendGrid