A modern wiki/knowledge base application built with Vaadin Flow and Spring Boot. This application provides a clean, markdown-based documentation system with role-based access control.
- Markdown Support: Write and preview articles using Markdown syntax with live preview
- Role-Based Access: Admin users can create, edit, and delete articles; regular users have read-only access
- SEO-Friendly URLs: Article URLs use human-readable slugs instead of IDs
- Dark Mode UI: Modern dark theme with optimized readability for wiki content
- Live Preview: Toggle between edit and preview mode while writing
- Article Management: Full CRUD operations for managing documentation
- Default Welcome Page: New users are greeted with a comprehensive Markdown guide
Open the project in an IDE. You can download the IntelliJ community edition if you do not have a suitable IDE already.
Once opened in the IDE, locate the Application class and run the main method using "Debug".
For more information on installing in various IDEs, see how to import Vaadin projects to different IDEs.
If you install the Vaadin plugin for IntelliJ, you should instead launch the Application class using "Debug using HotswapAgent" to see updates in the Java code immediately reflected in the browser.
The project is a standard Maven project. To create a production build, call
./mvnw clean package -Pproduction
If you have Maven globally installed, you can replace ./mvnw with mvn.
This will build a JAR file with all the dependencies and front-end resources,ready to be run. The file can be found in the target folder after the build completes.
You then launch the application using
java -jar target/knowledge-base-1.0-SNAPSHOT.jar
- Vaadin Flow 25.0.7: Modern Java web framework with Material Design components
- Spring Boot 4.0.3: Application framework with dependency injection
- Spring Data JPA: Database persistence layer
- Spring Security: Role-based authentication and authorization
- H2 Database: In-memory database (easily replaceable with production database)
- Java 21: Modern Java features and performance
io.avec.knowledgebase.data.Article: Entity representing wiki articles with slug generationio.avec.knowledgebase.service.ArticleService: Business logic for article managementio.avec.knowledgebase.view.KnowledgeBaseView: Main view with article list and Markdown renderingio.avec.security: Spring Security configuration with role-based access
src/main/frontend/themes/knowledge-base/views/knowledge-base-view.css: Main styling for wiki content and UI componentssrc/main/resources/knowledge/welcome-to-knowledge.md: Default welcome content with Markdown guide
The application comes with two default users:
- Admin:
admin@avec.io/admin(can create, edit, and delete articles) - User:
user@avec.io/user(read-only access)
- Log in as an admin user
- Click the "Create" button in the toolbar
- Enter a title and content using Markdown syntax
- Click "Preview" to see how it will look
- Click "Save" to publish the article
- Navigate to an article
- Click the "Edit" button (admin only)
- Modify the content
- Use "Preview" to check your changes
- Click "Save" to update or "Cancel" to discard changes
This application is designed as a reusable module that can be integrated into larger Vaadin applications. The KnowledgeBase module is self-contained and can be easily adapted to different use cases.
This project is a pilot/demonstration application.