Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #4 from dmd-web-and-mobile/develop
Early Preview
  • Loading branch information
bak11004 committed Nov 22, 2016
2 parents 393e009 + 8eba580 commit f8d5176
Show file tree
Hide file tree
Showing 187 changed files with 49,986 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .editorconfig
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.php]
indent_style = tab
indent_size = 2
20 changes: 20 additions & 0 deletions .gitignore
@@ -0,0 +1,20 @@
api/vendor/

# OS generated files
.DS_Store
.DS_Store?
._*
Thumbs.db

# Logs
*.log

# Dependency directories
node_modules
bower_components

# Build Systems
.sass-cache
*.css.map
build/
dist/
37 changes: 36 additions & 1 deletion README.md
@@ -1,6 +1,41 @@
# Foodbank

Rules Engine and API for Feeding America / Foodbank Project.
Rules Engine and API for Feeding America / Foodbank Project. PHP and MySQL.

## API

Everything is located in the `/api` directory. You will need [composer](https://getcomposer.org/) installed.

The entire API runs from `index.php`. This way everything routes to http://foodbankurl.com/api/.

Propel was used to generate the ORM. The ORM lives under:

```
/api
/generated-classes # All of the main ORM classes used in our application.
/generated-conf # Configuration for the ORM
/generated-sql # Explicit creation queries for our DB structure.
```

The Routing is handled through the `routes` folder, and are [Slim](http://www.slimframework.com/) routes.

### Development

```
cd api
composer install
php -S localhost:8000
```

A `Foodbank.postman_collection.json` file has been added. You can import this to Postman to test routes.

### Helpful URLs

[Propel ORM Calls](http://propelorm.org/documentation/03-basic-crud.html)

[PHPMyAdmin](http://www.develop.digitalmediauconn.org/phpmyadmin/)

[Routing with Slim](http://www.slimframework.com/docs/objects/router.html#how-to-create-routes)

## Contact

Expand Down
4 changes: 4 additions & 0 deletions api/.htaccess
@@ -0,0 +1,4 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
25 changes: 25 additions & 0 deletions api/Foodbank.postman_collection.json
@@ -0,0 +1,25 @@
{
"variables": [],
"info": {
"name": "Foodbank",
"_postman_id": "a8e172cf-8f6b-3abf-a0ee-90832eecb2bf",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "GET All Categories",
"request": {
"url": "http://localhost:8000/category/all",
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"description": ""
},
"response": []
}
]
}
14 changes: 14 additions & 0 deletions api/composer.json
@@ -0,0 +1,14 @@
{
"name": "brian/foodbank",
"type": "project",
"authors": [
{
"name": "briankelleher",
"email": "bkelleher4@gmail.com"
}
],
"require": {
"propel/propel": "~2.0@dev",
"slim/slim": "~3.0"
}
}

0 comments on commit f8d5176

Please sign in to comment.