⚠️ DISCLAIMER: This project is for educational purposes only. Please ensure compliance with the terms of service of any websites you interact with and respect their robots.txt files and rate limiting policies.
TechTicker is a comprehensive system designed to track prices of specified computer hardware and related products across multiple e-commerce websites. It provides users with historical price data and alerts them to price changes based on user-defined rules. The system features an administration portal for managing products, categories, and system configurations.
- Accuracy: Provide accurate and timely price information.
- Organization: Effectively categorize products for ease of browsing and management.
- Stealth: Implement scraping methods that aim to reduce the likelihood of detection by target websites.
- Reliability: Ensure consistent operation of scraping and alerting mechanisms.
- Scalability: Design the application to handle a growing number of products, users, and tracked sites.
- Maintainability: Leverage .NET Aspire for backend organization and Angular best practices for the frontend.
- Usability: Provide a clear API and an intuitive admin portal.
TechTicker employs a monolithic architecture for its backend, built with .NET Aspire. The backend consists of:
- A primary ASP.NET Core web project (
TechTicker.ApiService) handling API requests. - Several .NET Worker Service projects (
TechTicker.ScrapingWorker,TechTicker.NotificationWorker) for background tasks like scraping and notifications. These projects are organized within a single .NET Aspire solution, orchestrated by theTechTicker.AppHostproject.
The frontend is a Single Page Application (SPA) built using Angular (TechTicker.Frontend). It serves as the administration and CRM portal, communicating with the backend via a RESTful API.
A message broker (RabbitMQ) is used for asynchronous communication between the API layer and background worker components.
- Framework: .NET 8+ with ASP.NET Core, .NET Worker Services
- Orchestration & Development: .NET Aspire
- Database: PostgreSQL with Entity Framework Core (EF Core)
- Message Broker: RabbitMQ
- Web Scraping: AngleSharp, HttpClientFactory
- Authentication: JWT (JSON Web Tokens) via ASP.NET Core Identity
- Logging: Serilog integrated with OpenTelemetry
- Containerization: Docker (facilitated by .NET Aspire)
- Framework: Angular (v20)
- CLI: Angular CLI
- Package Manager: npm
The solution is organized into the following main projects:
TechTicker.AppHost/: .NET Aspire application host for orchestrating services during development.TechTicker.ServiceDefaults/: Shared configurations and extensions for .NET Aspire services.TechTicker.ApiService/: The main ASP.NET Core web API.TechTicker.Frontend/: Angular SPA for administration and CRM. (SeeTechTicker.Frontend/README.mdfor more details)TechTicker.ScrapingWorker/: Worker service for web scraping tasks.TechTicker.NotificationWorker/: Worker service for sending notifications.TechTicker.Domain/: Core domain entities and business logic.TechTicker.DataAccess/: Data access layer using EF Core and PostgreSQL.TechTicker.Application/: Application services, DTOs, and other application-level concerns.TechTicker.Shared/: Common utilities, response models, and exception handling. (SeeTechTicker.Shared/README.mdfor more details)
- Product Catalog Management: Administer products, including categorization.
- Price Tracking: Scrape and store historical price data for specified products.
- Alerting System: Notify users of price changes based on defined rules, with full alert history and audit trails.
- User Management: Secure authentication and authorization for administrators.
- Stealthy Scraping: Implements techniques to reduce detectability, including advanced proxy integration and analytics.
- Admin & CRM Portal: Angular-based frontend for system management.
The TechTicker.ApiService exposes a RESTful API for managing the system. Key resource endpoints include:
/api/products: For managing products (CRUD operations)./api/categories: For managing product categories./api/alerts: For managing price alert rules./api/auth: For user authentication and authorization./api/siteconfigs: For managing configurations for different e-commerce sites.
For detailed API specifications, refer to the Swagger/OpenAPI documentation available when the TechTicker.ApiService is running (typically at /swagger).
The backend services are orchestrated using .NET Aspire.
- Ensure you have the .NET 8 SDK installed.
- Open the
TechTicker.slnsolution file in Visual Studio or your preferred IDE. - Set
TechTicker.AppHostas the startup project. - Run the
TechTicker.AppHostproject. This will launch all backend services, including the API, worker services, database, and message broker (as configured inProgram.csofTechTicker.AppHost).
The frontend is an Angular application.
- Ensure Node.js (18+) and Angular CLI are installed.
- Navigate to the
TechTicker.Frontend/directory. - Install dependencies:
npm install - Start the development server:
ng serve - Open your browser and navigate to
http://localhost:4200/.
For more details on frontend development, refer to TechTicker.Frontend/README.md.
Each service (TechTicker.ApiService, TechTicker.ScrapingWorker, TechTicker.NotificationWorker, TechTicker.AppHost) uses appsettings.json and environment-specific appsettings.{Environment}.json files for configuration.
Key configurations include:
- Database Connection Strings: Found in
TechTicker.ApiService/appsettings.jsonand overridden by Aspire for development. - RabbitMQ Connection: Managed by .NET Aspire in development and configurable for production.
- JWT Settings: For authentication in
TechTicker.ApiService/appsettings.json. - Logging Levels: Configurable per service.
When deploying, ensure these configurations are appropriately set using environment variables or other configuration providers.
- Backend: .NET Aspire provides tools and patterns to simplify deployment to containerized environments (e.g., Docker, Azure Container Apps). Dockerfiles can be generated to assist with this process.
- Frontend: The Angular application can be built using
ng buildand the output in thedist/directory can be deployed to any static web hosting service.
Contributions to TechTicker are welcome! If you'd like to contribute, please follow these general guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-nameorgit checkout -b fix/issue-number. - Make your changes and ensure they adhere to the project's coding style and conventions.
- Write unit tests for any new functionality or bug fixes.
- Ensure all tests pass.
- Commit your changes with a clear and descriptive commit message.
- Push your branch to your forked repository.
- Create a pull request to the main repository's
mainordevelopbranch (please clarify which branch is primary for PRs if notmain).
Please ensure your pull request describes the changes made and any relevant context.
This project is licensed under the MIT License. See the LICENSE file for more details. (Note: A LICENSE file should be added to the repository root).
For more detailed information on the system's design, modules, and specifications (including all new features in v2.2), please refer to the Detailed Software Specification.