Skip to content

tickBit/Gallery-Blazor

Repository files navigation

Gallery Blazor App

A learning / demo project built with .NET 10, Blazor (Interactive Server), ASP.NET Core Identity, and Entity Framework Core.
The application allows users to register, log in, upload images, control image visibility (public/private), and edit pictures' settings.

Features

  • User authentication (ASP.NET Core Identity)
  • Image upload with preview
  • Public / private images
  • Gallery view with pagination
  • Image editing and deletion (owner-only)
  • SQL Server database with EF Core migrations

Technology Stack

  • .NET 10
  • Blazor (Interactive Server)
  • ASP.NET Core Identity
  • Entity Framework Core
  • SQL Server / LocalDB
  • Bootstrap 5

Prerequisites

  • .NET SDK 10
  • SQL Server (LocalDB or Express recommended)
  • EF Core CLI tools

Install EF Core CLI tools

The EF Core command-line tools are required to apply database migrations.

dotnet tool install --global dotnet-ef

Setup the project

Install the required NuGet packages: dotnet restore

(Just in case: Update the database connection string in appsettings.json: "ConnectionStrings": { "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=GalleryBlazorDB;Trusted_Connection=True;MultipleActiveResultSets=true" })

Apply the initial database migration (needs to be done only once): dotnet ef database update

Run the application:

dotnet run

At least in my setup, the application runs at http://localhost:5269/ by default.

Pictures

User1 can edit the settings of the picture in the gallery as owner. User1 has made the picture public.

Gallery-user1

User2 can see the public picture user1 has uploaded, but can't edit it.

Gallery-user2

About

A little full-stack gallery demo with Blazor server

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors