How theoch3n/travellog-dotnet works
Project Type and Purpose
• This is a full-stack solution with:
– A server-rendered admin UI (TravelLog MVC app)
– A RESTful backend API (TravelLogAPI)
– Shared data storage (SQL Server via EF Core)
– Real-time chat (SignalR)
– External integrations (Gmail API for email, ECPay for payments)
Top-Level Components
• Admin Browser Client
• TravelLog (MVC app)
• TravelLogAPI (Web API app)
• SQL Server Database
• External Services:
– Gmail API
– ECPay Gateway
• (Optional) TemplateEngineHost – VS template cache host
Layers Within Each App
– Presentation Layer
• MVC Views + Razor Pages (TravelLog)
• API Controllers + SignalR Hubs (TravelLogAPI)
– Application/Business Layer
• Controllers orchestrate services
• Services folder in API handles business logic (e.g., GoogleAuthHelper, GmailServiceHelper, EcpayController)
– Data Access Layer
• Entity Framework Core (DbContext, Models, Migrations)
Relationships & Data Flows
• Browser → HTTP(S) → TravelLog MVC Controllers → EF Core → SQL Server
• Browser → HTTP(S) → TravelLogAPI Controllers (JWT auth) → Services → EF Core → SQL Server
• TravelLogAPI Hubs (SignalR) ← WebSocket → Browser for chat
• TravelLogAPI → Gmail API (SMTP/REST) for sending emails
• TravelLogAPI → ECPay Gateway (REST) for payment processing
• Both apps read/write the same database schema
Architectural Patterns
• Layered MVC for TravelLog UI
• RESTful API + JWT authentication for TravelLogAPI
• Shared domain models duplicated across projects (Models folder in each)
• SignalR Hub for real-time features
• TemplateEngineHost for VS item templates (side-component)
Technologies
• ASP.NET Core 8.0
• Entity Framework Core
• SQL Server 2019
• JWT for auth (TravelLogAPI)
• Gmail API & OAuth2 credentials
• ECPay integration
• SignalR for chat
• Static assets loader (wwwroot in TravelLog)
Final Checklist
– Components clearly named: Browser, TravelLog MVC, TravelLogAPI, DB, Gmail API, ECPay Gateway, SignalR Hub
– Layers depicted within each component
– Notes on protocols and authentication flows