A full-stack blog platform built with ASP.NET Core 8.0 and React.js
It enables users to create, edit, and follow blog posts, interact through comments and likes, and receive real-time notifications powered by SignalR.
The system is built using Clean Architecture principles and follows the CQRS (Command Query Responsibility Segregation) pattern for high scalability and maintainability.
π Live Demo https://marko-blog.vercel.app/
π¨βπ» Admin login:
Username: admin
Password: admin123
π¨βπ» Author login:
Username: emily_s
Password: pass123
β
Post Management β Create, edit, and delete blog posts with images and categories.
β
Comments & Likes β Interact with posts and comments in real-time.
β
Following System β Follow favorite authors and get updates about their activity.
β
Real-Time Notifications β SignalR provides instant updates on comments, likes, and follows.
β
JWT + Firebase Authentication β Ensures secure login and role-based access.
β
Advanced Filtering & Pagination β Find content efficiently by multiple criteria.
β
Use Case Logging β Every action is logged for transparency and analysis.
β
Responsive Design β Fully optimized for desktop and mobile devices.
β
Administrative Dashboard β Manage users, posts, and author requests.
MyBlog follows a multi-layered architecture adhering to Clean Architecture and SOLID principles:
| Layer | Description |
|---|---|
| Domain | Defines core business entities and rules. Independent of any technical details. |
| EFDataAccess | Manages database operations using Entity Framework Core. Includes configurations, migrations, and global filters. |
| Application | Contains business logic, use-cases, commands, queries, DTOs, validation, and logging. Implements the CQRS pattern. |
| Implementation | Provides concrete service implementations (repositories, SignalR, email services, etc.). |
| API | ASP.NET Core Web API exposing RESTful endpoints for the frontend. Includes centralized error handling and JWT authentication. |
| Client | React.js frontend communicating with the API via Fetch API and SignalR. Uses Redux Toolkit for state management and Tailwind CSS for styling. |
- ASP.NET Core 8.0 β Web API
- C# β Core language
- Entity Framework Core β ORM for SQL Server
- SignalR β Real-time WebSocket communication
- CQRS β Segregated command and query processing
- JWT β Token-based authentication
- Sentry β Error logging and performance tracking
- React.js β Client-side app
- Redux Toolkit β Global state management
- Tailwind CSS & Flowbite React β UI styling
- Fetch API β Communication with backend
The project was originally built using SQL Server, but has since been fully migrated to PostgreSQL to improve portability, deployment compatibility (Railway/Postgres hosting), and development speed.
All Entity Framework configurations and migrations are adjusted accordingly.
- JWT (JSON Web Token) β Handles user authentication and role-based access.
- Firebase β Supports external authentication providers.
- FluentValidation β Validates request data at the application layer.
- Global Exception Handling β Centralized API error management for consistent responses.
- Asynchronous operations β Non-blocking data processing for better performance.
- Pagination & Filtering β Efficiently retrieves only relevant data.
- BulkExtensions β Optimized for large-scale database operations.
- Decoupled services β Easy horizontal scaling and independent deployment.
MyBlog/
βββ Domain/ # Core entities and business models
βββ EFDataAccess/ # Entity Framework configurations, migrations & DbContext
βββ Application/ # CQRS commands & queries, DTOs, validation
βββ Implementation/ # Services, repositories, SignalR hub, etc.
βββ API/ # ASP.NET Core Web API (Controllers, Middleware, JWT)
βββ Client/ # React.js frontend app (Vite)Install:
- .NET SDK 8.0+
- Node.js 18+
- PostgreSQL: Railway hosted instance or Local PostgreSQL (postgres default user)
- EF Core CLI tool:
dotnet tool install --global dotnet-ef --version 8.0.0Before running the API, create your local config file: Go to the API/ folder Copy the template file:
appsettings.Development.json.example β appsettings.Development.jsonOpen the new file and fill in your real values:
PostgreSQL connection string (Railway or local Postgres)
JWT secret key (min 32 chars)
Optional SMTP config
This file is NOT tracked by Git and must be created manually.
π JWT Example
"JWT": {
"Issuer": "http://localhost:5000",
"Audience": "BlogClient",
"SecretKey": "your-dev-secret-key-min-32-chars",
"TokenExpiryMinutes": 120
},β SMTP Example
"SMTP": {
"SenderEmail": "noreply@yourdomain.com",
"Host": "smtp.yourdomain.com",
"Port": 587,
"Username": "noreply@yourdomain.com",
"Password": "your-smtp-password"
}API uses PostgreSQL connection from appsettings.Development.json.
β Railway example:
"ConnectionStrings": {
"DefaultConnection": "Host=YOUR_HOST;Port=YOUR_PORT;Database=railway;Username=postgres;Password=YOUR_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"
}β Local PostgreSQL example:
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=blog;Username=postgres;Password=yourpassword"
}π¦ Required NuGet package:
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQLStart migrations:
cd API
dotnet ef database update --project ../EFDataAccess --startup-project .This creates the blog database automatically.
Seeder will automatically start when you run API.
cd API
dotnet runIf the database is empty, initial data will be inserted.
cd Api
dotnet restore
dotnet runBackend URL: http://localhost:5000 Swagger: http://localhost:5000/swagger
In folder Client/ create .env
It must be next to vite.config.js.
π₯ Firebase
VITE_FIREBASE_API_KEY=AIzaSyBp3oi6SrSoQ8G3jrgzZKye4KSmrLCae7k
VITE_FIREBASE_AUTH_DOMAIN=blog-a6b98.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=blog-a6b98
VITE_FIREBASE_STORAGE_BUCKET=blog-a6b98.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=311198757906
VITE_FIREBASE_APP_ID=1:311198757906:web:3023a83a49eeb68fa494cb
VITE_FIREBASE_MEASUREMENT_ID=G-TJWVQ5W4KHπ API URL:
VITE_API_URL=http://localhost:5000/apicd Client
npm install
npm run devFrontend runs at: http://localhost:5173
This project is the most important to me because it demonstrates the complete set of knowledge I have acquired:
- Real-time communication (SignalR)
- Clean Architecture + CQRS
- JWT and Firebase combined authentication
- Database migration (SQL Server β PostgreSQL)
- Full-stack development (C#, EF Core, React, Redux)
- Deployment to Vercel / Railway