A hobby application for simple identity resolution using C# .NET 8.
This application provides a basic identity resolution system that can match and consolidate identity records from various sources. It's designed as a learning project to explore identity matching algorithms and patterns.
- Identity Matching: Compare and match identity records based on various attributes
- Data Normalization: Clean and standardize input data for better matching
- Confidence Scoring: Assign confidence levels to matches
- RESTful API: HTTP API for identity operations
- In-Memory Storage: Quick setup with in-memory data store (can be extended to use SQL Server)
├── src/
│ ├── IdentityResolution.Core/ # Core business logic and domain models
│ └── IdentityResolution.Api/ # Web API project
├── tests/
│ └── IdentityResolution.Tests/ # Unit and integration tests
├── docs/ # Documentation
└── .devcontainer/ # Development container configuration
- Docker (for devcontainer)
- VS Code with Remote-Containers extension
- Clone this repository
- Open in VS Code
- When prompted, choose "Reopen in Container"
- Wait for the container to build and initialize
- Run the application:
dotnet run --project src/IdentityResolution.Api
If you have .NET 8 SDK installed locally:
# Restore packages
dotnet restore
# Build the solution
dotnet build
# Run tests
dotnet test
# Run the API
dotnet run --project src/IdentityResolution.Api
Once running, the API will be available at:
- HTTP:
http://localhost:5000
- HTTPS:
https://localhost:5001
- Swagger UI:
http://localhost:5000/swagger
POST /api/identities
- Add a new identityGET /api/identities/{id}
- Get an identity by IDPOST /api/identities/match
- Find potential matches for an identityPOST /api/identities/resolve
- Resolve and merge identities
An identity record contains:
- Basic information (name, email, phone)
- Demographic data (date of birth, address)
- Identifiers (SSN, driver's license, etc.)
The system uses configurable matching rules based on:
- Exact matches on unique identifiers
- Fuzzy matching on names using string similarity
- Weighted scoring across multiple attributes
- Configurable confidence thresholds
- Normalization: Clean and standardize input data
- Blocking: Group records for efficient comparison
- Matching: Apply similarity algorithms
- Scoring: Calculate confidence scores
- Resolution: Determine final matches based on thresholds
Key configuration options in appsettings.json
:
{
"IdentityResolution": {
"MatchingThreshold": 0.8,
"AutoMergeThreshold": 0.95,
"EnableFuzzyMatching": true
}
}
- Implement
IMatchingRule
interface in the Core project - Register the rule in dependency injection
- Configure rule weights and parameters
Run all tests:
dotnet test --logger "console;verbosity=detailed"
Run with coverage:
dotnet test --collect:"XPlat Code Coverage"
This project includes comprehensive DevOps workflows for automated security and build/test automation:
- Automated Build & Test: Every push and pull request triggers automated building and testing
- Multi-job Pipeline: Parallel execution of build, test, and code quality checks
- Artifact Management: Test results and code coverage reports are automatically collected
- Docker Build: Automated container builds for main branch deployments
- CodeQL Analysis: Advanced semantic code analysis for security vulnerabilities
- Dependency Scanning: Automated checks for vulnerable NuGet packages
- Secret Scanning: Detection of accidentally committed secrets and credentials
- Security Auditing: Regular security pattern analysis with DevSkim
- Automated Updates: Dependabot automatically creates PRs for dependency updates
- Grouped Updates: Related packages are updated together for easier review
- Security Updates: Priority handling of security-related dependency updates
- Multi-Ecosystem: Covers .NET packages, GitHub Actions, and Docker images
Workflow | Status | Purpose |
---|---|---|
CI/CD Pipeline | Build, test, and deployment automation | |
Security Scanning | Vulnerability detection and security auditing |
To receive notifications about workflow failures or security alerts:
- Watch this repository for Releases only or All Activity
- Configure notification settings in your GitHub profile
- Enable email notifications for security alerts
This is a hobby project, but contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Advanced matching algorithms (machine learning)
- Database persistence options
- Batch processing capabilities
- Web UI for identity management
- Export/import functionality
- Audit logging and history tracking