/crudle

A starter kit for data-driven applications and content framework for web projects

Primary LanguagePHPOtherNOASSERTION

Note: This is a beta version of the software. You are advised to proceed with caution!

Introduction

Overview

A free and open source web development starter kit for building ready to go enterprise applications.

Installation

Prerequisites

  • Git
  • Composer
  • NPM

Option 1: via Composer

  • Run composer create-project logicent/crudle:dev-main && cd crudle

Option 2: via CLI

  • Run git clone git@github.com:logicent/crudle.git && cd crudle
  • Run composer install

Continue:

  • Create a database and update sites/.env settings
  • Run ./crudle migrate --migrationPath sites/database/migrations'
  • Run cat sites/database/scripts/crdl_People.sql | mysql -u <my_root_user> -p <my_db_name>
  • Run ./crudle user/user/create-superuser 'my_password' and ./crudle user/rbac/init
  • Run ./crudle serve -t sites/web in local environment or use preferred web server in production

System Architecture

Context

Crudle (CRUD logic extensions) is a meta framework for rapid application development and customization using a modified project template, some predefined coding conventions and a fully-fledged admin backend built with Fomantic UI.

Containers

  • backend (App)
  • codegen (Kit)
  • modules (Ext)

Components

Main page - to provide custom interaction components built for end-users

  • Workspace - view the workspaces created to show favorite menus and widgets
  • Dashboard - view the dashboards created using the dashboard + widgets tool
  • Report - view the reports created with report builder to show query result

Setup page - to provide visibility and customization tools for end-users

  • System - configure general settings and layout (UI) preferences and menus
  • Data Tool - import and/or export data, create/modify domain master models
  • Email Sending - create email notifications, templates, check email queues
  • Data Storage - configure backups and manage file storage and system cache
  • People - add users, user groups, roles and permissions and view user logs
  • Printing - create print styles, print formats and configure print devices

App modules - contains core app functionality like auth, crud, email, map etc

  • backend/database provides tool to interact with DB connection and storage
  • backend/main to define app-level enums and provide reusable app functions
  • backend/listing to display a set of records in multi-record visualization
  • backend/workflow to define approval routing, change triggers and statuses

Ext modules

  • modules/web_cms - to set up a website for data publishing and interaction

Sites

  • sites/config to define global config settings
  • sites/database to define DB scripts and seeds
  • sites/storage to hold shared data & resources
  • sites/web to define global JS and CSS scripts

Technology Stack

Programming Languages and Frameworks

  • PHP 8.0 using Yii2 and JavaScript using jQuery
  • Yii2-crudle dockerized (optional - todo later)
  • Deploy via deployer (optional - todo later)

Templating

  • Twig (to consider)

Databases Supported

  • MySQL 8.0 (or equivalent MariaDB version)
  • SQLite (to be tested)
  • PostgreSQL (todo later)
  • SQLite (offline) (todo later)

UI Frameworks, Components and Libraries

  • Fomantic UI 2.9
  • HTMX 2
  • Fullcalendar 5.11
  • LeafletJS 1.9

Web Servers

  • PHP built-in web server via ./crudle serve -t sites/web (Development)
  • Nginx via PHP-FPM (Production)
  • RoadRunner 2 (todo later)

Process Manager (to consider)

  • Development
  • Production

Job Queues

  • Redis (todo later)

Caching

  • Redis (todo later)

Realtime

  • Web sockets using HTMX 2 (todo later)

Command Line

  • Using built-in commands via console app

Roadmap

Now:

  • Increase the UI layout width, add a pinable sidebar and editable menus
  • Improve all the end-user system tools, app preferences and performance
  • Upgrade to latest Yii2 using PHP 8.0 and MySQL 8.0 and Fomantic UI 2.9

Next:

  • Add multi-tenant (sites) support in template + init script for instances
  • Email templates for sending mails + attachments of documents and reports
  • Print templates and formatting styles (script) for documents and reports
  • Create Yii extensions for the tools and starter kit as composer packages

Later:

  • Write UI, workflows and DB tests using either PestPHP or PHPUnit
  • Use hybrid of Php Auth Manager (predefined) and Db Auth Manager (user-defined)
  • Upgrade to Yii3 (with CycleORM datamapper) using Bulma and Buefy

Want to contribute? Thank you for considering to make a contribution to Crudle. New contributors to improve the solution further or help provide support to issues are most welcome.

License Crudle is released under the BSD-3-Clause.