A RESTful and extendable Backend as a Service that provides instant backend to develop sites and apps faster, with dead-simple integration for JavaScript, iOS, Android and more.

Overview

hook

Welcome to hook

Build status ![Gitter](https://badges.gitter.im/Join Chat.svg)

hook is a RESTful, extendable Backend as a Service that provides instant backend to develop sites and apps faster, with dead-simple integration for iOS, Android, JavaScript and more.

Requirements: PHP 5.5+, or PHP 5.3.

Features

  • Multitenancy (same instance may be used for many apps)
  • User authentication (register, login, reset password)
  • Data persistance through collections
  • Data storage through many providers
  • Real-time communication through WAMP subprotocol (WebSockets).
  • Package management through composer

Installation

Run this command in your terminal to get the lastest version:

curl -sSL https://raw.githubusercontent.com/doubleleft/hook/master/scripts/install.sh | bash

At the end of the process you should have hook and hook-cli installed in your machine.

How to use

Run the server locally:

hook server

Create a new application from the commandine:

hook app:new my-app --endpoint http://0.0.0.0:4665

It will output access keys to use in the front-end. Checkout this example using JavaScript frontend.

Take a look at the documentation for more details.

Front-end Integration

Reduce the gap between backend and frontend development:

License

MIT.

Comments
  • Phalanger support

    Phalanger support

    Testar/compilar e ver limitações de rodar o dl-api em uma arquitetura .NET através do Phalanger (http://phalanger.codeplex.com/). O ideal é funcionar com o compilador, já que instalar o interpreter é muito mais burocrático.

    enhancement 
    opened by gabriel-laet 17
  • Update - não é possível criar um campo ainda inexistente

    Update - não é possível criar um campo ainda inexistente

    Endel, não consegui criar um campo novo via update. Primeiro tive que criar via authenticate para depois funcionar o update em cima desse campo.

    requisição: client.collection('auth').update(32, { 'foo': 0});

    resposta: 200 OK {"error":"SQLSTATE[42S22]: Column not found: Unknown column 'foo' in 'field list' (SQL: update auth set foo = 0, updated_at = 2014-02-11 15:06:47 where _id = 32)"}

    bug 
    opened by vicentelyrio 10
  • Removing collection items with (filters / no passing id) should pass through collection observer

    Removing collection items with (filters / no passing id) should pass through collection observer

    As said in the title. The "remove all" functionality should pass throught the collection Observer to allow the developer to control this event.

    The line this should be done https://github.com/doubleleft/dl-api/blob/master/api/index.php#L182-L185

    c501e07b55193f2597aecfa39ecd6ee9aa22bc25

    opened by JoaoMosmann 8
  • Problema ao gerar rotas

    Problema ao gerar rotas

    Gerei uma rota através do comando

    dl-api generate:route populate_cinema_cards /populate_cinema_cards

    E por seguinte fiz o upload

    dl-api module:upload

    Porém, o seguinte problema ocorre.

    image

    Fiz algo errado ?

    .dl-config {"name":"clubsocial-possibilidades","app_id":"5","key":"V23drdEh1Odwn95/S0LDi2bSPmtLSGWh/xBlDyfDV6E=","endpoint":"http:\/\/dl-api.ddll.co\/"}

    question 
    opened by JoaoMosmann 8
  • Implementar geo-data

    Implementar geo-data

    Adicionar na API um tipo de dado, para aplicações que usem geolocalização. Pode ser algo mais genérico, como o 2d index do MongoDB. A dificuldade é implementar em MySQL, aqui uma série que pode dar algumas idéias:

    mysql + geodata

    http://evertpot.com/229/ http://evertpot.com/230/ http://evertpot.com/231/

    mongodb 2d-index

    http://docs.mongodb.org/manual/core/geospatial-indexes/

    mysql spatial-index

    https://dev.mysql.com/doc/refman/5.0/en/using-a-spatial-index.html

    feature 
    opened by gabriel-laet 8
  • Autenticação através do client via commandline

    Autenticação através do client via commandline

    Queria discutir com vocês sobre a restrição dos requests feitos através da nossa commandline.

    Tudo indica que teremos dois níveis de autenticação:

    1. Usuário: id_rsa.pub da máquina
    2. Aplicação: id/key de admin para o app

    Existe uma maneira de fazer o download das chaves públicas do key-manager?

    Estou pensando em enviar o id_rsa.pub do usuário que estiver utilizando a commandline, e checar com uma lista de usuários autorizados, que ficaria em um diretório da dl-api no servidor. (ex: dl-api/authorized_keys)

    É viavel isso? Por exemplo, no nosso setup atual, todos os servidores com dl-api deveriam ter esse authorized_keys sincronizado. O ideal seria que essa autenticação seja auto-suficiente - não depender de um serviço externo como o endereço http://key-manager.dlapp.co/. Logo, essa sincronia dependeria de alguma automação de deploy.

    Idéias? O que acham? @aline-doubleleft @gilnak @barrabinfc @gabriel-laet

    feature 
    opened by endel 8
  • Error: bad endpoint

    Error: bad endpoint

    I run the command hook app:new my-app --endpoint http://localhost:4665 as suggested in the documentation and get the following error

    ...
    Error: bad endpoint.
    Please check if it is accessible: http://localhost:4665/```
    
    I am running this on Mac osx
    
    opened by bjorntheart 6
  • Cadastro em Cheetos e Plugados não está funcionando

    Cadastro em Cheetos e Plugados não está funcionando

    Nos dois casos, quando completamos o cadastro e clicamos em enviar o site nos dá o feedback de que os emails já foram cadastrados mesmo que eles ainda não estejam no banco de dados.

    opened by vdonamaria 5
  • Allow multiple relationships with different names to relate the same collection

    Allow multiple relationships with different names to relate the same collection

    Currently, it's possible to declare relationships with the following syntaxes:

    relation-type: string

    books:
      relationships:
        belongs_to: author
    

    relation-type: array

    books:
      relationships:
        belongs_to: 
          - author
          - publisher
    

    New syntax proposal

    Allow the previous syntaxes to work, adding the following for complex cases.

    books:
      # omit 'relationships' key
    
      belongs_to: 
        author: auths # same as using 'references' above
        creator: 
          references: auths
          on: field_id
          on_delete: restrict # 'cascade' or 'restrict'
          on_update: cascade  # 'cascade' or 'restrict'
    
      has_many: 
      # ...
    
    feature 
    opened by endel 4
  • Entrada de dados em collection de Auth (apenas), está retornando erro de CORS em clubsocial.com.br

    Entrada de dados em collection de Auth (apenas), está retornando erro de CORS em clubsocial.com.br

    XMLHttpRequest cannot load https://api-clubsocialpossibilidades.2l.cx/collection/auth. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://clubsocial.com.br' is therefore not allowed access.

    opened by ralus 4
  • problem with angularjs/angular-ui-router

    problem with angularjs/angular-ui-router

    hook .auth .login({email: username, password: password}) .then(function(data) { console.log('user: ', data); $location.path = ('/'); }, function(data) { console.log('error: ', data); });

    after a success login, won't navigate or redirect to $location.path

    opened by jijijrey 3
  • Trying to get in touch regarding a security issue

    Trying to get in touch regarding a security issue

    Hey there!

    I'd like to report a security issue but cannot find contact instructions on your repository.

    If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

    Thank you for your consideration, and I look forward to hearing from you!

    (cc @huntr-helper)

    opened by JamieSlome 0
  • Unauthorized 403 connecting to Hook development server

    Unauthorized 403 connecting to Hook development server

    I'm having a similar problem than #119.

    This is what I get when I try a cURL (even from the same host):

    va25uoco@123123 [~]$ cd /home/va25uoco/hook.xxxx.xx/hook && hook server
    ...
    PHP 7.1.2 Development Server started at Tue Mar 14 13:03:44 2017
    Listening on http://0.0.0.0:4665
    Document root is /home/va25uoco/hook.iosue.it/hook/public
    Press Ctrl-C to quit.
    [Tue Mar 14 13:03:49 2017] 195.110.97.5:28012 [403]: /
    [Tue Mar 14 13:03:59 2017] 195.110.97.5:28964 Invalid request (Unexpected EOF)
    

    Moreover, scaffolding a new application gave me this output:

    va25uoco@lhcp1094 [~]$ hook app:new myapp
    ...
    
    opened by federicoiosue 1
Releases(v0.4.0)
  • v0.4.0(Jul 19, 2015)

    • oauth now returns credentials key when logging-in.
    • update package manager to support new composer-alpha10 syntaxes
    • fix decoding query parameters with like operations (like %b)
    • introduced Message class and Mail::message method.
    • new handy embed_img/embed helpers for mail templating
    • upgrade illuminate components from v4.x to v5.x (#147)
    • introduced bulk insert feature. (#120)
    • support "has many through" feature. (#145)
    • introduced built-in trusted role, with access to auths.
    • support multiple role names per action by collection on security.yaml (#149)
    • skip migration of created_at/updated_at/deleted_at attributes.
    • introduced custom login handling through auths observer.
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(May 25, 2015)

    • improved relationship configs
    • built-in collection security configs
    • fixed returning strings on aggregated collection methods
    • fixed duplicated 'lock_attributes' on schema cache
    • fix auto-migrating collections on update calls
    • allow to configure auth token expiration time on config.yaml
    • fix output of 'keys' and 'modules' to CLI
    • added template engine to be used with Module::template()->compile()
    • added Context::unsafe() method to enforce unsafe collection operations.
    • exposed orWhere method for client-side implementation
    • allow 'falsy' default values on schema builder (#121)
    • added handy App::url() method to generate urls with credentials. (#122)
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Oct 3, 2014)

This project was built to connect WHMCS with GridPane.com's API service so we can create sites within WHMCS.

GridPane Server Module for WHMCS This project was built to connect WHMCS with GridPane.com's API service so we can create sites within WHMCS. Discliam

null 10 Sep 2, 2021
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
A simple way of authenticating your RESTful APIs with API keys using Laravel

ApiGuard This package is no longer maintained This package is no longer maintained as Laravel already has a similar feature built-in since Laravel 5.8

Chris Bautista 691 Nov 29, 2022
A simple example of how to create a RESTful API in Laravel Framework 8.36.1.

FirstLaravel A simple example of how to create a RESTful API in Laravel Framework 8.36.1. I used Database sqlite because I wanted to deploy this proje

Max Base 4 Apr 16, 2021
Provides a Middleware to integration Tideways into Symfony Messenger Processing

Tideways Middleware for Symfony Messenger This package is currently under development and might be moved into the Tideways PHP Extension or stay indep

Tideways 6 Jul 5, 2022
A RESTful API package for the Laravel and Lumen frameworks.

The Dingo API package is meant to provide you, the developer, with a set of tools to help you easily and quickly build your own API. While the goal of

null 9.3k Jan 7, 2023
My first laravel restful api project

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Amirhosein Mohammadian 2 Oct 13, 2021
PHP SDK for Checkout RESTful APIs

REST API SDK for PHP V2 To consolidate support across various channels, we have currently turned off the feature of GitHub issues. Please visit https:

PayPal 400 Nov 29, 2022
PHP SDK for PayPal RESTful APIs

Deprecation Notice: This SDK is deprecated. You can continue to use it, but no new features or support requests will be accepted. For alternatives, pl

PayPal 2.1k Jan 5, 2023
Best resources restful api for developers

Best resources restful api for developers (with JSON:API standar specification design).

Noval 2 Jan 18, 2022
Best resources restful api for developers (with JSON:API standar specification design)

List API Best resources restful api for developers (with JSON:API standar specification design). API Resource Endpoint Name Resource Description Al Qu

Noval 2 Jan 18, 2022
Fully documented & tested Laravel 9 RESTful books API scraped from Gramedia.

Laravel Books API Introduction This app provides a list of books in a RESTful API. Source of data obtained from Gramedia by using the web scraping tec

Yusuf T. 44 Dec 23, 2022
Laravel A2Reviews Client API lets you build apps, extensions, or plugins to get reviews from the A2reviews APP.

Overview Laravel A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP. Including adding reviews to a

Be Duc Tai 2 Sep 26, 2021
Domain-Driven Design Maker for Symfony apps

Domain-Driven Design Maker for Symfony applications This bundle assumes you are using https://github.com/yceruto/symfony-ddd-skeleton architecture or

Yonel Ceruto 8 Aug 31, 2022
A PHP implementation of the GraphQL specification based on the JavaScript reference implementation

GraphQL This is a PHP implementation of the GraphQL specification based on the JavaScript reference implementation. Related projects DateTime scalar R

Digia 219 Nov 16, 2022
This API provides functionality for creating and maintaining users to control a simple To-Do-List application. The following shows the API structure for users and tasks resources.

PHP API TO-DO-LIST v.2.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science cours

Edson M. de Souza 6 Oct 13, 2022
A Laravel 5+ (and 4) service provider for the AWS SDK for PHP

AWS Service Provider for Laravel 5/6/7/8 This is a simple Laravel service provider for making it easy to include the official AWS SDK for PHP in your

Amazon Web Services 1.5k Dec 28, 2022
SAML bundle for gateway, self-service, and ra

SURFnet SamlBundle A bundle that adds SAML capabilities to your application using simplesamlphp/saml2 Developed as part of the SURFnet Stepup Gateway

OpenConext 12 Dec 14, 2022
Most Advance online restaurant menu, food delivery system, online restaurant menu, free online restaurant menu, free online restaurant menu app, online restaurant menu service provider

Buffet Box online menu and cloud kitchen Most Advance online restaurant menu, online restaurant menu, free online restaurant menu, free online restaur

null 20 Oct 28, 2022