Installation
Getting Started
Last updated
Was this helpful?
Getting Started
Last updated
Was this helpful?
You are looking at the depricated version of the docs. See for the latest documentation.
This is no longer the way to install Lucid, see for the modern method.
This example uses Laravel with the Lucid Monolith installation (in contrast with Microservice). For more on the differences see Definitions [coming soon].
Initialise a Laravel project with Lucid, using the latest version:
This will install a new Laravel project with the latest version, structured as per the Lucid architecture, as well as the which provides a command line interface and a user interface to help you manage your Lucid components.
To install a specific version use notation such as
lucid-arch/laravel=5.8.x
instead oflucid-arch/laravel
. This is literally5.8.x
and not5.8.0
or5.8.1
.
What you should know about the directories that you will find in addition to the ones included in Laravel by default:
Use the table below to help you place the different Lucid components
Component Definitions
Component
Path
Description
Service
src/Service/[service]
Place for the Services
Feature
src/Services/[service]/Features/[feature]
Place for the Features of Services
Job
src/Domains/[domain]/Jobs/[job]
Place for the Jobs that expose the functionalities of Domains
Operation
src/Operations
Place for the Operation that can call multiple Jobs from different domains
Data
src/Data
Place for models, repositories, value objects and anything data-related
Foundation
src/Foundation
Place for foundational (abstract) elements used across the application
The lucid
executable will be in vendor/bin
. If you don't have ./vendor/bin/
as part of your shell PATH
you will need to execute it using ./vendor/bin/lucid
, otherwise add it with the following command to be able to simply call lucid
when in the project's root directory [recommended]:
Before we dive into code, here's what we are about to do:
Part II
Create Admin
Service
Share functionality from Api
Add display functionality
Test Admin
[manual]
Part III
Repository pattern for data storage
Optional Job parameters
Operations
Error handling
Abstraction in sharing data provider between validation and feature?
For a list of all the commands that are available run lucid
or see the .
We will create an application with basic functionality to create and list articles, where an article simply having title
and content
. The application will have two services: Api
and Admin
. Each will expose the features correspondingly, where the Api
service will receive and return JSON data, while Admin
will serve them rendered using .