- Overview
- Features
- Architecture
- Getting Started
- Usage
- Project Structure
- Testing
- Technologies
- Contributing
SubTrackr is a comprehensive subscription management system built with .NET 8.0. It provides a complete solution for managing users, subscriptions, payments, and generating detailed reports. The application demonstrates modern software engineering principles including clean architecture, design patterns, and comprehensive testing.
β¨ Fully Functional Console Application - Interactive menu-driven interface
π§ͺ Comprehensive Test Suite - 51 passing tests covering unit, integration, and non-functional testing
ποΈ Clean Architecture - Well-organized layers with separation of concerns
πΎ Data Persistence - JSON-based file storage for all entities
π Advanced Reporting - Monthly reports with detailed analytics
- Create, update, and remove users
- Role-based access control (Customer, Admin, System Process)
- User profile management
- Basic & Premium subscription types
- Create, update, cancel, and renew subscriptions
- Support for Monthly, Quarterly, and Yearly renewal frequencies
- Automatic renewal date calculation
- Subscription status tracking
- Process payments with transaction tracking
- Automatic retry mechanism for failed payments
- Payment history tracking
- Transaction reference generation
- Renewal reminders
- Payment failure notifications
- Cancellation confirmations
- Read/unread status tracking
- Monthly subscription reports
- Payment history analysis
- Failed payment tracking
- Export reports to text files
SubTrackr follows a layered architecture pattern with clear separation of concerns:
βββββββββββββββββββββββββββββββββββββββ
β SubTrackr.Console β β Presentation Layer
β (User Interface) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β SubTrackr.Core β β Business Logic Layer
β ββββββββββββββββββββββββββββββββ β
β β Services β β
β β Repositories β β
β β Models β β
β β Interfaces β β
β β Factories β β
β ββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β Data Persistence β β Data Layer
β (JSON File Storage) β
ββββββββββββββββββββββββββββββββββββββ
- Repository Pattern - Abstract data access layer
- Factory Pattern - Subscription creation
- Service Layer Pattern - Business logic encapsulation
- Dependency Injection - Loose coupling between components
- .NET 8.0 SDK or later
- Visual Studio 2022 / VS Code / Rider (optional)
-
Clone the repository
git clone https://github.com/NickiMash17/SubTrackr.git cd SubTrackr -
Restore dependencies
dotnet restore
-
Build the solution
dotnet build
-
Run the console application
dotnet run --project SubTrackr.Console/SubTrackr.Console.csproj
# From the solution root
dotnet run --project SubTrackr.Console/SubTrackr.Console.csprojThe application will display a welcome screen and interactive menu:
ββββββββββββββββββββββββββββββββββββββββββ
β Welcome to SubTrackr System β
β Subscription Management Platform β
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
β MAIN MENU β
ββββββββββββββββββββββββββββββββββββββββββ
1. User Management
2. Subscription Management
3. Payment Processing
4. View Notifications
5. Generate Reports
6. Save & Exit
-
Create a User
- Select option
1β1(Add User) - Enter name, email, and select role
- Select option
-
Create a Subscription
- Select option
2β1(Create Subscription) - Choose subscription type (Basic/Premium)
- Enter plan details and renewal frequency
- Select option
-
Process Payment
- Select option
3β1(Process Payment) - Enter user ID, subscription ID, and amount
- Select option
-
Generate Report
- Select option
5(Generate Reports) - Enter user ID, month, and year
- Optionally save report to file
- Select option
SubTrackr/
βββ SubTrackr.Core/ # Core business logic
β βββ Models/ # Domain models
β β βββ User.cs
β β βββ SubscriptionBase.cs # Abstract base class
β β βββ BasicSubscription.cs
β β βββ PremiumSubscription.cs
β β βββ Payment.cs
β β βββ Notification.cs
β β βββ MonthlyReport.cs
β βββ Services/ # Business logic services
β β βββ UserService.cs
β β βββ SubscriptionService.cs
β β βββ PaymentService.cs
β β βββ NotificationService.cs
β β βββ ReportService.cs
β βββ Repositories/ # Data access layer
β β βββ GenericRepository.cs
β β βββ UserRepository.cs
β β βββ SubscriptionRepository.cs
β β βββ PaymentRepository.cs
β β βββ NotificationRepository.cs
β βββ Interfaces/ # Contracts
β βββ Factories/ # Factory pattern
β βββ Enums/ # Enumerations
β
βββ SubTrackr.Console/ # Console application
β βββ Program.cs # Entry point
β βββ MenuSystem.cs # Menu system
β
βββ SubTrackr.Tests/ # Test suite
βββ UnitTests/ # Unit tests
β βββ UserServiceTests.cs
β βββ SubscriptionServiceTests.cs
β βββ PaymentServiceTests.cs
β βββ ReportServiceTests.cs
βββ IntegrationTests/ # Integration tests
β βββ SubscriptionPaymentIntegrationTests.cs
β βββ EndToEndTests.cs
βββ NonFunctionalTests/ # Performance & reliability
β βββ PerformanceTests.cs
β βββ ReliabilityTests.cs
βββ TestHelpers/ # Test utilities
βββ MockFactory.cs
The project includes a comprehensive test suite with 51 passing tests covering:
- Service layer testing with mocks
- Model validation and business logic
- Factory pattern testing
- End-to-end workflows
- Data persistence verification
- Service integration testing
- Performance benchmarks
- Reliability and error handling
- Concurrent operation testing
# Run all tests
dotnet test SubTrackr.Tests/SubTrackr.Tests.csproj
# Run with detailed output
dotnet test SubTrackr.Tests/SubTrackr.Tests.csproj --verbosity normal
# Run specific test category
dotnet test --filter "FullyQualifiedName~UnitTests"
dotnet test --filter "FullyQualifiedName~IntegrationTests"β
Total: 52 tests
β
Passed: 51
βοΈ Skipped: 1 (expected - polymorphic JSON limitation)
β Failed: 0
- .NET 8.0 - Modern C# runtime
- C# 12 - Latest language features
- NUnit 3.14 - Testing framework
- Moq 4.20 - Mocking framework
- System.Text.Json - JSON serialization
SubTrackr uses JSON file-based storage for simplicity:
users.json- User datasubscriptions.json- Subscription recordspayments.json- Payment historynotifications.json- Notification records
Data is automatically loaded on startup and saved on exit.
Basic Subscription
- Standard pricing
- Single device support
- No discounts
Premium Subscription
- Discounted renewal pricing
- Multiple bonus features
- Extended grace period (7 days)
- 90% success rate simulation
- Automatic retry mechanism (max 3 attempts)
- Transaction reference tracking
- Failure reason logging
Monthly reports include:
- Active subscriptions summary
- Payment history
- Total amount billed
- Failed payment count
- Export to text file
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Nicolette Mashaba
Created by Nicolette Mashaba
- GitHub: @NickiMash17
- Repository: SubTrackr
- Built with modern .NET best practices
- Comprehensive test coverage
- Clean architecture principles
Made with β€οΈ using .NET 8.0
β Star this repo if you find it helpful!
Created by Nicolette Mashaba π¨
SubTrackr - Your subscription management solution