How bookstackapp/bookstack works
BookStack is a documentation platform for organizing books, chapters, and pages. A typical workflow is: a user authenticates, requests a page, the page controller loads and renders entity content, and the browser receives the result. Content management is governed by permissions and can include comments, activity tracking, uploads, search, exports, API access, and theming. The graph preserves these major capabilities; several subsystem relationships are inferred only from the tree because their implementations were not sampled.
Main entry points: PageController.php Page Controller · Entity.php Entity Models · LoginController.php Login Controller · SearchController.php Search Controller
Components 21
Access Control
- Login Controller
app/Access/Controllers/LoginController.php - Login Service
app/Access/LoginService.php - MFA Controllers
app/Access/Controllers/MfaController.php - Social Authentication
app/Access/SocialAuthService.php
Documentation Content
- Page Controller
app/Entities/Controllers/PageController.php - Entity Models
app/Entities/Models/Entity.php - Page Content
app/Entities/Tools/PageContent.php - Permission Controller
app/Permissions/PermissionsController.php
Platform Services
- Application Database
app/Config/database.php - Search Controller
app/Search/SearchController.php - Search Runner
app/Search/SearchRunner.php - Search Index
app/Search/SearchIndex.php - Activity Logging
app/Activity/Tools/ActivityLogger.php - Image Storage
app/Uploads/ImageStorage.php - File Storage
app/Uploads/ImageStorageDisk.php
Integrations
- API Tokens
app/Api/UserApiTokenController.php - Import Export
app/Exports/ExportFormatter.php - Theme Modules
app/Theming/ThemeModuleManager.php
Other components
- User
- Identity Providers
- Web Response
app/Http/Controller.php
Connections 21
- User → Login Controller: submits login
- Login Controller → Login Service: authenticates
- Login Controller → MFA Controllers: dispatches MFA
- User → Social Authentication: starts sign-in
- Social Authentication → Identity Providers: uses provider
- User → Page Controller: requests page
- Page Controller → Entity Models: loads entity
- Page Controller → Page Content: renders content
- Page Controller → Web Response: returns view
- Page Controller → Activity Logging: records views
- Permission Controller → Entity Models: updates access
- Entity Models → Application Database: reads writes
- User → Search Controller: searches content
- Search Controller → Search Runner: runs search
- Search Runner → Search Index: queries index
- Search Controller → Web Response: returns results
- Page Controller → Image Storage: handles images
- Image Storage → File Storage: stores files
- API Tokens → Application Database: stores tokens
- Import Export → Entity Models: exports entities
- Theme Modules → Web Response: customizes views