Core Framework
.NET 10.0
Latest LTS version with performance improvements and C# 13 features
Blazor Server
Interactive web UI framework with server-side rendering
ASP.NET Core
Web application framework with middleware pipeline
C# 13
Modern C# with nullable reference types and implicit usings
Project Configuration
The project targets .NET 10.0 with specific compiler features enabled:AndanDo.csproj
Key Settings:
- Nullable: Enabled for null-safety at compile time
- ImplicitUsings: Common namespaces auto-imported
- BlazorDisableThrowNavigationException: Prevents exceptions during navigation cancellation
NuGet Packages
AndanDo uses a minimal, focused set of dependencies:Database & Data Access
Microsoft.Data.SqlClient (6.1.3)
Microsoft.Data.SqlClient (6.1.3)
Purpose: SQL Server database connectivityUsage: Direct ADO.NET access for high-performance database operationsWhy not Entity Framework?
Services/Auth/AuthService.cs
- Lower overhead for stored procedure calls
- More control over query execution
- Better performance for high-throughput scenarios
Authentication & Security
System.IdentityModel.Tokens.Jwt (8.14.0)
System.IdentityModel.Tokens.Jwt (8.14.0)
Purpose: JWT token generation and validationUsage: Creating and validating JSON Web Tokens for authenticationFeatures Used:
Services/JWT/JwtTokenService.cs
JwtSecurityTokenHandlerfor token creation- HMAC SHA256 signing algorithm
- Claims-based identity
- Configurable expiration
Email Services
MailKit (4.14.1)
MailKit (4.14.1)
Purpose: SMTP email sendingUsage: Sending transactional emails (booking confirmations, password resets)Why MailKit?
Services/Email/EmailService.cs
- Modern, async SMTP client
- Better than legacy
System.Net.Mail.SmtpClient - Supports HTML emails with attachments
- Strong TLS/SSL support
Image Processing
System.Drawing.Common (8.0.7)
System.Drawing.Common (8.0.7)
Purpose: Image manipulation and thumbnail generationUsage: Resizing uploaded tour images, creating placeholdersUse Cases:
Components/Shared/ImageHelper.cs
- Tour image uploads to
wwwroot/uploads/ - Profile picture processing
- Image validation and format conversion
Frontend Technologies
While Blazor Server uses C# for UI logic, AndanDo includes JavaScript libraries for enhanced functionality:JavaScript Libraries
Chart.js (3.7.1)
Dashboard analytics and booking reports visualization
Google Maps API
Tour location mapping and geolocation features
MapLibre GL (3.6.1)
Alternative mapping library for offline/self-hosted maps
Bootstrap 5
CSS framework for responsive design
JavaScript Integration
Components/App.razor
Blazor Server supports JavaScript interop via
IJSRuntime for calling JavaScript functions from C# and vice versa.Data Transfer Objects (DTOs)
AndanDo uses strongly-typed DTOs for data transfer between layers:DTO Organization
Dtos/
Example DTO Structure
Dtos/AuthDtos.cs
Database Technology
SQL Server
AndanDo uses Microsoft SQL Server for data persistence:Stored Procedures
Complex business logic encapsulated in database
Parameterized Queries
Protection against SQL injection attacks
Transaction Support
ACID compliance for booking operations
Connection Pooling
Efficient connection reuse with SqlConnection
Connection String Configuration
appsettings.json
External APIs
AndanDo integrates with multiple third-party services:Payment Gateway
PayPal REST API
PayPal REST API
Version: v2Endpoints Used:Implementation:
/v2/checkout/orders- Create payment orders/v2/checkout/orders/{id}/capture- Capture payments
appsettings.json
Services/Paypal/PaypalService.cs using HttpClient factoryGeolocation Services
Nominatim OpenStreetMap API
Nominatim OpenStreetMap API
Purpose: Address autocomplete and geocodingFeatures:
- Search with accent normalization
- Coordinate-based reverse geocoding
- No API key required (free tier)
Google Maps JavaScript API
Google Maps JavaScript API
Purpose: Interactive tour location mapsAPI Key Required: Yes (configured in App.razor)Features:
- Marker clustering for multiple tours
- Custom map styles
- Geocoding and Places API
Currency & Localization
Currency Conversion API
Currency Conversion API
Service:
CurrencyConversionServicePurpose: Real-time exchange rates for international usersImplementation: HttpClient-based service with cachingDevelopment Tools
Required Tools
.NET SDK 10.0
Download from microsoft.com/net/download
Visual Studio 2024
IDE with Blazor debugging support (optional)
SQL Server
Express edition or Azure SQL Database
Git
Version control system
Compatible Editors
- Visual Studio 2024: Full debugging, IntelliSense, hot reload
- Visual Studio Code: With C# extension, lighter weight
- JetBrains Rider: Excellent Blazor support
Deployment Technologies
IIS
Windows Server hosting with ASP.NET Core Module
Azure App Service
Managed platform with auto-scaling
Docker
Containerized deployment with Dockerfile
Kestrel
Cross-platform web server (built-in)
See the Deployment Guide for detailed instructions on deploying to various platforms.
Browser Compatibility
Blazor Server requires modern browser features:Supported Browsers
- Chrome/Edge: 90+ (recommended)
- Firefox: 88+
- Safari: 14+
- Mobile browsers: iOS Safari 14+, Chrome Android 90+
Required Features
- WebSockets or Server-Sent Events: For SignalR connection
- JavaScript enabled: Required for Blazor runtime
- LocalStorage: For
ProtectedLocalStorage - Fetch API: For HttpClient operations
Performance Characteristics
Package Size Impact
Published Application Size
Published Application Size
- Framework-dependent: ~50-100 MB (excluding .NET runtime)
- Self-contained: ~200-300 MB (includes .NET runtime)
- Client download: Minimal (~1-2 MB for initial Blazor runtime)
- Trimming enabled for production builds
- Static asset compression (gzip/brotli)
- Minimal external dependencies
Runtime Performance
Server Memory
~30-50 MB per active SignalR connection
Database Queries
Less than 100ms for most stored procedures
Page Load
~500ms initial load, under 200ms navigation
SignalR Latency
~50-150ms for UI updates (WebSocket)
Technology Decisions
Why Blazor Server?
Advantages
Advantages
✅ C# everywhere: No context switching between C# and JavaScript✅ Small client footprint: UI logic runs on server✅ Secure: Business logic never exposed to client✅ Fast time-to-interactive: Minimal JavaScript download✅ Full .NET ecosystem: Access to all .NET libraries
Trade-offs
Trade-offs
⚠️ Server resources: Each user consumes server memory⚠️ Latency: UI updates require round-trip to server⚠️ Scaling: Requires sticky sessions for load balancing⚠️ Offline: Cannot work without server connection
Why ADO.NET over Entity Framework?
Rationale
Rationale
- Performance: Direct control over query execution
- Stored procedures: Better encapsulation of complex business logic
- Flexibility: Easier to optimize hot paths
- Learning: Understanding raw SQL improves database skills
Why MailKit?
Email Library Choice
Email Library Choice
- Modern API: Async/await throughout
- Standards compliance: RFC-compliant MIME, SMTP, IMAP
- Active maintenance: Regular updates and security patches
- Feature-rich: HTML emails, attachments, embedded images
- Deprecated alternative:
System.Net.Mail.SmtpClientis obsolete
Version Upgrade Path
AndanDo targets .NET 10.0 which is in preview/RC as of March 2026. If you encounter issues:
-
Downgrade to .NET 8.0 LTS:
- Check package compatibility: Most packages support .NET 8.0
- Update when stable: Upgrade to .NET 10.0 when it reaches LTS
Next Steps
Project Structure
Explore the file and folder organization
Architecture
Understand the system design
Setup Guide
Set up your development environment
Package Updates
Learn how to update NuGet packages