FoodParent is a web-based application as a part of Concrete Jungle’s FoodParent project. The project helps to create virtual connection between trees and citizens who can provide status of fruits in Atlanta. The application provides a tool for creating a connection between trees and people by posting status notes via smart devices and tracking history of trees over years to help Concrete Jungle decide the proper time for foraging fruits and distribute to the needy.
*{} is variable that can be different based on your environment.
- FoodParent package file from https://github.com/PublicDesignWorkshop/FoodParent2.0.git.
- node.js to use npm command in OSX and Windows.
- Apache server / PHP
- MySQL ^5.0
- Open
settings.jsonfile under {app-root-directory}/src/constraint directory. - Change
uBaseNameanduBaseNameForWebPackvalues based on the relative location of {app-root-directory} from {apach-htdocs} directory. If {app-root-directory} is the {apach-htdocs}, put"uBaseName": ""and"uBaseNameForWebPack": "/". If the {app-root-directory} is located under {apach-htdocs} directory, such as {apach-htdocs}/{app-root-directory}, put"uBaseName": "/{app-root-directory}"and"uBaseNameForWebPack": "/{app-root-directory}/". - Open
index.htmlfile under {app-root-directory}. - Find all
/FoodParent2.0change into relative location of {app-root-directory}. If the {app-root-directory} is the {apach-htdocs}, remove all/FoodParent2.0.
- Open terminal or command prompt and move to the app directory.
- Run
npm installto install all dependency libaries. - Run
npm run dtsto generate*.css.d.tsfiles. - Run
npm run devto generate compiledfoodparent.jsandfoodparent.map.jsfile under {app-root-directory}/dist directory.
*If you change the directory, you need to cancel the build and re-run npm run dev or npm run build.
- Open
php.iniconfiguration file under {apach} directory. If you are using external hosting service, ask hosting manager. - Find
upload_max_filesizeand set the value higher than 6M. This value defines the maximum size of file, and some of image files generated from smart devices exceeds 4M.
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize=6M
- Create a MySQL database, and admin user account and password for the database.
- Open
tree_parent.sqlunder {app-root-directory}/serverconfig and copy all and paste in SQL query/queries command prompt to create tables automatically. - Copy
database.phpanddbpass.phpfiles from {app-root-directory}/serverconfig to {app-root-directory}/server directory. - Open
database.phpfile and put your database information.
class database extends dbpass {
public $host = "{database host address}"; //ex> localhost
public $username = "{database account name}"; //ex> root (not recommended)
public $port = {database port number}; //ex> 3306.
public $db_name = "{database name}"; // ex> foodparent
}- Open
dbpass.phpfile and put your database account password.
class dbpass {
public $password = "";
}*Don't try to upload all files in {app-root-directory}. It have a lot of dependency libraries which don't need to run the application. *Below are the list of directories and files require to run the applicaiton.
- content/
- dist/
- favicons/
- server/
- static/
- index.html
- .htaccess