3.2 KiB
Executable File
3.2 KiB
Executable File
MarketAlly.ProjectDetector
A comprehensive project type detection library for various programming languages and frameworks.
Overview
MarketAlly.ProjectDetector provides intelligent detection of project types based on file structure, dependencies, and configuration files. It supports detection for:
- .NET projects (Web API, Blazor, MAUI, WPF, Console, etc.)
- Node.js projects (React, Vue, Angular, Next.js, Express)
- Python projects (Django, Flask, generic Python)
- Java projects (Maven, Gradle)
- Other languages (Go, Rust)
- Specialized projects (Functions, Workflows, Tools, Plugins)
- Container and Infrastructure projects
Usage
using MarketAlly.ProjectDetector;
using Microsoft.Extensions.Logging;
// Create detector with logger
var logger = loggerFactory.CreateLogger<ProjectTypeDetector>();
var detector = new ProjectTypeDetector(logger);
// Detect project type
var projectType = detector.DetermineProjectType("MyProject", "/path/to/project");
Project Types
The library defines the following project types in the ProjectType enum:
Standard Types
Standalone- Single-purpose applicationsAPI- RESTful APIs and web servicesWebApp- Web applications with UIMobileApp- Mobile applications (MAUI, Xamarin)Library- Reusable libraries and packagesService- Background services and workersTests- Test projects
Specialized Types
Database- Database and migration projectsFunction- Serverless functions (Azure Functions, AWS Lambda)Tool- Command-line tools and utilitiesPlugin- Plugin and extension projectsInfrastructure- Infrastructure as Code projectsContainerApp- Containerized applicationsChatBot- Bot framework projectsWorkflow- Workflow and orchestration projects
Language-Specific Types
- Node.js:
ReactApp,VueApp,AngularApp,NextJsApp,NodeJsApi,NodeJsApp - Python:
DjangoApp,FlaskApp,PythonApp - Java:
JavaMavenProject,JavaGradleProject - Other:
GoApp,RustApp,SwiftApp,KotlinApp
Desktop Types
WpfApp- Windows Presentation FoundationWinFormsApp- Windows FormsAvaloniaApp- Cross-platform AvaloniaElectronApp- Electron desktop apps
Game Development
UnityProjectUnrealProjectGodotProject
Detection Process
- File Analysis: Examines project files (.csproj, package.json, pom.xml, etc.)
- Dependency Analysis: Checks installed packages and references
- Structure Analysis: Looks at folder structure and file patterns
- Confidence Scoring: Each detector provides a confidence score
- Priority Selection: Returns the highest priority match
Architecture
The library uses a detector pattern where each project type has its own detector implementing IProjectTypeDetector. Detectors are evaluated in priority order:
- Solution files (highest priority)
- Container projects
- Specific frameworks (MAUI, React, Django)
- Technology-specific (Functions, Workflows)
- General categories (API, WebApp)
- Fallback detectors (lowest priority)
Integration
This library is designed to be shared between:
- MarketAlly.AIPlugin
- RefactorIQ
- Other MarketAlly ecosystem projects
License
Copyright (c) MarketAlly. All rights reserved.