A multi-tenant visitor management system built with .NET 9, implementing Clean Architecture and CQRS patterns.
- 🏢 Multi-tenant architecture
- 🔐 JWT Authentication
- 👥 User management
- 📊 Visitor tracking
- 🏗️ Clean Architecture
- 📝 CQRS with MediatR
- 🗄️ PostgreSQL database
- 🧪 Unit testing with xUnit
- .NET 9.0 SDK
- PostgreSQL 15+
- Visual Studio 2022 or VS Code
- Clone the repository
git clone https://github.com/yourusername/MultiTenantExample.git- Navigate to the project directory
cd MultiTenantExample- Update the connection strings in
appsettings.json
{
"ConnectionStrings": {
"MasterDatabase": "Host=localhost;Port=5432;Database=visitor_master;Username=your_username;Password=your_password"
}
}- Run the migrations
dotnet ef database update --project src/VisitorManagement.Infrastructure --startup-project src/VisitorManagement.Api- Run the application
dotnet run --project src/VisitorManagement.Api├── src/
│ ├── VisitorManagement.Domain # Enterprise business rules
│ ├── VisitorManagement.Application # Application business rules
│ ├── VisitorManagement.Infrastructure# External concerns
│ └── VisitorManagement.Api # Entry point
└── tests/
└── VisitorManagement.Application.UnitTests
This project follows Clean Architecture principles:
- Domain Layer: Contains enterprise-wide business rules and entities
- Application Layer: Contains application-specific business rules
- Infrastructure Layer: Contains frameworks and external concerns
- API Layer: Contains controllers and configuration
Run the tests using:
dotnet test- 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.