All Projects → gothinkster → Cakephp Realworld Example App

gothinkster / Cakephp Realworld Example App

Licence: other

Projects that are alternatives of or similar to Cakephp Realworld Example App

Laravel Realworld Example App
Exemplary real world backend API built with Laravel
Stars: ✭ 954 (+826.21%)
Mutual labels:  rest-api, demo-app, realworld, backend
laravel-realworld-example-app
Exemplary RealWorld backend API built with Laravel PHP framework.
Stars: ✭ 34 (-66.99%)
Mutual labels:  backend, demo-app, realworld
Kanary
A minimalist web framework for building REST APIs in Kotlin/Java.
Stars: ✭ 319 (+209.71%)
Mutual labels:  rest-api, backend
Parse Server
API server module for Node/Express
Stars: ✭ 19,165 (+18506.8%)
Mutual labels:  rest-api, backend
Notykt
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.
Stars: ✭ 543 (+427.18%)
Mutual labels:  rest-api, backend
lumen-realworld-example-app
Exemplary real world backend API built with Lumen + MongoDB
Stars: ✭ 50 (-51.46%)
Mutual labels:  demo-app, realworld
multi-projects-architecture-with-Ktor
A Ktor real world example built on multi-projects architecture
Stars: ✭ 29 (-71.84%)
Mutual labels:  backend, realworld
Udash Core
Scala framework for building beautiful and maintainable web applications.
Stars: ✭ 405 (+293.2%)
Mutual labels:  rest-api, backend
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (+33.98%)
Mutual labels:  rest-api, backend
Express Bookshelf Realworld Example App
🐳 An Express and Bookshelf based backend implementation of the RealWorld API Spec.
Stars: ✭ 45 (-56.31%)
Mutual labels:  realworld, backend
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-52.43%)
Mutual labels:  rest-api, backend
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+145.63%)
Mutual labels:  rest-api, backend
Yii2 Angular Boilerplate
Yii2 REST API + Angular10 Boilerplate (Frontend/Backend)
Stars: ✭ 194 (+88.35%)
Mutual labels:  rest-api, backend
Olympus
An instant REST API for any AI model 🔥
Stars: ✭ 151 (+46.6%)
Mutual labels:  rest-api, backend
Bank
🏦 Full Stack Web Application similar to financial software that is used in banking institutions | React.js and Node.js
Stars: ✭ 1,158 (+1024.27%)
Mutual labels:  rest-api, backend
Para
Open source back-end server for web, mobile and IoT. The backend for busy developers. (self-hosted or hosted)
Stars: ✭ 389 (+277.67%)
Mutual labels:  rest-api, backend
Spring Boot Vuejs
Example project showing how to build a Spring Boot App providing a GUI with Vue.js
Stars: ✭ 1,818 (+1665.05%)
Mutual labels:  rest-api, backend
Elixir Phoenix Realworld Example App
Exemplary real world application built with Elixir + Phoenix
Stars: ✭ 764 (+641.75%)
Mutual labels:  realworld, backend
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+8106.8%)
Mutual labels:  rest-api, cakephp
Spring Boot Mongodb Angular Todo App
A Sample App built using Spring Boot, Angular and MongoDB
Stars: ✭ 84 (-18.45%)
Mutual labels:  rest-api, backend

CakePHP RealWorld Example App

Build Status GitHub stars GitHub license

Example CakePHP codebase containing real world examples (CRUD, auth, advanced patterns and more) that adheres to the RealWorld spec and API.

This repo is functionality complete — PRs and issues welcome!


Getting started

Installation

Please check the official cakephp installation guide for server requirements before you start. Official Documentation

Clone the repository

git clone [email protected]:gothinkster/cakephp-realworld-example-app.git

Switch to the repo folder

cd cakephp-realworld-example-app

Install all the dependencies using composer

composer install

Configure your database settings in the config/app.php file(See: Datasource/default)

vi config/app.php

Run the database migrations (Set the database connection in app.php)

bin/cake migrations migrate

Start the local development server

bin/cake server

You can now access the server at http://localhost:8765

Database seeding

Populate the database with seed data with relationships which includes users, articles, comments, tags, favorites and follows. This can help you to quickly start testing the api or couple a frontend and start using it with ready content.

Run the database seeder and you're done

bin/cake migrations seed

API Specification

This application adheres to the api specifications set by the Thinkster team. This helps mix and match any backend with any other frontend without conflicts.

Full API Spec

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works


Code overview

Dependencies

Folders

  • src - Contains all the application logic.
  • config - Contains all the application configuration files.
  • src/Model/Entity - Contains all cakephp ORM entites.
  • src/Model/Table - Contains all cakephp ORM tables.
  • src/Service - Contains application services that represents root api endpoints.
  • src/Service/Action - Contains application endpoints logic logic.
  • src/Service/Renderer - Contains the final api response formatter.
  • /config/Migrations - Contains all the database migrations.

Environment configuration

  • config/app.php - Configuration settings can be set in this file

Note : You can quickly set the database information and other variables in this file and have the application fully working.


Testing API

Run the cakephp development server

bin/cake server

The api can now be accessed at

http://localhost:8765/api

Request headers

Required Key Value
Yes Content-Type application/json
Yes X-Requested-With XMLHttpRequest
Optional Authorization Token {JWT}

Refer the api specification for more info.


Authentication

This applications uses JSON Web Token (JWT) to handle authentication. The token is passed with each request using the Authorization header with Token scheme. The cakephp authenticate middleware configured for handling JWT authentication and validation and authentication of the token. Please check the following sources to learn more about JWT.


Cross-Origin Resource Sharing (CORS)

This applications has CORS enabled by default on all API endpoints. Please check the following sources to learn more about CORS.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].