API-RESTful-Cadtreesa
Service for the cadreesa project. Serving the website and android application ☕
Introduction to API-RESTful-Cadtreesa
This project was developed for the purpose of studying API's RESTful with Json Web Token authentication (JWT). For the development model, a project was used during the course of Information Systems.
API Documentation
We used the documentation standard of the API Blueprint. See the documentation for this API with Github Pages rendered with Aglio:
Documentation in Github Pages
Documentation in Markdown apiblueprint.org
About Cadtreesa Project
The Cadtreesa project was proposed during the discipline of Programming Language Concepts of the Information Systems course at UFMT-MT, Brazil.
Scope of the problem
Register and validate trees by means of an Android application being the target public the students of the course of Agricultural and Environmental Engineering.
Me, Rodrigo Oliveira e Nicolas Tiago).
Solution proposed by project members (Registration of trees by students, teachers and coordinator. Once the tree has been registered by a user, it must be validated by a teacher or coordinator. Once validated the tree can have its information available on a web page that will be accessed from QR Codes generated at the time of registering the tree. These codes contain the address of the page with the tree information. Get to know the project page.
Entities and operations
Relational schema
The relational schema of the project (updated for this study) can be seen here: Cadtreesa_db
Installation
$ git clone https://github.com/thalysonalexr/API-RESTful-cadtreesa.git
Dependencies
Tested in php >= 7.2.3
- firebase/php-jwt - Authentication with Json Web Tokens.
- respect/validation - Validation of data entry.
- phpmailer/phpmailer - Sending e-mails by SMTP.
- respect/rest - Routes to the application drivers.
This project uses composer to manage your dependencies. Before testing run the following command with the composer already installed on your machine.
$ composer update
Test
This project was tested only on local server using the php embedded server. To run the project, run the following command for the public directory:
$ php -S localhost:4000 -t public
References
- https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
- https://www.youtube.com/watch?v=5I56m9o4TvI&list=PLz_YTBuxtxt4mPj7VncW1iRJyYUKKGsDt
- https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
Credits
License
The MIT License (MIT). Please see License File for more information.