IIS-FTP-SimpleAuthProvider/
├── 📁 .git/ # Git repository
├── 📁 .github/ # GitHub workflows and templates
├── 📁 .gitmodules # Git submodule configuration
├── 📁 config/ # Configuration templates and examples
├── 📁 deploy/ # Deployment scripts and automation
├── 📁 docs/ # Project documentation
│ ├── 📄 architecture diagrams.md # System architecture diagrams
│ ├── 📄 codebase-summary.md # Comprehensive codebase overview
│ ├── 📄 installation-and-setup-guide.md # Installation instructions
│ ├── 📄 project-structure.md # This file - project structure
├── 📁 src/ # Source code
│ ├── 📁 AuthProvider/ # IIS Integration Layer
│ │ ├── 📄 AuthProvider.csproj # Project file
│ │ ├── 📄 SimpleFtpAuthenticationProvider.cs # Main auth provider
│ │ ├── 📄 SimpleFtpAuthorizationProvider.cs # Authorization provider
│ │ └── 📄 UserStoreFactory.cs # Dependency factory
│ ├── 📁 Core/ # Business Logic Layer
│ │ ├── 📄 Core.csproj # Project file
│ │ ├── 📁 Configuration/ # Configuration management
│ │ ├── 📁 Domain/ # Domain models
│ │ │ ├── 📄 Permission.cs # Permission entity
│ │ │ └── 📄 User.cs # User entity
│ │ ├── 📁 Logging/ # Logging infrastructure
│ │ │ ├── 📄 AuditLogger.cs # Audit logging
│ │ │ └── 📄 IAuditLogger.cs # Audit logging interface
│ │ ├── 📁 Monitoring/ # Metrics and monitoring
│ │ │ ├── 📄 IMetricsCollector.cs # Metrics collection interface
│ │ │ ├── 📄 MetricsCollector.cs # Metrics collection implementation
│ │ │ └── 📄 NoOpMetricsCollector.cs # No-op metrics collector
│ │ ├── 📁 Security/ # Security services
│ │ │ ├── 📄 FileEncryption.cs # File encryption
│ │ │ ├── 📄 IPasswordHasher.cs # Password hashing interface
│ │ │ ├── 📄 PasswordHasher.cs # Password hashing implementation
│ │ │ └── 📄 SecureMemoryHelper.cs # Secure memory utilities
│ │ ├── 📁 Stores/ # User store implementations
│ │ │ ├── 📄 EncryptedJsonUserStore.cs # Encrypted JSON storage
│ │ │ ├── 📄 EsentUserStore.cs # ESENT database storage
│ │ │ ├── 📄 InstrumentedUserStore.cs # Metrics wrapper
│ │ │ ├── 📄 IUserStore.cs # User store interface
│ │ │ ├── 📄 JsonUserStore.cs # JSON file storage
│ │ │ ├── 📄 SqliteUserStore.cs # SQLite storage
│ │ │ ├── 📄 SqlServerUserStore.cs # SQL Server storage
│ │ │ └── 📄 SqlUserStoreBase.cs # SQL store base class
│ │ └── 📁 Tools/ # Utility tools
│ │ ├── 📄 UserManger.cs # User management
│ │ └── 📄 UserManagerService.cs # User manager service
│ ├── 📁 ManagementCli/ # Command-line interface
│ │ ├── 📁 Commands/ # Command implementations
│ │ │ ├── 📄 CommandOptions.cs # Command options
│ │ │ ├── 📄 EncryptionCommands.cs # Encryption commands
│ │ │ └── 📄 UserCommands.cs # User commands
│ │ ├── 📄 ManagementCli.csproj # Project file
│ │ ├── 📄 Program.cs # Main entry point
│ └── 📁 ManagementWeb/ # Web management interface
│ ├── 📄 Global.asax # Application entry point
│ ├── 📄 Global.asax.cs # Application configuration
│ ├── 📄 ManagementWeb.csproj # Project file
│ ├── 📄 README.md # Web UI documentation
│ ├── 📄 Web.config # Web configuration
│ ├── 📄 Web.BindingRedirects.config # Binding redirects
│ ├── 📁 App_Start/ # Application startup
│ ├── 📁 Content/ # CSS and static content
│ ├── 📁 Controllers/ # MVC controllers
│ │ ├── 📄 AccountController.cs # Authentication controller
│ │ ├── 📄 DashboardController.cs # Dashboard controller
│ │ ├── 📄 HealthController.cs # Health monitoring
│ │ └── 📄 UsersController.cs # User management
│ ├── 📁 Models/ # View models
│ │ ├── 📄 DashboardViewModel.cs # Dashboard data
│ │ ├── 📄 LoginViewModel.cs # Login form data
│ │ └── 📄 UserViewModel.cs # User form data
│ ├── 📁 Scripts/ # JavaScript files
│ ├── 📁 Services/ # Business logic services
│ │ ├── 📄 ApplicationServices.cs # Main service layer
│ │ └── 📄 SystemHealth.cs # Health monitoring service
│ └── 📁 Views/ # Razor view templates
├── 📁 tests/ # Test projects
│ ├── 📁 AuthProvider.Tests/ # Auth provider tests
│ ├── 📁 Core.Tests/ # Core logic tests
│ └── 📁 ManagementWeb.Tests/ # Web interface tests
├── 📁 WelsonJS/ # External toolkit (submodule)
│ ├── 📁 WelsonJS.Toolkit/ # .NET toolkit components
│ │ ├── 📁 EsentInterop/ # ESENT interop layer
│ │ └── 📁 WelsonJS.Esent/ # ESENT wrapper
│ └── 📄 README.md # Toolkit documentation
├── 📄 .gitignore # Git ignore patterns
├── 📄 CONTRIBUTING # Contribution guidelines
├── 📄 IIS-FTP-SimpleAuthProvider.slnx # Solution file
├── 📄 license # MIT license
├── 📄 readme.md # Main project readme
└── 📄 temp-users.json # Temporary user data
Purpose: Native integration with IIS FTP Server extensibility model.
Key Components:
- SimpleFtpAuthenticationProvider: Implements
IFtpAuthenticationProviderinterface - SimpleFtpAuthorizationProvider: Implements
IFtpAuthorizationProviderinterface - UserStoreFactory: Factory pattern for creating dependencies
Dependencies:
Microsoft.Web.FtpServer(IIS FTP extensibility)Coreproject (business logic)
Purpose: Central business logic, security, and data access.
Subsystems:
- Domain: User and Permission entities
- Security: Password hashing, encryption, secure memory
- Stores: Multiple user store implementations
- Configuration: Application settings management
- Logging: Audit logging and monitoring
- Tools: Utility functions and services
Dependencies:
BCrypt.Net-Next(password hashing)System.Text.Json(configuration)WelsonJStoolkit (ESENT integration)
Purpose: User and system management tools.
Web Interface:
- ASP.NET MVC 5 application
- Bootstrap 5 UI framework
- Unity dependency injection
CLI Tool:
- Command-line user management
- Minimal dependencies
- Cross-platform compatibility
AuthProvider → Core
ManagementWeb → Core
ManagementCli → Core
Core → WelsonJS.Toolkit
BCrypt.Net-Next(4.0.3) - Password hashingSystem.Collections.Immutable(9.0.8) - Immutable collectionsSystem.Text.Json(9.0.8) - JSON processingSystem.Security.Cryptography.ProtectedData(9.0.8) - DPAPI encryptionSystem.Data.SQLite.Core(1.0.119) - SQLite supportMicrosoft.Data.SqlClient(6.1.1) - SQL Server supportKonscious.Security.Cryptography.Argon2(1.3.1) - Argon2 hashing
Microsoft.AspNet.Mvc(5.2.9) - MVC frameworkMicrosoft.AspNet.Razor(3.2.9) - Razor view engineMicrosoft.AspNet.WebPages(3.2.9) - Web pagesUnity(5.11.10) - Dependency injectionNewtonsoft.Json(13.0.3) - JSON processingBootstrap(5.3.7) - UI framework
- Debug: Full build with all projects
- Release: Production build with all projects
- Debug.Pack: Build excluding ManagementWeb (for packaging)
- Release.Pack: Production build excluding ManagementWeb
- All Projects: .NET Framework 4.8
- Language Version: Latest C# features
- Nullable Reference Types: Enabled throughout
IIS FTP Site
├── Provider DLLs (AuthProvider)
├── Configuration Files
└── User Data Storage
IIS Web Site
├── ASP.NET MVC Application
├── Static Content (CSS, JS)
└── Configuration Files
System PATH
├── ftpauth.exe (ManagementCli)
└── Configuration Files
ftpauth.config.json- Main application configurationWeb.config- Web application configurationWeb.BindingRedirects.config- Assembly binding redirects
users.json- JSON user store (default)users.db- SQLite user storeusers.mdb- ESENT user store- Encrypted variants with
.encextension
FTP_USERS_KEY- Encryption key for user dataFTP_CONFIG_PATH- Configuration file pathFTP_LOG_LEVEL- Logging verbosity
- Prometheus Format: Textfile exporter
- Authentication Metrics: Success/failure rates
- Performance Metrics: Response times, throughput
- Health Checks: System and dependency status
- Windows Event Log: Native Windows logging
- File Logs: Structured JSON logging
- Debug Output: Development logging
- Audit Trail: Complete action history
- System Health: Overall system status
- Dependency Health: Database and storage status
- Performance Metrics: Resource utilization
- Alerting: Configurable thresholds
- AuthProvider.Tests: IIS integration testing
- Core.Tests: Business logic testing
- ManagementWeb.Tests: Web interface testing
- Unit Tests: Isolated component testing
- Integration Tests: End-to-end workflow testing
- Security Tests: Authentication and encryption validation
- Mocking: Interface-based testing with Moq
# Restore packages
dotnet restore
# Build solution
msbuild IIS-FTP-SimpleAuthProvider.slnx
# Build with specific configuration
msbuild IIS-FTP-SimpleAuthProvider.slnx /p:Configuration=Release
# Build specific project
msbuild src/AuthProvider/AuthProvider.csproj
# Clean solution
msbuild IIS-FTP-SimpleAuthProvider.slnx /t:Clean
# Run tests
msbuild IIS-FTP-SimpleAuthProvider.slnx /t:Test- Visual Studio: Full IDE support with IntelliSense
- Dotnet CLI: Command-line development and testing
- VS Code: Lightweight editing with C# extensions
- MSBuild: Primary build system for .NET Framework
- PowerShell: Scripting and automation
- AI Friends: ChatGPT, Gemini, Cursor, and GitHub Copilot
- Multi-algorithm password hashing (BCrypt, PBKDF2, Argon2)
- Encryption at rest (DPAPI, AES-GCM)
- Secure memory management
- Comprehensive audit logging
- Hot-reload configuration
- In-memory caching
- Async operations throughout
- Connection pooling
- Multiple storage backends
- Configurable algorithms
- Environment-based configuration
- Plugin architecture
- Prometheus metrics
- Health endpoints
- Structured logging
- Performance tracking
This project structure demonstrates a well-organized, maintainable codebase with clear separation of concerns, comprehensive testing, and modern development practices.