PHPackages                             kteixeira/simple-cms-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kteixeira/simple-cms-api

ActiveLibrary[API Development](/categories/api)

kteixeira/simple-cms-api
========================

08PHP

Since Nov 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kteixeira/simple-cms-api)[ Packagist](https://packagist.org/packages/kteixeira/simple-cms-api)[ RSS](/packages/kteixeira-simple-cms-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

CMS PURE API
============

[](#cms-pure-api)

Uma simples API que simula algumas funcionalidades de um CMS.

Tecnologias
-----------

[](#tecnologias)

- PHP
- MySQL
- Composer
- Bibliotecas
    - [Bramus-Router](https://github.com/bramus/router)
    - [PHP-JWT](https://github.com/firebase/php-jwt)

Instalação
----------

[](#instalação)

*- composer require kteixeira/simple-cms-api dev-master* (Em breve)

- Composer

    - Caso não tenha, veja como instalar na [Documentação Oficial](https://getcomposer.org/download/)
- Instruções

    - Clone o projeto em seu local
    - Rode o comando composer install
    - Em */configs* crie um arquivo chamado **database.php**, há um modelo para se espelhar, chamase **database\_example.php**. Preencha com seus dados de conexão ao MySQL.
    - Dê start em um servidor de testes com o comando: php -S localhost:8080 (ou a porta que preferir).
    - Faça primeiro a autenticação e em seguida insira o *access\_token* recebido, nos headers.

#### Observação

[](#observação)

- O arquivo **dump\_cms.sql** encontra-se na raiz do projeto e é um script em SQL para a criação do Schema e das Tabelas, já populando com a aplicação de teste.

---

API
===

[](#api)

### Create Post

[](#create-post)

- URL

    - /posts
- Method

    - POST
- URL Params required: \[title, path\]
- Body

    - {"post":{"title":"Lorem Ipsum","body":"Lorem Ipsum","path":"/path/test"}}
- Success Response

    - Code: 201
    - Content: {"post":{"id":1,"title":"Lorem Ipsum","body":"Lorem Ipsum","path":"/path/test","created\_at":"2017-11-30 00:04:47","updated\_at":"2017-11-30 00:04:47"}}

### Update Post

[](#update-post)

- URL

    - /posts/:id
- Method

    - PUT
- Body

    - {"post":{"title":"Lorem Ipsum", "body":"Lorem Ipsum Updated", "path":"/path/test"}}
- Success Response

    - Code: 200
    - Content: {"post":{"id":1,"title":"Lorem Ipsum","body":"Lorem Ipsum Updated","path":"/path/test","updated\_at":"2017-11-30 00:10:17"}}

### Get Post

[](#get-post)

- URL

    - /posts/:id
- Method

    - GET
- Success Response

    - Code: 200
    - Content: \[{"id":"1","title":"Lorem Ipsum","body":"Mel assum dicant intellegat et.","path":"/path/test","created\_at":"2017-11-29 23:13:47","updated\_at":"2017-11-29 23:32:58"}\]

### Get Posts

[](#get-posts)

- URL

    - /posts
- Method

    - GET
- Success Response

    - Code: 200
    - Content: \[{"id":"1","title":"Lorem Ipsum","body":"Mel assum dicant intellegat et.","path":"/path/test","created\_at":"2017-11-29 23:13:47","updated\_at":"2017-11-29 23:32:58"}, {"id":"1","title":"Lorem Ipsum","body":"Mel assum dicant intellegat et.","path":"/path/test","created\_at":"2017-11-29 23:13:47","updated\_at":"2017-11-29 23:32:58"}, {"id":"1","title":"Lorem Ipsum","body":"Mel assum dicant intellegat et.","path":"/path/test","created\_at":"2017-11-29 23:13:47","updated\_at":"2017-11-29 23:32:58"}\]

### Delete Post

[](#delete-post)

- URL

    - /posts/:id
- Method

    - DELETE
- Success Response

    - Code: 200
    - Content: {"message":"Success"}

### Auth Application

[](#auth-application)

- URL

    - /auth
- Method

    - POST
- URL Params required: \[name, password\]
- Body (Já são os dados do usuário cadastrado no banco)

    - {"name": "App Teste","password": "teste1234"}
- Success Response

    - Code: 200
    - Content: {"access\_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1MTIwMDgwNTEsImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdCIsImV4cCI6IjE1MTIwMTE2NDkiLCJuYmYiOjE1MTIwMDgwNTAsImRhdGEiOnsiaWQiOiIxIiwibmFtZSI6IkFwcCBUZXN0ZSIsImtleSI6IlhqWlVDbjlMdnhURiJ9fQ.TzDBAyi\_bRmhYhn7lSFQ3CGNfetf-p5zR14gnf\_AIDo"}

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/41aea5a4be3eb98b330778b2e392f8aec65a5433306b0cbce879e177fde514b5?d=identicon)[kteixeira](/maintainers/kteixeira)

---

Top Contributors

[![kteixeira](https://avatars.githubusercontent.com/u/11001891?v=4)](https://github.com/kteixeira "kteixeira (10 commits)")

### Embed Badge

![Health badge](/badges/kteixeira-simple-cms-api/health.svg)

```
[![Health](https://phpackages.com/badges/kteixeira-simple-cms-api/health.svg)](https://phpackages.com/packages/kteixeira-simple-cms-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
