]> BookStack Code Mirror - bookstack/blob - readme.md
Updated attachments to not be saved with a complete extension
[bookstack] / readme.md
1 # BookStack
2
3 [![GitHub release](https://img.shields.io/github/release/BookStackApp/BookStack.svg)](https://github.com/BookStackApp/BookStack/releases/latest)
4 [![license](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/BookStackApp/BookStack/blob/master/LICENSE)
5 [![Crowdin](https://badges.crowdin.net/bookstack/localized.svg)](https://crowdin.com/project/bookstack)
6 [![Discord](https://img.shields.io/static/v1?label=chat&message=discord&color=738adb&logo=discord)](https://discord.gg/ztkBqR2)
7 [![Repo Stats](https://img.shields.io/static/v1?label=GitHub+project&message=stats&color=f27e3f)](https://gh-stats.bookstackapp.com/)
8 [![Build Status](https://github.com/BookStackApp/BookStack/workflows/phpunit/badge.svg)](https://github.com/BookStackApp/BookStack/actions)
9 [![StyleCI](https://github.styleci.io/repos/41589337/shield?style=flat)](https://github.styleci.io/repos/41589337)
10
11 A platform for storing and organising information and documentation. Details for BookStack can be found on the official website at https://www.bookstackapp.com/.
12
13 * [Installation Instructions](https://www.bookstackapp.com/docs/admin/installation)
14 * [Documentation](https://www.bookstackapp.com/docs)
15 * [Demo Instance](https://demo.bookstackapp.com)
16     * [Admin Login](https://demo.bookstackapp.com/login?email=admin@example.com&password=password)
17 * [Screenshots](https://www.bookstackapp.com/#screenshots) 
18 * [BookStack Blog](https://www.bookstackapp.com/blog)
19 * [Issue List](https://github.com/BookStackApp/BookStack/issues)
20 * [Discord Chat](https://discord.gg/ztkBqR2)
21
22 ## 📚 Project Definition
23
24 BookStack is an opinionated wiki system that provides a pleasant and simple out-of-the-box experience. New users to an instance should find the experience intuitive and only basic word-processing skills should be required to get involved in creating content on BookStack. The platform should provide advanced power features to those that desire it but they should not interfere with the core simple user experience.
25
26 BookStack is not designed as an extensible platform to be used for purposes that differ to the statement above.
27
28 In regard to development philosophy, BookStack has a relaxed, open & positive approach. At the end of the day this is free software developed and maintained by people donating their own free time.
29
30 ## 🌟 Project Sponsors
31
32 Shown below are our bronze, silver and gold project sponsors.
33 Big thanks to these companies for supporting the project.
34 Note: Listed services are not tested, vetted nor supported by the official BookStack project in any manner.
35 [View all sponsors](https://github.com/sponsors/ssddanbrown).
36
37 #### Bronze Sponsors
38
39 <table><tbody><tr>
40 <td><a href="https://www.diagrams.net/" target="_blank">
41     <img width="280" src="https://media.githubusercontent.com/media/BookStackApp/website/master/static/images/sponsors/diagramsnet.png" alt="Diagrams.net logo">
42 </a></td>
43
44 <td><a href="https://www.stellarhosted.com/bookstack/" target="_blank">
45     <img width="280" src="https://media.githubusercontent.com/media/BookStackApp/website/master/static/images/sponsors/stellarhosted.png" alt="Stellar Hosted Logo">
46 </a></td>
47 </tr></tbody></table>
48
49 ## 🛣️ Road Map
50
51 Below is a high-level road map view for BookStack to provide a sense of direction of where the project is going. This can change at any point and does not reflect many features and improvements that will also be included as part of the journey along this road map. For more granular detail of what will be included in upcoming releases you can review the project milestones as defined in the "Release Process" section below.
52
53 - **Platform REST API** *(Base Implemented, In review and roll-out)*
54     - *A REST API covering, at minimum, control of core content models (Books, Chapters, Pages) for automation and platform extension.*
55 - **Editor Alignment & Review**
56     - *Review the page editors with goal of achieving increased interoperability & feature parity while also considering collaborative editing potential.*
57 - **Permission System Review**
58     - *Improvement in how permissions are applied and a review of the efficiency of the permission & roles system.*
59 - **Installation & Deployment Process Revamp**
60     - *Creation of a streamlined & secure process for users to deploy & update BookStack with reduced development requirements (No git or composer requirement).*
61
62 ## 🚀 Release Versioning & Process
63
64 BookStack releases are each assigned a date-based version number in the format `v<year>.<month>[.<optional_patch_number>]`. For example:
65
66 - `v20.12` - New feature released launched during December 2020. 
67 - `v21.06.2` - Second patch release upon the June 2021 feature release.
68
69 Patch releases are generally fairly minor, primarily intended for fixes and therefore is fairly unlikely to cause breakages upon update.
70 Feature releases are generally larger, bringing new features in addition to fixes and enhancements. These releases have a greater chance of introducing breaking changes upon update, so it's worth checking for any notes in the [update guide](https://www.bookstackapp.com/docs/admin/updates/).
71
72 Each BookStack release will have a [milestone](https://github.com/BookStackApp/BookStack/milestones) created with issues & pull requests assigned to it to define what will be in that release. Milestones are built up then worked through until complete at which point, after some testing and documentation updates, the release will be deployed.
73
74 Feature releases, and some patch releases, will be accompanied by a post on the [BookStack blog](https://www.bookstackapp.com/blog/) which will provide additional detail on features, changes & updates otherwise the [GitHub release page](https://github.com/BookStackApp/BookStack/releases) will show a list of changes. You can sign up to be alerted to new BookStack blogs posts (once per week maximum) [at this link](https://updates.bookstackapp.com/signup/bookstack-news-and-updates).
75
76 ## 🛠️ Development & Testing
77
78 All development on BookStack is currently done on the master branch. When it's time for a release the master branch is merged into release with built & minified CSS & JS then tagged at its version. Here are the current development requirements:
79
80 * [Node.js](https://nodejs.org/en/) v14.0+
81
82 This project uses SASS for CSS development and this is built, along with the JavaScript, using a range of npm scripts. The below npm commands can be used to install the dependencies & run the build tasks:
83
84 ``` bash
85 # Install NPM Dependencies
86 npm install
87
88 # Build assets for development
89 npm run build
90
91 # Build and minify assets for production
92 npm run production
93
94 # Build for dev (With sourcemaps) and watch for changes
95 npm run dev
96 ```
97
98 BookStack has many integration tests that use Laravel's built-in testing capabilities which makes use of PHPUnit. There is a `mysql_testing` database defined within the app config which is what is used by PHPUnit. This database is set with the database name, user name and password all defined as `bookstack-test`. You will have to create that database and that set of credentials before testing.
99
100 The testing database will also need migrating and seeding beforehand. This can be done with the following commands:
101
102 ``` bash
103 php artisan migrate --database=mysql_testing
104 php artisan db:seed --class=DummyContentSeeder --database=mysql_testing
105 ```
106
107 Once done you can run `php vendor/bin/phpunit` in the application root directory to run all tests.
108
109 ### 📜 Code Standards
110
111 PHP code style is enforced automatically [using StyleCI](https://github.styleci.io/repos/41589337). 
112 If submitting a PR, any formatting changes to be made will be automatically fixed after merging.  
113
114 ### 🐋 Development using Docker
115
116 This repository ships with a Docker Compose configuration intended for development purposes. It'll build a PHP image with all needed extensions installed and start up a MySQL server and a Node image watching the UI assets.
117
118 To get started, make sure you meet the following requirements:
119
120 - Docker and Docker Compose are installed
121 - Your user is part of the `docker` group
122
123 If all the conditions are met, you can proceed with the following steps:
124
125 1. **Copy `.env.example` to `.env`**, change `APP_KEY` to a random 32 char string and set `APP_ENV` to `local`.
126 2. Make sure **port 8080 is unused** *or else* change `DEV_PORT` to a free port on your host.
127 3. **Run `chgrp -R docker storage`**. The development container will chown the `storage` directory to the `www-data` user inside the container so BookStack can write to it. You need to change the group to your host's `docker` group here to not lose access to the `storage` directory.
128 4. **Run `docker-compose up`** and wait until the image is built and all database migrations have been done.
129 5. You can now login with `admin@admin.com` and `password` as password on `localhost:8080` (or another port if specified).
130
131 If needed, You'll be able to run any artisan commands via docker-compose like so:
132
133 ```bash
134 docker-compose run app php artisan list
135 ```
136
137 The docker-compose setup runs an instance of [MailHog](https://github.com/mailhog/MailHog) and sets environment variables to redirect any BookStack-sent emails to MailHog. You can view this mail via the MailHog web interface on `localhost:8025`. You can change the port MailHog is accessible on by setting a `DEV_MAIL_PORT` environment variable.
138
139 #### Running tests
140
141 After starting the general development Docker, migrate & seed the testing database:
142
143  ```bash
144 # This only needs to be done once
145 docker-compose run app php artisan migrate --database=mysql_testing
146 docker-compose run app php artisan db:seed --class=DummyContentSeeder --database=mysql_testing
147 ```
148
149 Once the database has been migrated & seeded, you can run the tests like so:
150
151  ```bash
152 docker-compose run app php vendor/bin/phpunit
153 ```
154
155 ## 🌎 Translations
156
157 Translations for text within BookStack is managed through the [BookStack project on Crowdin](https://crowdin.com/project/bookstack). Some strings have colon-prefixed variables in such as `:userName`. Leave these values as they are as they will be replaced at run-time. Crowdin is the preferred way to provide translations, otherwise the raw translations files can be found within the `resources/lang` path.
158
159 If you'd like a new language to be added to Crowdin, for you to be able to provide translations for, please [open a new issue here](https://github.com/BookStackApp/BookStack/issues/new?template=language_request.md).
160
161 Please note, translations in BookStack are provided to the "Crowdin Global Translation Memory" which helps BookStack and other projects with finding translations. If you are not happy with contributing to this then providing translations to BookStack, even manually via GitHub, is not advised.
162
163 ## 🎁 Contributing, Issues & Pull Requests
164
165 Feel free to create issues to request new features or to report bugs & problems. Just please follow the template given when creating the issue.
166
167 Pull requests are welcome. Unless a small tweak or language update, It may be best to open the pull request early or create an issue for your intended change to discuss how it will fit in to the project and plan out the merge. Just because a feature request exists, or is tagged, does not mean that feature would be accepted into the core project.
168
169 Pull requests should be created from the `master` branch since they will be merged back into `master` once done. Please do not build from or request a merge into the `release` branch as this is only for publishing releases. If you are looking to alter CSS or JavaScript content please edit the source files found in `resources/`. Any CSS or JS files within `public` are built from these source files and therefore should not be edited directly.
170
171 The project's code of conduct [can be found here](https://github.com/BookStackApp/BookStack/blob/master/.github/CODE_OF_CONDUCT.md).
172
173 ## 🔒 Security
174
175 Security information for administering a BookStack instance can be found on the [documentation site here](https://www.bookstackapp.com/docs/admin/security/).
176
177 If you'd like to be notified of new potential security concerns you can [sign-up to the BookStack security mailing list](https://updates.bookstackapp.com/signup/bookstack-security-updates).
178
179 If you would like to report a security concern, details of doing so can [can be found here](https://github.com/BookStackApp/BookStack/blob/master/.github/SECURITY.md).
180
181 ## ♿ Accessibility
182
183 We want BookStack to remain accessible to as many people as possible. We aim for at least WCAG 2.1 Level A standards where possible although we do not strictly test this upon each release. If you come across any accessibility issues please feel free to open an issue.
184
185 ## 🖥️ Website, Docs & Blog
186
187 The website which contains the project docs & Blog can be found in the [BookStackApp/website](https://github.com/BookStackApp/website) repo.
188
189 ## ⚖️ License
190
191 The BookStack source is provided under the MIT License. The libraries used by, and included with, BookStack are provided under their own licenses.
192
193 ## 👪 Attribution
194
195 The great people that have worked to build and improve BookStack can [be seen here](https://github.com/BookStackApp/BookStack/graphs/contributors).
196
197 The wonderful people that have provided translations, either through GitHub or via Crowdin [can be seen here](https://github.com/BookStackApp/BookStack/blob/master/.github/translators.txt).
198
199 These are the great open-source projects used to help build BookStack:
200
201 * [Laravel](http://laravel.com/)
202 * [TinyMCE](https://www.tinymce.com/)
203 * [CodeMirror](https://codemirror.net)
204 * [Sortable](https://github.com/SortableJS/Sortable)
205 * [Google Material Icons](https://material.io/icons/)
206 * [Dropzone.js](http://www.dropzonejs.com/)
207 * [clipboard.js](https://clipboardjs.com/)
208 * [markdown-it](https://github.com/markdown-it/markdown-it) and [markdown-it-task-lists](https://github.com/revin/markdown-it-task-lists)
209 * [BarryVD](https://github.com/barryvdh)
210     * [Debugbar](https://github.com/barryvdh/laravel-debugbar)
211     * [Dompdf](https://github.com/barryvdh/laravel-dompdf)
212     * [Snappy (WKHTML2PDF)](https://github.com/barryvdh/laravel-snappy)
213     * [Laravel IDE helper](https://github.com/barryvdh/laravel-ide-helper)
214 * [WKHTMLtoPDF](http://wkhtmltopdf.org/index.html)
215 * [diagrams.net](https://github.com/jgraph/drawio)
216 * [OneLogin's SAML PHP Toolkit](https://github.com/onelogin/php-saml)
217 * [League/CommonMark](https://commonmark.thephpleague.com/)
218 * [League/Flysystem](https://flysystem.thephpleague.com)
219 * [StyleCI](https://styleci.io/)
220 * [pragmarx/google2fa](https://github.com/antonioribeiro/google2fa)
221 * [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode)
222 * [phpseclib](https://github.com/phpseclib/phpseclib)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.