Download the PHP package mathsgod/light without Composer

On this page you can find all versions of the php package mathsgod/light. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package light

Ask DeepWiki

light

A lightweight PHP 8.3+ GraphQL backend framework for building admin/CMS applications. Exposes a GraphQL API (plus a few REST endpoints for file serving) backed by a custom ORM (mathsgod/light-db), RBAC, and a PSR-15 middleware pipeline.

The companion frontend module is nuxt-light — a Nuxt 4 module using Quasar UI.


Requirements


Installation


Configuration

All configuration is read from a .env file in the project root.

Database

JWT Secret

A random string used to sign JWT access/refresh tokens.

Timezone

Google Sign-In (optional)

Install the Google API client:

Then set:

Other optional settings


Development Server

Both start php -S 0.0.0.0:8888 router.php.


Database Schema

Initialize the database schema (defined in db.json):


CLI Scaffolding


Architecture

Schema generation is annotation-driven via TheCodingMachine/GraphQLite. Controllers in src/Controller/ declare queries and mutations using PHP 8 attributes (#[Query], #[Mutation], #[Type], etc.).

ORM — models live in src/Model/ and extend Light\Model. The schema is defined in db.json. save() and delete() auto-populate audit fields (created_time, updated_time, created_by, updated_by) and write to EventLog.

RBAC — role → permission mappings bootstrap from permissions.yml; menus bootstrap from menus.yml. The Administrators role always has * (wildcard) permission.

File storage — file operations go through Light\Drive (Flysystem MountManager). Supported adapters: Local, AWS S3, Aliyun OSS, Hostlink.


Directory Layout

Path Purpose
src/Controller/ GraphQL controllers (queries & mutations)
src/Model/ ORM models, extend Light\Model
src/Input/ GraphQL input types for mutations
src/Type/ GraphQL output types
src/Command/ Symfony Console CLI commands
src/Auth/ JWT auth & authorization logic
src/Drive/ Flysystem drive abstraction
function/ Global helper functions (auto-loaded)
pages/ Optional plain-PHP pages (return JSON)
db.json Database schema definition
menus.yml Hierarchical menu definitions
permissions.yml Role → permission bootstrap mappings

Authentication Flow

  1. Login via GraphQL mutation → returns access_token (short-lived JWT) + refresh_token
  2. Subsequent requests send Authorization: Bearer <access_token>
  3. Token refresh: POST /refresh_token
  4. Optional 2FA (TOTP) and WebAuthn supported via src/Security/

Testing

Tests require a real DB connection (integration tests). Each test wraps in a DB transaction and rolls back in tearDown().


License

MIT


All versions of light with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
laminas/laminas-code Version ^4.7
league/container Version ^5.2
firebase/php-jwt Version ^7.0
laminas/laminas-diactoros Version ^3.5
symfony/yaml Version ^7.4
ramsey/uuid Version ^4.7
league/flysystem Version ^3.15
league/flysystem-path-prefixing Version ^3.3
phpmailer/phpmailer Version ^6.8
symfony/cache Version ^7.4
endroid/qr-code Version ^4.8
sebastian/diff Version ^7.0
mathsgod/light-rbac Version ^1.0
league/event Version ^3.0
utopia-php/system Version ^0.9.0
mathsgod/light-server Version ^1.1
mathsgod/light-graphql Version ^1.3
symfony/serializer Version ^7.4
symfony/property-info Version ^7.4
symfony/property-access Version ^7.4
web-auth/webauthn-lib Version ^4.9
mathsgod/light-db Version ^1.7.0
mathsgod/light-db-graphqlite-mappers Version ^1.0
mathsgod/json-to-sql Version ^1.0
mathsgod/mysql-schema-migrate Version ^1.0
symfony/console Version ^7.4
thecodingmachine/graphqlite Version ^8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mathsgod/light contains the following files

Loading the files please wait ...