Skip to content

OnlyBlads platform built with dotnet Blazor and Web Apis. Authenticated and authorized with Auth0 iDp

License

Notifications You must be signed in to change notification settings

bobbylite/dotnet-onlybalds

Repository files navigation

OnlyBalds 👨‍🦲

.NET Blazor API

OnlyBalds is a Blazor application with a dedicated Web API for backend operations. It's designed to provide a seamless user experience for our bald community.

📁 Projects

The solution contains three projects:

  1. Blazor Server: This project handles the server-side rendering of the Blazor application.
  2. Blazor Client: This project is responsible for the client-side logic and UI of the Blazor application.
  3. Web API: This project provides the backend for frontend (BFF) implementations, serving as the bridge between the Blazor application and the database.

📚 Entity Framework with Npgsql for PostgreSQL

OnlyBalds uses Entity Framework Core with Npgsql to interface with a PostgreSQL database, ensuring efficient data handling and easy integration.

Database Migrations

  1. Create a migration:
    dotnet ef migrations add MigrationName
  2. Apply the migration:
    dotnet ef database update

This approach leverages the repository pattern and multiple DbContexts (e.g., ThreadDataContext, PostDataContext, CommentDataContext) to organize and handle data effectively.


❤️ Health Checks

The application includes health check support to monitor service health. Access health information at /HealthChecks:

  • /HealthChecks: Displays the application's current health status.

🔧 Build Information

Build information is automatically generated at each build and accessible at the /build-info.html endpoint. This page provides key details like:

  • Build date and time
  • Commit hash
  • Build version

🤖 Hugging Face API Integration

OnlyBalds integrates with the Hugging Face Inference API to enhance chat room moderation using AI models:

  • Toxic BERT: Identifies potentially toxic messages to maintain a respectful environment.
  • Twitter Sentiment: Analyzes sentiment to ensure positive interactions within the chat.

🚀 Getting Started

To get started with the OnlyBalds application, follow these steps:

  1. Clone the repository: git clone https://github.com/bobbylite/OnlyBalds.git
  2. Navigate to the project directory: cd OnlyBalds
  3. Restore the packages: dotnet restore
  4. Run the application: dotnet run

💻 Running the Project Locally

To run the OnlyBalds application locally, follow these steps:

Step 1: Run the BFF Backend

First, you need to run the Backend for Frontend (BFF) which is the Web API project. This project handles the backend operations and serves as the bridge between the Blazor application and the database.

  1. Open a terminal or command prompt.
  2. Navigate to the project directory: cd OnlyBalds
  3. Run the BFF backend with the following command:
dotnet run --project OnlyBalds.Api --launch-profile https

Step 2: Run the Client Application

To run the OnlyBalds client application:

  1. Create a launch profile in the properties directory.
  2. Use VS Code's debug section to run the profile created in the previous steps.

⚙️ Built With


🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues page.

📝 License

This project is MIT licensed.

About

OnlyBlads platform built with dotnet Blazor and Web Apis. Authenticated and authorized with Auth0 iDp

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published