|
| 1 | +# BERNHIST |
| 2 | + |
| 3 | +A re-programming and enhancement of BERNHIST (A historical-geographic information system for the swiss canton of Bern) to ensure further compatibility with modern technologies. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## About the original project (1994 - 2006) |
| 10 | + |
| 11 | +BERNHIST was established by the department of economic, social and environmental History (Abteilung für Wirtschafts-, Sozial- und Umweltgeschichte, WSU) at the historical institute of the university of bern with the collaboration of Daniel Brändli, **Urs Dietrich**, **Peter Häberli**, Klaus Imfeld, **Serge Meyer**, Reto Müller, Stefan Ruetsch, Niklaus Schranz, **Hannes Schüle** und Erich Siffert. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +The files of the original project can be found [here](https://github.com/UB-Bern/bernhist/releases/tag/v1.0.0). |
| 16 | + |
| 17 | +## What is new? |
| 18 | + |
| 19 | +The re-programming was made with the PHP Framework [Symfony](<https://symfony.com>), the front-end component library [Bootstrap](<https://getbootstrap.com>) and the javascript charting library [Chartist](<https://gionkunz.github.io/chartist-js/>). |
| 20 | +To enable automated queries an [OAI](<https://github.com/OAI/OpenAPI-Specification>) compatible API was created. |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +* [PHP](<https://php.net/>) 7.1.3 or newer (See [here](<https://symfony.com/doc/4.2/reference/requirements.html>) for more information about the needed php extensions) |
| 25 | +* A database. The symfony framework is compatible with many database types. The project was tested with [MySQL](<https://www.mysql.com/>) server version 5.7.26 |
| 26 | +* [composer]((<https://getcomposer.org/>)) and [yarn](<https://yarnpkg.com/>) |
| 27 | +* [Apache](<https://httpd.apache.org/>) or [NGINX](<https://www.nginx.com/>) webserver (See [here](<https://symfony.com/doc/4.2/setup/web_server_configuration.html>) for more information about the configuration). |
| 28 | + During development Symfony's built-in webserver can be used. |
| 29 | + |
| 30 | +## Installation |
| 31 | + |
| 32 | +Clone the repository: |
| 33 | + |
| 34 | +```bash |
| 35 | +git clone https://github.com/UB-Bern/bernhist.git |
| 36 | +``` |
| 37 | + |
| 38 | +Change to the created directory and run: |
| 39 | + |
| 40 | +``` |
| 41 | +composer install |
| 42 | +``` |
| 43 | + |
| 44 | +Create a local copy of the `.env` file: |
| 45 | + |
| 46 | +``` |
| 47 | +cp .env .env.local |
| 48 | +``` |
| 49 | + |
| 50 | +Open the created `.env.local` file and set the `DATABASE_URL` to the desired value (see [here](<https://www.doctrine-project.org/projects/doctrine-dbal/en/2.9/reference/configuration.html#connecting-using-a-url>) for examples) |
| 51 | + |
| 52 | +If the database does not already exist execute the following command: |
| 53 | + |
| 54 | +``` |
| 55 | +bin/console doctrine:database:create |
| 56 | +``` |
| 57 | + |
| 58 | +Create the database schema: |
| 59 | + |
| 60 | +``` |
| 61 | +bin/console doctrine:schema:create |
| 62 | +``` |
| 63 | + |
| 64 | +Extract `data.tar.gz` in the project root and import the SQL data dump: |
| 65 | + |
| 66 | +``` |
| 67 | +mysql -u [username] -p [database] < [path to data dir]/bernhist_data.sql |
| 68 | +``` |
| 69 | + |
| 70 | +Replace [username] with your database, [database] with the name of your database and [path to data dir] with the relative or absolute path to the extracted mysql dump. |
| 71 | + |
| 72 | +Install the frontend dependencies with: |
| 73 | + |
| 74 | +``` |
| 75 | +yarn install |
| 76 | +``` |
| 77 | + |
| 78 | +**Development** |
| 79 | + |
| 80 | +Build the assets with |
| 81 | + |
| 82 | +``` |
| 83 | +yarn encore dev |
| 84 | +``` |
| 85 | + |
| 86 | +Run the Symfony Server with |
| 87 | + |
| 88 | +``` |
| 89 | +bin/console server:start |
| 90 | +``` |
| 91 | + |
| 92 | +**Production** |
| 93 | + |
| 94 | +Build the assets with |
| 95 | + |
| 96 | +``` |
| 97 | +yarn encore prod |
| 98 | +``` |
| 99 | + |
| 100 | +Open the `.env.local` file and set `APP_ENV` to `prod`. |
| 101 | + |
| 102 | +Ensure that the web root configured in the webserver points to the `public` folder. |
| 103 | + |
| 104 | +## Contributors |
| 105 | + |
| 106 | +### Original project |
| 107 | + |
| 108 | +* Prof. em. Dr. Christian Pfister |
| 109 | +* The persons named under "About the original project" |
| 110 | +* Erziehungsdirektion des Kantons Bern (1984-1986) |
| 111 | +* Schweizerischen Nationalfonds zur Förderung der Forschung (1986-1990) |
| 112 | +* SEVA Lotteriefonds (1991-1993) |
| 113 | +* Mobiliar Versicherung und Vorsorge (1992) |
| 114 | +* Stiftung zur Förderung der wissenschaftlichen Forschung an der Universität Bern (Hochschulstiftung) (1996-97) |
| 115 | + |
| 116 | +### Current project |
| 117 | + |
| 118 | +* [Mathias Stocker](mailto:mathias.stocker@ub.unibe.ch), [Universität Bern](https://www.unibe.ch), [Universitätsbibliothek Bern](https://ub.unibe.ch) |
| 119 | + |
| 120 | +## Versioning |
| 121 | + |
| 122 | +[SemVer](http://semver.org/) is used for versioning. For the versions available, see the [tags on this repository](https://github.com/UB-BERN/bernhist/tags). |
| 123 | + |
| 124 | +## License |
| 125 | + |
| 126 | +This project (Version 2.0.0 and newer) is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details. |
| 127 | + |
0 commit comments