blueprintau / lucent
Lucent PHP web framework
Deleted by maintainer on 2026-08-10 09:47:06 UTC
This package is auto-updated.
Last update: 2026-10-29 19:56:58 UTC
README
Lucent is a lightweight PHP framework designed for building APIs with minimal overhead. It offers an elegant, intuitive syntax for building web applications and services.
Lucent provides a streamlined approach to building PHP APIs with:
- Simple routing with REST
- Database layer powered by Radiant — MySQL, SQLite, Postgres
- Attribute-driven ORM with relationships
- Diff-based schema synchronization (
sync) - Route Model Binding via
#[Bind] - Rules & Validation
- Middleware support
- Comprehensive PSR-3 compliant logging
- PSR-7/15/17 HTTP messages
- PSR-18 HTTP client
- Dependency Injection Container
- PSR-16 compliant caching
- CLI tools for development and maintenance
- File System
- UUID's
- Exception & Error handling
- Upgrading from a pre-Radiant version
Installing and Updating
Installation
Create a new Lucent project using Composer:
composer create-project blueprintau/lucent myapp
Then start the development server:
cd myapp
vendor/bin/lucent serve
By default the server runs on port 8080. Pass --port=9000 to use a different port:
vendor/bin/lucent serve --port=9000
Alternatively, add Lucent to an existing project:
composer require blueprintau/lucent
Updating Lucent
To update Lucent to the latest version:
composer update blueprintau/lucent
Deploying Your Project
Lucent includes a built-in deployment system that allows you to deploy and rollback your project directly from the CLI. It works with any zip-based source — GitHub, Gitea, S3, or any URL that returns a zip file.
Configuration
Add the following to your .env file:
DEPLOY_URL=https://api.github.com/repos/your-org/your-repo/zipball/master DEPLOY_TOKEN=your_personal_access_token
For GitHub private repositories, generate a Access Token with repo scope at https://github.com/settings/tokens, then use the API URL format above with the following headers automatically applied by Lucent:
Authorization: Bearer {token}
Accept: application/vnd.github+json
X-GitHub-Api-Version: 2022-11-28
Deploying the Latest Version
vendor/bin/lucent deploy latest
This will:
- Download the zip from
DEPLOY_URL - Back up your current project to
storage/backups/{timestamp}.zip - Extract the new version over your project
The following paths are never touched during a deploy:
.env— your environment configvendor/— your Composer dependenciesstorage/— your logs, uploads, and temp files
Rolling Back
vendor/bin/lucent deploy rollback
This will:
- Clean the current project (preserving
.env,vendor/,storage/backups,storage/temp, andlogs) - Restore the most recent backup zip
- Remove the used backup
Project Structure
After installation, your project will have the following structure:
myapp/
├── App/
│ ├── Commands/
│ ├── Controllers/
│ ├── Models/
│ └── Rules/
├── commands/ # CLI command files (auto-loaded)
├── routes/ # Route files (auto-loaded)
├── public/
│ └── index.php
├── storage/
├── logs/
├── vendor/
│ └── blueprintau/
│ └── lucent/ # The framework
├── .env
└── composer.json
Configuration
Configure your database connection and other settings in the .env file:
DB_DRIVER=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=lucent DB_USERNAME=root DB_PASSWORD=
Supported drivers: mysql, sqlite, pgsql, csv.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Lucent is open-sourced software licensed under the MIT license.