chez14 / f3-api
FatFree Framework API Boilerplate
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 3
Open Issues: 4
Type:project
Requires
- bcosca/fatfree-core: ^3.6
- chez14/f3-ilgar: v1.0.0.1
- ikkez/f3-cortex: ^1.5
- spatie/array-to-xml: ^2.8
This package is auto-updated.
Last update: 2024-10-27 09:50:53 UTC
README
Fat-free framework API Boilerplate to make your life easier.
I really love to make APIs so here's my basic API Standard. Heavily inspired by Facebook API and my senpai's standard.
Installed Instance:
- Fat-free for the cure core of this boilerplate.
- Cortex for modelling (you could remove it easily, please see our manual (soon))
- Ilgar for easy migrations.
Features
Better output standards. the app/output/formatter.php
are responsible to make your outputs beautiful.
It's designed to be easily changed. The app/view/api.php
are the one responsible to choose whether it's XML or JSON output.
API Standards
NOTE: The @func
is optional. When access GET /@module
, it will invoke Controller\@module->get_index
and etc. So it's important to know how todo things.
NOTE: Oh the future, i'll add the Authorization
header required for API Key and etcs. Please bear with us.
SPECIAL: You just need to add ?json_pretty_print
on the end of the URL if you wanted to pretty print the JSON. Have fun!
WARNING: When the extension is not defined, we'll treat them as JSON.
Getting Started
-
Invoke this:
$ composer create-project chez14/f3-api my-api
-
Do your own setup on
app/config/
find for
.example.ini
file, and change them as your system setups. -
Run the development server:
$ composer run-script start --timeout=0
-
Run a migration
You can access
http://localhost:8080/-/migrate
to start the migration.