How dilanvlad/sonikomusicapp works
Project type and purpose
• This is a full‐stack .NET solution called “Musica_SonikoMusic.”
• It consists of three main .NET projects:
• Application.MVC – an ASP.NET Core MVC web application (Razor) serving HTML/CSS/JS to users.
• Aplication.API – an ASP.NET Core Web API providing REST endpoints for Albums, Musics, Playlists, Users, Subscriptions, etc.
• Aplication.Modelos – a class‐library of shared domain models (Album, Music, Playlist, Subscription, Identity, Notifications, etc.).
• There is also Aplication.API.Consumer, a console/worker project that calls the Web API (Crud.cs).
File structure
• Top‐level projects:
• Application.MVC/Controllers, Views, wwwroot (static assets), Services (EmailService), Storage (music files)
• Aplication.API/Controllers, Data (AppDbContext + EF Core migrations), appsettings, Program.cs
• Aplication.Modelos/entities and subfolders for Favorites, Identity, Subscription, Implementation classes
• Aplication.API.Consumer/Crud.cs – a background consumer of the API
• Key patterns and technologies:
• MVC presentation layer (Razor pages + JS + CSS + Bootstrap)
• RESTful API layer with EF Core, migrations, DbContext
• Shared domain models in a separate library
• Local filesystem storage for uploaded music files
• Email service for account management (forgot/reset password)
• EF Core Code‐First migrations
• JSON‐based configuration (appsettings.json)
• Authentication/Authorization via Identity models
README
• Minimal metadata: confirms project name “Aplicacion Musica_SonikoMusic.”
Main components and relationships
a. Components:
• Web Browser (end user)
• ASP.NET Core MVC App (Application.MVC)
• ASP.NET Core Web API (Aplication.API)
• Shared Domain Models (Aplication.Modelos)
• SQL Database (connected via EF Core AppDbContext)
• Local File Storage (music files in Application.MVC/Storage/music)
• External Email Service (SMTP or third‐party)
• API Consumer Service (Aplication.API.Consumer)
b. Relationships / Data Flow:
1. Browser ←→ MVC App: HTTP/HTTPS requests for pages, forms, AJAX calls
2. MVC App ←→ Web API: HTTP REST calls to CRUD resources (Albums, Musics, Playlists, etc.)
3. Web API ←→ Database: EF Core issues SQL queries to the underlying DB (e.g., SQL Server)
4. MVC App → File Storage: reads/writes music file blobs from local filesystem
5. MVC App → Email Service: uses EmailService to send password resets, confirmations
6. API Consumer → Web API: scheduled or event‐driven calls to API endpoints
c. Architectural patterns:
• Layered architecture: Presentation (MVC) → API/Service → Data
• MVC for UI, Repository/UnitOfWork via EF Core for persistence
• Shared domain model library for consistency between MVC and API
• Worker service (Consumer) reusing the same API
d. Technologies & frameworks:
• ASP.NET Core MVC 6+ (Razor view engine, TagHelpers)
• ASP.NET Core Web API (Controllers, Attributes)
• EF Core Code-First migrations
• C# 10+, .NET 6+/7+
• Bootstrap, jQuery for UI
• JSON configuration, logging
• Local file storage (could be swapped for Azure Blob, etc.)