This is an interactive Blazor application built with the MudBlazor framework. The application uses ASP.NET Web API to fetch project data and send contact emails. (Not going to update this portfolio anymore since i migrated my portfolio to react as frontend)
- Interactive Blazor client application
- Utilizes MudBlazor for UI components
- ASP.NET Web API for backend services
- PostgreSQL database integration
- Two web API endpoints:
/api/Mail
for sending emails/api/Project
for fetching project data
YoussofPortfolio/
├── Client/
│ └── [Blazor Client Project Files]
├── Server/
│ └── [Blazor Server Project Files]
YoussofPortfolio.API/
│ ├── Controllers/
- NET 8.0 SDK
- PostgreSQL database
- Clone the repository
git clone https://github.com/youssofkhawaja/MyPortfolio-Blazor.git
cd MyPortfolio-Blazor
- Configure the database connection in
appsettings.json
- Build and run the project:
dotnet build
dotnet run
To connect to your PostgreSQL database, update the appsettings.json file in the Server project with your database connection string
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft.AspNetCore.Mvc": "Warning",
"Microsoft.AspNetCore.Routing": "Warning",
"Microsoft.AspNetCore.Hosting": "Warning"
}
}
},
"ConnectionStrings": {
"DefaultConnection": "Server=db;Port=5432;User Id=userid;Password=pwd;Database=youssofportfoliodb;"
},
"AppSettings": {
"Secret": ""
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
- Edit YoussofPortfolio.API/Services/MailService.cs
- Replace email with your email and pwd with your password
-
Mail API:
/api/Mail/SendMail
- Endpoint for sending contact emails.
- Expects a JSON payload with email details.
-
Project API:
/api/Project
- ndpoint for fetching project data.
- Returns a list of projects from the database.
Contributions are welcome! Please fork the repository and submit a pull request.
Distributed under the MIT License. See LICENSE
for more information.