A full-featured, enterprise-grade knowledge management platform built with ASP.NET Core 10.0 and Clean Architecture. Designed for organizations to centralize documents, blog posts, announcements, and leverage AI-powered search across their knowledge base.
- Document Management - Create, edit, version, and organize documents with categories and tags
- Blog Posts - Rich content publishing with likes, comments, and content moderation
- Announcements - Organization-wide announcements with admin controls
- Full-Text Search - Search across all content types with filtering
- RAG AI Assistant - Ollama-powered chat assistant that answers questions using your knowledge base
- Semantic Search - AI-enhanced document retrieval and recommendations
- Real-Time Notifications - SignalR-powered instant notifications
- Comments & Likes - Engage with content through comments and reactions
- Content Reporting - Flag inappropriate content for admin review
- Role-Based Access Control - Admin, User roles with granular permissions
- Content Review Workflow - Approve/reject content before publication
- User Management - Manage users, roles, and departments
- Audit Logging - Track all significant actions for compliance
- Background Jobs - Hangfire-powered scheduled tasks and maintenance
- Custom Design System - Consistent, professional UI with
kb-*CSS class system - Sliding Auth Page - Login/Register with animated sliding cover panel
- Owl Mascot - Fun password field mascot that covers eyes during typing
- Responsive - Fully responsive across desktop, tablet, and mobile
- SVG Icons - Lightweight inline SVG icons throughout
CorporateKnowledgeBase/
|-- CorporateKnowledgeBase.Domain/ # Entities, Enums, Interfaces
|-- CorporateKnowledgeBase.Application/ # CQRS Commands/Queries, DTOs, MediatR
|-- CorporateKnowledgeBase.Infrastructure/ # EF Core, Identity, Services, Ollama
|-- CorporateKnowledgeBase.Web/ # ASP.NET Core MVC, Views, Controllers
Clean Architecture with 4 layers:
- Domain - Core business entities and interfaces (zero dependencies)
- Application - Business logic with MediatR CQRS pattern
- Infrastructure - Data access (EF Core + SQL Server), Identity, external services
- Web - Presentation layer with Razor Views and Controllers
| Category | Technology |
|---|---|
| Framework | ASP.NET Core 10.0 MVC |
| ORM | Entity Framework Core 10.0 |
| Database | SQL Server |
| Authentication | ASP.NET Core Identity |
| Mediator | MediatR (CQRS) |
| Real-Time | SignalR |
| Background Jobs | Hangfire |
| AI/LLM | Ollama + Llama 3.2 (RAG) |
| PDF Generation | QuestPDF |
| CSS Framework | Bootstrap 5 + Custom Design System |
| Tag Input | Tagify |
- .NET 10.0 SDK
- SQL Server (LocalDB or full)
- Ollama (optional, for AI features)
-
Clone the repository
git clone https://github.com/umitkrkmz/CorporateKnowledgeBase.git cd CorporateKnowledgeBase -
Configure the database
Update
appsettings.jsonin the Web project with your connection string:{ "ConnectionStrings": { "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=CorporateKnowledgeBase;Trusted_Connection=True;" } } -
Apply migrations
cd CorporateKnowledgeBase.Web dotnet ef database update -
Run the application
dotnet run
-
Open in browser
Navigate to
https://localhost:5001(or the port shown in console)
On first run, the system automatically creates:
- Email:
admin@corp.com| Password:Admin123!| Role: Admin
To load demo data (users, documents, blog posts, etc.), go to Admin → Settings → Demo Verileri Yükle.
- Install Ollama
- Pull the required models:
ollama pull llama3.2 # Chat model (3B, recommended) ollama pull nomic-embed-text # Embedding model (required for RAG)
- Ensure Ollama is running on
http://localhost:11434 - The AI Assistant will automatically connect
The default model is Llama 3.2 3B — a good balance of quality and performance. You can switch models in Program.cs:
| Model | Size | VRAM | Best For |
|---|---|---|---|
llama3.2 (default) |
~2 GB | 3-4 GB | General use, good Turkish support |
llama3.2:1b |
~700 MB | 1-2 GB | Raspberry Pi, low-resource devices |
phi3 |
~2.3 GB | 3-4 GB | Code-heavy knowledge bases |
mistral |
~4.1 GB | 5-6 GB | Higher quality responses |
gemma2 |
~5 GB | 6-8 GB | Best multilingual support |
To change the model, update Program.cs:
builder.Services.AddChatClient(new OllamaApiClient(ollamaUri, "your-model-here"));Raspberry Pi / Low-resource: Use
llama3.2:1bfor 5-10 concurrent users. For 10-200 users, a server with at least 16 GB RAM and a dedicated GPU (e.g., RTX 3060) is recommended withllama3.2ormistral.
| View | Description |
|---|---|
Account/Login |
Unified login/register with sliding cover + owl mascot |
Home/Index |
Guest landing page + authenticated dashboard |
Documents/* |
Document CRUD with versioning |
BlogPosts/* |
Blog post CRUD with comments & likes |
Announcements/* |
Announcement management |
AI/Index |
RAG-powered AI chat assistant |
Profile/* |
User profile, edit, notification settings |
Search/Index |
Full-text search across content |
Faq/* |
FAQ management |
Notifications/Index |
User notification center |
Admin*/* |
Admin panels (Categories, Tags, Users, Departments, Reports) |
ContentReview/Index |
Content moderation queue |
AuditLogs/Index |
System audit trail |
All views use a consistent kb-* CSS class system defined in wwwroot/css/site.css:
- Navbar:
kb-navbar,kb-search-form,brand-icon,brand-text,brand-highlight - Layout:
kb-page-header,kb-panel,kb-card,kb-card-body - Tables:
kb-tablewith styledthead/tbody - Badges:
kb-badge-primary,kb-badge-success,kb-badge-warning,kb-badge-danger,kb-badge-tag - Buttons:
kb-btn-primary,kb-btn-outline,kb-btn-success,kb-btn-danger,kb-btn-sm - Forms:
kb-form-card,kb-form-group,kb-form-label,kb-form-control - Alerts:
kb-alert-success,kb-alert-warning,kb-alert-danger,kb-alert-info - Details:
kb-detail-header,kb-detail-meta,kb-detail-badges,kb-detail-actions - Profile:
kb-profile-card,kb-profile-header,kb-profile-avatar - Chat:
kb-chat-container,kb-chat-messages,kb-chat-bubble,kb-chat-user,kb-chat-bot,kb-chat-avatar - AI Content:
kb-ai-content,kb-ai-source-badgefor code blocks and source citations - Comments:
kb-comment,kb-comment-avatar,kb-comment-body,kb-like-btn - Landing:
kb-hero,kb-hero-title,kb-feature-card,kb-stats,kb-stat-card - Admin:
kb-admin-page,kb-table-toolbar,kb-filter-select,kb-sort-link - Pagination:
kb-paginationwith Bootstrap-compatible styling - Empty State:
kb-empty-statefor no-data views - Content:
content-bodyfor rendered markdown with code highlighting
| Version | Architecture | Status |
|---|---|---|
| v1.0 (current) | Clean Architecture + MediatR CQRS + .NET 10.0 | Active |
| v1.0 - v3.0 (legacy) | Monolithic MVC + ASP.NET Core 9.0 | Archived |
The legacy version (v1.0 - v3.0) was a monolithic MVC application that evolved through three major releases, culminating in RAG AI integration, Hangfire background jobs, and SignalR real-time features. This current repository is a complete rewrite from the ground up with Clean Architecture, Vertical Slice, and MediatR (CQRS) patterns.
Legacy repository: CorporateKnowledgeBase-legacy
- Complete rewrite from monolithic MVC to 4-layer Clean Architecture
- Domain Layer - Pure entities with zero dependencies
- Application Layer - MediatR CQRS (Commands/Queries) + Pipeline Behaviors
- Infrastructure Layer - EF Core, Identity, Ollama AI services
- Web Layer - ASP.NET Core MVC with Razor Views
- Custom
kb-*CSS framework (~3000 lines) replacing ad-hoc Bootstrap usage - Sliding auth page with animated cover panel + owl mascot
- Modern logo with hexagon knowledge network icon
- Consistent design tokens via CSS variables
- Upgraded from Phi-3 to Llama 3.2 (better Turkish support)
- QuestPDF replaced PuppeteerSharp for lighter PDF generation
- Session-based chat history with archiving
- .NET 10.0 (upgraded from 9.0)
- Audit logging via MediatR pipeline behavior
- Department-based content filtering for privacy
- User approval workflow for new registrations
This project is licensed under the MIT License - see the LICENSE file for details.