Installation and usage instructions
# Turn off other mysql and apache services running(like MAMP etc)
# Install and setup Docker for Mac or Windows if not already
# Build docker containers
# below command will take about 5 minutes. Please be patient
cd neami-challenge
docker-compose build
# Run all
docker-compose up
# Run commands inside containers
docker-compose exec <container> <command>
# e.g. docker-compose exec lumen-api php artisan migrate:refresh --seed
- Rename or copy
.env.example
file to.env
- Update APP_KEY and JWT_SECRET with your own secret keys
- Set your database credentials in your
.env
file to match Docker settings - Set your
APP_URL
in your.env
file. docker-compose exec lumen-api php artisan migrate:refresh --seed
- Above command will freshly migrate and seed default roles, permissions and users for testing.
- Visit http://localhost:8000 to access Lumen API
User roles and permissions are handled by this Laravel Permission library.
After seeding, default permissions manage-users, delete-users
will be created.
And default role super-admin
with all permissions will be created.
- Authentication is implemented using JSON Web Tokens with the help of PHP-JWT library
- JWT token is saved in localStorage and set to expire after 24hrs.
- Logged in user's information also stored in localStorage. Note that the authorization process does not rely on this localStorage user information.
- Authorized users only routes are protected by Vue Router
meta
optionpermission
. Refervue-spa/src/router/index.js
- All protected routes will trigger
'/permissions'
API call automatically to get fresh set of user's permissions and store it in Vue memory. Unauthorized entries will be redirected to/store
- Visit
localhost:8080
in your browser - Hot Module Replacement is enabled by default by the docker configuration.
- For admin level access visit
/login
and use the default super admin User/Password:[email protected]/000000
. - For user level access visit
/login
and use the default user User/Password:[email protected]/000000
Neami Challenge Frontend is built on top of CoreUI for Vue.js. Refer its extensive documentation to understand the file structure, layouts, and components.
Users
CRUD operations as administrator- Option to add/remove roles & permissions to each user as administrator
- New page to maintain roles and permissions CRUD operations
- Push the production build to https://neami.iamraja.com