Giter Site home page Giter Site logo

hap-browser's Introduction

This software is ALPHA.

HAP Browser

Build Status Docker Pulls

Generic Hypermedia Application Protocol (HAP) UI.

The Hypermedia Application Protocol is self-describing, opening the possibility for fully generic UI's suiting humans. With HAP Browser you can discover and manipulate your API without the need to install anything additional to your API. The only thing your API needs are the following CORS headers, because HAP Browser is a Web App accessing your API on a different origin.

CORS Headers on OPTIONS requests:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Headers: Accept, If-Match, Content-Type

CORS Headers on all other requests:

Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Location

Hosted HAP Browser

There is a hosted version of HAP Browser. I'll try to keep it running and current. But it's not guarantied. Please ping me on Twitter @alexander_kiel if there are any issues.

There is also an example application called HAP ToDo available. Just put

http://hap-todo.alexanderkiel.net

into the address bar of HAP Browser.

Build

Currently a complete compilation including a production optimized ClojureScript to JavaScript compilation works using:

lein with-profile production compile :all

Run HAP Browser with Docker

There is an automated build of HAP Browser on Docker Hub which builds a container running a Nginx web server which delivers the static files of the HAP Browser web application and proxies the backend services.

The container exposes port 80.

Start the container with the following command

docker run -d --name hap-browser -p 8080:80 akiel/hap-browser

Develop

HAP Browser uses figwheel

rlwrap lein figwheel

Currently I get many warnings if I start figwheel without doing a lein clean first.

Frontend State Management and DOM Update

TODO: React, Om

License

Copyright © 2015 Alexander Kiel

Distributed under the Eclipse Public License, the same as Clojure.

hap-browser's People

Contributors

alexanderkiel avatar knoppiks avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

knoppiks

hap-browser's Issues

Sort Links

Put the links in following order:

  • :up
  • :self
  • all others

Indicate Error Responses

Currently the representations of an error response are shown like normal ones. The data section should include a :message and the links section an :up link but otherwise nothing looks like an error here. Especially the HTTP status code is missing which is quite valuable in error responses.

I would just add something like a section header with Error: <status>.

Add Possibility to Add Optional Map Keys in Edit

Currently the edit functionality looks for schema entries of existing data keys. A data key becomes editable if there is a schema for it.

If one has optional data keys and the resource has no value for a data key, nothing is displayed in the data table and there is no way to add such a data key through edit.

index.html incorrect stylesheet href

You link to style.css in index.html and hap-browser.css in index-dev.html.
As there is no style.css in your project I assume hap-browser.css is the correct stylesheet.

Add Direct Linking of Resources

Currently one has to enter the location of a resource manually in the location bar. This has the disadvantage that direct (deep) links to resources are not possible.

The goal is to support URI's like this:

http://hap-browser.alexanderkiel.net?loc=http://hap-todo.alexanderkiel.net

with will go directly to the service document of HAP ToDo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.