Skip to content

Commit df80679

Browse files
committed
Add comprehensive enhancements: Export, Statistics, Docker, and more
Major Additions: Export/Import Features: - Export tasks to CSV format with full data preservation - Export tasks to Markdown with formatted output - Export tasks to JSON for backup and sharing - Import tasks from JSON files - ExportService with comprehensive error handling Statistics and Reporting: - Task statistics: total, completed, pending, overdue - Completion rate calculation - Average priority tracking - Tasks grouped by priority - Tasks grouped by tag - Overdue and upcoming task detection - StatisticsService with detailed analytics Configuration System: - appsettings.json for application configuration - Configurable task file path, default priority, date format - Export directory configuration - Color and display preferences Docker Support: - Multi-stage Dockerfile for optimized builds - Docker Compose for development and production - .dockerignore for efficient builds - Volume mounting for persistent data - Development container with hot reload VSCode Integration: - tasks.json with build, test, run, and format tasks - launch.json with debug configurations - Pre-configured settings for C# development - Recommended extensions list - Task-specific launch configurations Enhanced Testing: - Integration tests for full workflow scenarios - Export/Import service tests - Statistics service tests - 60+ total unit tests across all services - Test coverage for edge cases and error handling Documentation: - CHANGELOG.md with version history and migration guide - examples/ directory with sample tasks and usage scenarios - EXAMPLES.md with comprehensive usage patterns - Enhanced README with Docker, configuration, and export docs - Task templates and best practices Build System: - Updated project dependencies (Configuration, Spectre.Console) - Enhanced .gitignore for VSCode and Docker artifacts - Cross-platform build script improvements Additional Services: - IExportService and IStatisticsService interfaces - TaskStatistics model for analytics - AppConfig model for configuration - Async export/import operations - Comprehensive logging throughout Examples and Templates: - 10 sample tasks demonstrating all features - Common usage scenarios (daily management, projects, weekly planning) - Tag-based workflows - Batch operations - Backup and restore procedures This update transforms the application into a comprehensive task management system with enterprise-level features while maintaining simplicity and ease of use.
1 parent 2b2f93f commit df80679

18 files changed

+1722
-5
lines changed

.dockerignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Directories
2+
**/bin/
3+
**/obj/
4+
**/out/
5+
**/publish/
6+
**/.vs/
7+
**/.vscode/
8+
**/.idea/
9+
**/node_modules/
10+
**/TestResults/
11+
**/coverage/
12+
13+
# Files
14+
**/.DS_Store
15+
**/*.user
16+
**/*.suo
17+
**/*.userprefs
18+
**/tasks.json
19+
**/test_tasks*.json
20+
**/.git
21+
**/.gitignore
22+
**/.gitattributes
23+
**/*.md
24+
!README.md
25+
LICENSE
26+
27+
# Build artifacts
28+
**/packages/
29+
**/.nuget/
30+
*.nupkg
31+
*.snupkg
32+
33+
# Test and coverage
34+
**/*.trx
35+
**/*.coverage
36+
**/*.coveragexml

CHANGELOG.md

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [2.0.0] - 2024-01-15
9+
10+
### Added
11+
- Complete project restructure with modern .NET architecture
12+
- Modular code organization (Models, Services, Interfaces, CLI)
13+
- Priority system (1-5 levels) for tasks
14+
- Tag support for better task organization
15+
- Due date tracking for tasks
16+
- Task completion status
17+
- Search functionality across descriptions and tags
18+
- Statistics and reporting features
19+
- Overall task statistics
20+
- Tasks by priority breakdown
21+
- Tasks by tag analysis
22+
- Overdue task tracking
23+
- Upcoming task notifications
24+
- Export functionality
25+
- Export to CSV format
26+
- Export to Markdown format
27+
- Export to JSON format
28+
- Import from JSON format
29+
- Configuration file support (appsettings.json)
30+
- Comprehensive unit tests with xUnit
31+
- Service layer tests
32+
- Integration tests
33+
- Export/Import tests
34+
- Statistics tests
35+
- Docker support
36+
- Dockerfile for containerized deployment
37+
- docker-compose.yml for development
38+
- .dockerignore for optimized builds
39+
- VSCode integration
40+
- tasks.json for common operations
41+
- launch.json for debugging
42+
- settings.json for editor configuration
43+
- recommended extensions
44+
- GitHub Actions CI/CD pipeline
45+
- Automated testing
46+
- Code coverage reporting
47+
- Multi-platform builds (Linux, Windows, macOS)
48+
- Build automation scripts
49+
- build.sh for Linux/macOS
50+
- build.cmd for Windows
51+
- Comprehensive documentation
52+
- Enhanced README with examples
53+
- CONTRIBUTING guidelines
54+
- ARCHITECTURE documentation
55+
- EXAMPLES with usage scenarios
56+
- EditorConfig for consistent code style
57+
- Dependency injection throughout the application
58+
- Structured logging with Microsoft.Extensions.Logging
59+
- Async/await for all I/O operations
60+
61+
### Changed
62+
- Migrated from single file to proper .NET solution structure
63+
- Task model enhanced with additional properties
64+
- File-based storage improved with async operations
65+
- Command-line interface redesigned with better UX
66+
- Error handling and validation improved
67+
- Updated .gitignore for .NET projects
68+
69+
### Technical Improvements
70+
- Implemented SOLID principles
71+
- Interface-based design for testability
72+
- Comprehensive error handling
73+
- Input validation at all layers
74+
- Nullable reference types enabled
75+
- XML documentation comments throughout
76+
77+
## [1.0.0] - 2024-01-01
78+
79+
### Added
80+
- Initial release
81+
- Basic task management (add, list, remove)
82+
- JSON file storage
83+
- Simple command-line interface
84+
- MIT License
85+
86+
### Features
87+
- Add tasks with descriptions
88+
- List all tasks
89+
- Remove tasks by ID
90+
- Persistent storage in tasks.json
91+
92+
---
93+
94+
## Upcoming Features
95+
96+
### [2.1.0] - Planned
97+
- Enhanced CLI output with Spectre.Console
98+
- Color-coded task display
99+
- Interactive task selection
100+
- Progress bars for operations
101+
- Rich tables for task lists
102+
- Task categories/projects
103+
- Recurring tasks support
104+
- Task notes and comments
105+
- Task history and audit log
106+
107+
### [2.2.0] - Planned
108+
- Web API for remote access
109+
- RESTful endpoints
110+
- Authentication and authorization
111+
- Cloud storage integration
112+
- Multi-user support
113+
114+
### [3.0.0] - Future
115+
- Database backend (SQLite/PostgreSQL)
116+
- Web interface
117+
- Mobile companion app
118+
- Real-time synchronization
119+
- Team collaboration features
120+
- Task dependencies
121+
- Gantt chart visualization
122+
- Calendar integration
123+
- Email notifications
124+
- Task templates library
125+
126+
---
127+
128+
## Migration Guide
129+
130+
### Upgrading from 1.0.0 to 2.0.0
131+
132+
Your existing `tasks.json` file will need to be migrated to include new fields:
133+
134+
**Old format (1.0.0):**
135+
```json
136+
[
137+
{
138+
"Id": 1,
139+
"Description": "Sample task"
140+
}
141+
]
142+
```
143+
144+
**New format (2.0.0):**
145+
```json
146+
[
147+
{
148+
"Id": 1,
149+
"Description": "Sample task",
150+
"IsCompleted": false,
151+
"Priority": 3,
152+
"CreatedAt": "2024-01-01T10:00:00Z",
153+
"DueDate": null,
154+
"Tags": []
155+
}
156+
]
157+
```
158+
159+
**Migration steps:**
160+
1. Backup your existing `tasks.json` file
161+
2. The application will automatically add default values for new fields
162+
3. Update tasks with priorities and tags as needed
163+
164+
---
165+
166+
## Breaking Changes
167+
168+
### Version 2.0.0
169+
- **File Structure**: Solution restructured, source moved to `src/` directory
170+
- **Build Process**: Now requires .NET 8 SDK
171+
- **Command Output**: Format changed for better readability
172+
- **Configuration**: Now supports appsettings.json for configuration
173+
174+
---
175+
176+
## Contributors
177+
178+
- Task Manager Team
179+
- Code for Good Community
180+
181+
For detailed contribution guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md).
182+
183+
---
184+
185+
## Support
186+
187+
- **Issues**: [GitHub Issues](https://github.com/codeforgood-org/dotnet-task-manager/issues)
188+
- **Discussions**: [GitHub Discussions](https://github.com/codeforgood-org/dotnet-task-manager/discussions)
189+
- **Documentation**: See [README.md](README.md) and [docs/](docs/)

Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Use the official .NET SDK image for building
2+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
3+
WORKDIR /app
4+
5+
# Copy solution and project files
6+
COPY TaskManager.sln ./
7+
COPY src/TaskManager.CLI/TaskManager.CLI.csproj ./src/TaskManager.CLI/
8+
COPY tests/TaskManager.Tests/TaskManager.Tests.csproj ./tests/TaskManager.Tests/
9+
10+
# Restore dependencies
11+
RUN dotnet restore
12+
13+
# Copy the rest of the source code
14+
COPY . .
15+
16+
# Build the application
17+
RUN dotnet build -c Release --no-restore
18+
19+
# Run tests
20+
RUN dotnet test --no-build -c Release
21+
22+
# Publish the application
23+
RUN dotnet publish src/TaskManager.CLI/TaskManager.CLI.csproj -c Release -o /app/publish --no-build
24+
25+
# Use the official .NET runtime image for running
26+
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
27+
WORKDIR /app
28+
29+
# Copy the published application
30+
COPY --from=build /app/publish .
31+
32+
# Create a volume for task data
33+
VOLUME ["/app/data"]
34+
35+
# Set environment variable for tasks file location
36+
ENV TASKS_FILE_PATH=/app/data/tasks.json
37+
38+
# Set the entrypoint
39+
ENTRYPOINT ["./taskman"]
40+
41+
# Default command (show help)
42+
CMD ["help"]

0 commit comments

Comments
 (0)