erdiko/user-admin

User auth and management system for PHP

0.1.2 2017-02-23 09:46 UTC

README

Package version

Goal: A fully functional and modular user management system with an Angular 2 UI.

Note this is an active development project and not quite ready for production yet

It is based on a few erdiko packages (authorize, authenticate, and users) as well as the Angular CLI project.

Application

The UI is an Angular CLI project using an erdiko web application to interact with the database. Erdiko loads the Angular 2 application as well as serves the AJAX routes.

We chose to use Angular CLI since it makes it very simple to create new components as well as creating basic unit and functional tests for the developer. We also wanted to provide a method to allow the user to easily test their code as they developed yet still compile and serve the smallest code when serving to the end user.

Installation

Create your project using composer

composer create erdiko/user-admin [PROJECT NAME]

Note about versions

Since this project is still under heavy development we recommend running the latest from the develop branch. If you would like to tell composer to use the develop branch use this command instead of the one above.

composer create erdiko/user-admin:dev-develop [PROJECT NAME]

Create your docker containers

Enter your newly created project directory and run docker compose.

cd [PROJECT NAME]

docker-compose up -d

If you don't have docker compose installed you can install by following the instructions here, https://docs.docker.com/compose/install/. You can, of course, just create create your own lamp stack if you wish. If you create your own enviornment the weboot is /public/default/ and the database config is in /app/config/shared/database.json

Install the users database

Follow the instructions in erdiko/users to update your database. Check your vendor folder for this package or go to the github repo at https://github.com/Erdiko/users.

View your new project in your browser

http://docker.local:8088/

Editing & Compiling the Angular Code

Editing and compiling the Angular code is simple, and we use Angular CLIs test server to allow you to edit your code and test in real time.

  1. Go to the user-admin theme directory under user-admin/app/themes/user-admin
  2. Install all dependencies via npm: npm i
  3. Start the development server: npm run start
  4. Edit the typescript found in the src directory and save in another terminal window or tab, watch for compiler errors

NPM Run Commands

  • Start the Development server: npm run start
  • Run the unit tests: npm run test
  • Run the e2e/functional tests: npm run e2e
  • Compile and export files for end user: npm run build

Local Development

To set your environment up for local development, please follow these steps:

  • Clone your fork of the User Admin project into a local directory
  • Clone the following packages into the same directory
  • Copy the composer-dev.json file to composer.json
  • Start your docker container docker-composer up --build

Special Thanks

Arroyo Labs - For sponsoring development, http://arroyolabs.com