Skip to content

Web interface for browsing PHPCR repositories, using Silex and AngularJS

License

Notifications You must be signed in to change notification settings

20minutes/phpcr-browser

 
 

Repository files navigation

PHPCR Browser Build Status

PHPCR Browser provides an intuitive web interface to explore and manage PHPCR repositories. The current implementation supports Jackalope Jackrabbit and Jackalope Doctrine DBAL.

screenshot

Supported Operations

Jackalope Jackrabbit:

  • Workspace: create
  • Node: create, delete, move
  • Property: create, delete, update

Jackalope Doctrine DBAL:

  • Workspace: create, delete
  • Node: create, delete, move
  • Property: create, delete, update

See marmelab/phpcr-api/config/factories.yml for more details.

Installation

PHPCR Browser uses Composer and Bower to manage its dependencies. Make sure they are globally installed before continuing.

1. Clone the repository

git clone [email protected]:20minutes/phpcr-browser.git
cd phpcr-browser

2. Install dependencies

To install the web application with the default configuration (see below), run the following command:

composer install

Ensure you use the correct node version (using nvm):

nvm install

Then:

bower install

If a bower EINVRES error appears or bower isn't installed, try:

npm i -g bower

Then try again:

bower install

Configuration

Create a config/prod.yml with the connection settings for the repositories you need to browse:

phpcr_repositories:
    'Local Repository':
        factory: jackalope.jackrabbit
        parameters:
            jackalope.jackrabbit_uri: 'http://localhost:8080/server'
            credentials.username: admin
            credentials.password: admin

    'Prod Repository':
        factory: jackalope.jackrabbit
        parameters:
            jackalope.jackrabbit_uri: 'http://localhost:8088/jackrabbit/server'
            credentials.username: admin
            credentials.password: admin

Usage

SSH Tunnel

Open an SSH tunnel to JCR:

ssh -L 8088:jackrabbit.20mn.net:8080 deploy@deploy-01

Using Apache VirtualHost

Add a VirtualHost to your Apache config (and add in it 'AllowEncodedSlashes On'):

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /home/<you>/phpcr-browser/web
    ServerName phpcr-browser
    AllowEncodedSlashes On

    <Directory /home/<you>/phpcr-browser/web>
        DirectoryIndex index.html index.php
        Options FollowSymLinks
        AllowOverride All
        Require All Granted
    </Directory>
</VirtualHost>

And update your /etc/hosts file by adding:

127.0.0.1   phpcr-browser

You can now access the repository by browsing to http://phpcr-browser/browser/#/.

Tests

The PHPCR Browser AngularJS part is fully unit tested with Karma and Jasmine. If you want to run them, install dependencies by running: make install-test

Then run the following command: make test-spec

Sass

The stylesheets are compiled by Compass and Sass.

If you update the sass files, run make compass-watch during development.

When your work is done, run make compass-compile before committing.

Contributing

All contributions are welcome and must pass the tests. If you add a new feature, write tests for it.

License

This application is available under the MIT License, courtesy of marmelab.

About

Web interface for browsing PHPCR repositories, using Silex and AngularJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 67.2%
  • JavaScript 28.4%
  • HTML 3.9%
  • PHP 0.4%
  • Makefile 0.1%
  • Ruby 0.0%