{"id":13557029,"url":"https://github.com/system76/beansbooks","last_synced_at":"2025-08-07T09:08:53.373Z","repository":{"id":10293639,"uuid":"12413662","full_name":"system76/beansbooks","owner":"system76","description":"A revolutionary cloud accounting platform designed for small and medium businesses.","archived":false,"fork":false,"pushed_at":"2021-04-07T16:06:28.000Z","size":6400,"stargazers_count":130,"open_issues_count":52,"forks_count":36,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-04T07:35:20.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/system76.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-27T18:09:06.000Z","updated_at":"2024-10-22T11:39:53.000Z","dependencies_parsed_at":"2022-09-22T18:44:14.125Z","dependency_job_id":null,"html_url":"https://github.com/system76/beansbooks","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fbeansbooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fbeansbooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fbeansbooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fbeansbooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/system76","download_url":"https://codeload.github.com/system76/beansbooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223342871,"owners_count":17129937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:04:08.117Z","updated_at":"2024-11-06T12:44:58.415Z","avatar_url":"https://github.com/system76.png","language":"PHP","funding_links":[],"categories":["PHP","others"],"sub_categories":[],"readme":"# BeansBooks\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2 align=\"center\"\u003eNotice\u003c/h2\u003e\n\t\n  \u003cp align=\"center\"\u003e\n    Beansbooks is available \"as is\" and will no longer be maintained. We would like to thank everyone who has used and contributed to Beansbooks.\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Getting Started\n\nThis guide will walk you through getting a local instance of BeansBooks running. \nThis is useful for development and testing, but should not be followed strictly \nfor running a live environment.  In order to get started, you'll need the \nfollowing:  \n\n  *  Apache 2\n  *  PHP 5 \u003e= 5.3. PHP 7 will **not** work\n  *  MySQL 5+\n  *  Git Client\n\nOn Ubuntu, you can run the following to get up to speed:  \n\n    sudo apt-get update  \n    sudo apt-get install apache2 php5 libapache2-mod-php5 php5-cli php5-mysql php5-mcrypt php5-gd mysql-server mysql-client git  \n  \nOnce you've installed all of the prerequesites, create a directory where you \nwant the source to reside, then download the code from git into that directory. \nThe following will create a directory called 'source' within your home directory \nand install BeansBooks there.\n\n    cd ~\n    mkdir source\n    cd source\n    git clone --recursive https://github.com/system76/beansbooks.git\n    cd beansbooks\n\nCopy the example.htaccess file to .htaccess within your working directory\n\n    cp example.htaccess .htaccess\n\nIf you are not planning on hosting with SSL, then we need to comment out two\nlines in the .htaccess file.  Open the file for editing:\n\n    nano .htaccess\n\nLook for the following two lines:\n\n    RewriteCond %{HTTPS} !=on\n    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n\nAdd a # character before them:\n\n    #RewriteCond %{HTTPS} !=on\n    #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n\nAdditionally, you'll need to update the permissions on two directories before proceeding:\n\n    chmod 770 -R application/logs\n    chmod 770 -R application/cache\n\nAnd create a configuration file:\n\n    touch application/classes/beans/config.php\n    chmod 660 application/classes/beans/config.php\n\nFinally, your web user ( presumably, www-data ) will require access to the owner of\nyour application directory.  Presuming you've setup BeansBooks to run locally, it's easiest \nto add www-data to your user group.\n\n    sudo usermod -a -G `whoami` www-data\n\nIf you'd like a more secure solution, you should create a user specifically \nfor BeansBooks and install everything within a sub-folder of the home \ndirectory for that user.  In that case, you could want to replace \\`whoami\\` \nin the above solution with the name of the user you created.\n\nYou should now have everything you need to run BeansBooks locally.  Next, we'll \nconfigure and setup several dependencies to enable your application to run.\n\n## Configuring Packages\n\nBefore configuring BeansBooks itself, we need to setup the environment to run \nit. We're going to quickly setup a local MySQL database, Apache Virtual Host, \nand create the correct permissions on our code.\n\n### MySQL\n\nWhen setting up the packages in \"Getting Started\" above, you should have been \nprompted to create a root password for MySQL.  You'll need this for the next \nset of steps.  Run the following to connect to MySQL - you should provide the \npassword that you created earlier when prompted.\n\n    mysql -h localhost -u root -p\n\nNext - enter the following lines one by one.  Please note - this sets the \npassword for your database user to \"beansdb\" and should probably be changed. \nGo ahead and replace \"beansdb\" with a strong password.\n\n    CREATE USER 'beans'@'localhost' IDENTIFIED BY  'beansdb';  \n    GRANT USAGE ON * . * TO  'beans'@'localhost' IDENTIFIED BY  'beansdb' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;  \n    CREATE DATABASE IF NOT EXISTS  `beans` CHARACTER SET utf8 COLLATE utf8_general_ci;\n    GRANT ALL PRIVILEGES ON `beans`.* TO 'beans'@'localhost';\n    exit  \n\nGreat!  Now you've setup your database and user.  Please make a note of the \nusername ( beans ) and password you set above.  \n\n### Apache\n\nFirst things first, enable Mod_Rewrite:\n\n    sudo a2enmod rewrite\n\nNow we're going to setup Apache to serve BeansBooks locally.  In order to \ndetermine where are going to set our document root, we need to run the following \nin a terminal:  \n\n    pwd\n\nWhatever the output of that is - make a note of it.  It will be the \"document \nroot\" for your virtual host.\n\nWe're going to setup our instance of BeansBooks to be found at http://beansbooks/ - \nthis is convenient as it will neither interfere with an actual domain, and \ncan be configured fairly easily.  Go ahead and run the following command:  \n\n    sudo nano /etc/apache2/sites-available/beansbooks.conf\n\nThat will open a text editor for a new virtual host configuration - go ahead and \ncopy and paste the following into the file.  Make sure to replace PWDHERE with \nthe result of running \"pwd\" above - it will probably looking something like \n/home/yourusername/source/beansbooks and should be inserted without any trailing / .  \n\n**TIP: To paste into the editor that you've opened, use Control + Shift + \"v\"**\n\n    \u003cVirtualHost *:80\u003e\n        ServerName beansbooks \n        ServerAlias beansbooks \n\n        DocumentRoot PWDHERE            \n        \u003cDirectory PWDHERE\u003e\n            Options FollowSymLinks\n            AllowOverride All\n            Order allow,deny\n            allow from all\n        \u003c/Directory\u003e\n    \u003c/VirtualHost\u003e\n\n**If you're using Apache 2.4 or newer you should use the following instead.**\n\n    \u003cVirtualHost *:80\u003e\n        ServerName beansbooks \n        ServerAlias beansbooks \n\n        DocumentRoot PWDHERE            \n        \u003cDirectory PWDHERE\u003e\n            Options FollowSymLinks\n            AllowOverride All\n            Require all granted\n        \u003c/Directory\u003e\n    \u003c/VirtualHost\u003e\n\nAfter pasting in and editing the above code, hit Control + \"x\" to exit. If it prompts you \nto save your changes, hit \"y\".  Then run the following to disable the default virtual host, \nenable the beansbooks.conf virtual host and reload the Apache configuration.  \n\n    sudo a2dissite 000-default\n    sudo a2ensite beansbooks.conf\n    sudo service apache2 reload\n  \nThen we need to add an entry to your hosts file to be able to load the local \ninstance of beans.  \n\n\tsudo sh -c \"echo '127.0.0.1 beansbooks' \u003e\u003e /etc/hosts\"\n  \n## Installation\n\nAt this point you should be able to navigate to http://beansbooks/ to finish the installation\nprocess.  If you would prefer to run the installation and initial database setup from \nthe command line please do as follows:\n\n## Manually Configure BeansBooks  \n\nCopy example.config.php to config.php in application/classes/beans/ and fill in the appropriate information.\n\n    cd application/classes/beans/\n    cp example.config.php config.php\n    chmod 660 config.php\n    nano config.php\n\nIt's important that your config file is not world-readable.  The keys that encrypt your data, \nin addition to your database and email credentials, should be secure.\n\nThere are quite a few values that should be changed in the file, however it's mostly\nself explanatory.  For starters, every place that you see \"INSERT_STRONG_KEY\" should have\na unique, long ( at least 128 characters ), string of random characters.  You can generate\nrandom data from here: https://www.grc.com/passwords.htm\n\nAlso note that you should enter the MySQL username and password you setup above under\nthe \"database\" section.\n\nLastly, email support is optional - though it enables quite a few useful features when \ncommunication with customers and vendors.  If you have an SMTP email provider, you should\nenter the correct information in the \"email\" section.\n\nOnce you've saved the config.php file, it's time to manually run the installation process.\n\n    cd ~/source/beansbooks\n    php index.php --uri=/install/manual --name=\"Your Name\" --password=\"password\" --email=\"you@email.address\" --accounts=\"full\"\n\n## SSL Support\n\nIf you would like to serve your instance of BeansBooks over SSL, you just need to add SSL\nsupport to your web server:\n\n    sudo a2enmod ssl\n\nThen go ahead and edit your virtual host to support SSL connections:\n\n    sudo nano /etc/apache2/sites-available/beansbooks.conf\n\n    \u003cIfModule mod_ssl.c\u003e\n        \u003cVirtualHost *:443\u003e\n            ServerName beansbooks\n            ServerAlias beansbooks\n            \n            DocumentRoot PWDHERE            \n            \u003cDirectory PWDHERE\u003e\n                Options FollowSymLinks\n                AllowOverride All\n                Order allow,deny\n                allow from all\n            \u003c/Directory\u003e\n\n            SSLEngine on\n\n            SSLCertificateFile /path/to/ssl/mydomain.com.crt\n            SSLCertificateKeyFile /path/to/ssl/mydomain.com.unlocked.key\n\n            \u003cFilesMatch \"\\.(cgi|shtml|phtml|php)$\"\u003e\n                SSLOptions +StdEnvVars\n            \u003c/FilesMatch\u003e\n\n            BrowserMatch \"MSIE [2-6]\" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0\n            BrowserMatch \"MSIE [17-9]\" ssl-unclean-shutdown\n        \u003c/VirtualHost\u003e\n    \u003c/IfModule\u003e\n\n**Note - if you adjusted your VirtualHost above for Apache 2.4, you should do so here as well.**\n\nWhen you're done making changes, make sure to restart Apache.\n\n## Troubleshooting\n\n### MCrypt\n\nIf PHP / Apache complain that you're missing mcrypt support, or that an algorithm isn't available - you likely need to manually enable the mcrypt module:\n\n```\nsudo php5enmod mcrypt\n```\n\nMake sure to restart Apache afterwards and it should be resolved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystem76%2Fbeansbooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystem76%2Fbeansbooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystem76%2Fbeansbooks/lists"}