https://github.com/zeljkovranjes/simpleblog
🗿 A rudimentary blog system that can be used as a personal or shared blog using blazor server.
https://github.com/zeljkovranjes/simpleblog
blazor-server blog csharp postgres rudimentary
Last synced: 3 months ago
JSON representation
🗿 A rudimentary blog system that can be used as a personal or shared blog using blazor server.
- Host: GitHub
- URL: https://github.com/zeljkovranjes/simpleblog
- Owner: zeljkovranjes
- Created: 2023-05-01T20:30:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-31T00:05:02.000Z (almost 3 years ago)
- Last Synced: 2025-06-22T04:28:19.124Z (about 1 year ago)
- Topics: blazor-server, blog, csharp, postgres, rudimentary
- Language: C#
- Homepage: https://projects.zeljko.me/simpleblog/
- Size: 613 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

----------------------------------------------------------------
View Preview
https://www.youtube.com/watch?v=MOxt6Icv19Q
Live Preview
https://projects.zeljko.me/simpleblog/
I originally wrote a blog system in Rust, but it was terrible, so I rewrote it in a more familiar language.
This project should be used as a personal blog, meaning you should be the only person who uses it. But if you want
more than one to use it, go right ahead. That's fine too.
The Codebase follows the Vertical Slice Architecture, or at least it tries. All contributions are appreciated thank
you.
You can modify anything to your liking.
## Getting started
For the program to work PostgreSQL must be running and be configured inside the `Web/appsettings.json` before execution.
1. Install [PostgreSQL 15.3](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)
2. Install [.NET 7 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
3. Blazor Server
### 1. Installation
```bash
git clone https://github.com/chomnr/SimpleBlog.git
cd simpleblog
# Build
dotnet build
# Run
cd Web
dotnet run
# Unit tests
dotnet test Tests/Tests.csproj
# Publish
dotnet publish Web/Web.csproj --configuration Release
```
### 2. Migrations
Please before running the migration commands ensure that Postgres is RUNNING && CONFIGURED inside `appsettings.json`.
```bash
# Run directly from root folder. ./simpleblog
dotnet ef migrations add "InitialMigration" --project Application --startup-project Web --output-dir Infrastructure/Persistence/Migrations
dotnet ef database update --project Application --startup-project Web
```
### 3* Configuring a domain with a pathbase.
If you plan to host your site on a pathbase, please continue reading. If not, don't worry.
#### What is a pathbase?
Here's an example.
✅
```
example.com/pathbase and test.example.com/pathbase have a pathbase..
```
❌
```
example.com and test.example.com do not have a pathbase.
```
#### Setting up a pathbase.
* Go to `Web/Program.cs`
* Add `app.UsePathBase("/pathbase");` make sure you change `/pathbase` to your PathBase
### 4* Setting up email confirmation.
If you would like the user to only be able to sign in with a confirmed account, please follow the instructions.
#### Setup
* Go to `Web/Program.cs`
* change `options.SignIn.RequireConfirmedAccount = false` to `true`
* change `options.SignIn.RequireConfirmedEmail = false` to `true`
## Contributions
I preferably just want commits from `#first-timers-only`. But contributions from anyone is welcomed.
* Bug Fixes (love it)
* Features (you shouldn't have)
* More tests (i'm sorry)