Installation
Getting Started
You are looking at the depricated version of the docs. See https://docs.lucidarch.dev for the latest documentation.
This is no longer the way to install Lucid, see installation docs for the modern method.
Laravel • Lucid Monolith
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 Lucid Console 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
.
Directory Structure
What you should know about the directories that you will find in addition to the ones included in Laravel by default:
Components
Use the table below to help you place the different Lucid components
Component Definitions
Setup
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]:
For a list of all the commands that are available run lucid
or see the CLI Reference.
Seek your shell session's docs to see how to add this to your shell profile permanently.
Description
Before we dive into code, here's what we are about to do:
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 Blade.
Overview
Part II
Create
Admin
ServiceShare 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?
Last updated