How softdevhassan/minilara works
1. Overall shape
This repository is a small PHP application/framework hybrid: a minimal core under app/core, Blade-based presentation under app/src, database schema management under app/database, and a thin web entrypoint at the project root.
2. Request entrypoints
There are two primary runtime paths:
- Web requests start at index.php and are typically rewritten through .htaccess.
- CLI commands start at bin/minilara, which likely dispatches to the framework console for migrations, seeding, running the dev server, and key generation.
3. Framework core boundary
The core runtime lives in app/core and is intentionally compact:
- Framework.php is the likely bootstrap/orchestration layer.
- Router.php handles request-to-handler matching.
- DB.php wraps database access, probably through Eloquent/Illuminate.
- Console.php powers command-line operations.
- Installer.php and DevTool.php suggest setup and developer utilities.
- functions.php likely contains shared helper functions used across the system.
4. HTTP and routing flow
Incoming HTTP requests are routed by the core router to application handlers and views. The repository does not show a traditional controller layer, so routing likely maps directly to Blade pages or lightweight handlers in the app/src/pages and app/api areas.
5. Presentation layer
UI templates are organized under app/src:
- layout/ contains the shared shell, navbar data, and breadcrumb partials.
- pages/ is segmented by feature area: auth, main app pages, manage screens, error pages, and print templates.
- This layout implies server-rendered pages with reusable Blade templates rather than a client-heavy SPA.
6. Asset and frontend pipeline
Frontend code is split into:
- app/src/assets/css/app.css
- app/src/assets/js/app.js
These are built with vite.config.js, and the presence of package.json/pnpm-lock.yaml indicates a Node-based asset pipeline. The README also indicates Tailwind CSS, Alpine.js, and jQuery are part of the frontend stack.
7. API boundary
app/api/search.php is a separate API endpoint outside the page-rendering structure. This suggests the app has at least one direct data endpoint for asynchronous search use, isolated from the Blade page flow.
8. Data layer
Database evolution is handled through app/database/migrations, with seed data in app/database/seeds. The presence of a users table and settings table migration, plus AdminUserSeeder.php, shows the app expects authentication and configuration data to exist at bootstrap or install time.
9. Auth, permissions, and module configuration
The config directory contains modules.php and permissions.php, which indicates the app is built around feature/module toggles and role or permission checks. Combined with the auth pages and user management screens, this suggests an admin-oriented system with access control as a first-class boundary.
10. Localization and validation
app/lang/en/validation.php shows framework-level validation messages are localized and stored separately from views and business logic. This supports the use of Illuminate validation in the request lifecycle.
11. PWA and public delivery
app/public contains manifest.json, sw.js, and image assets, which means the app includes a Progressive Web App layer. Static assets and service worker behavior are served as part of the public web surface, alongside the normal HTML responses.
12. Operational/admin surface
The page structure includes home, profile, settings, users, and manage/user, which points to an internal admin/ERP-style application rather than a public consumer site. The prints/ templates further indicate a document-generation path for reports or ledger-style output.
13. External technology boundaries
The architecture is backed by Laravel ecosystem components, but in a stripped-down form: Eloquent ORM, Blade rendering, validation, Symfony HTTP foundation, and FastRoute-style routing. Composer manages PHP dependencies; pnpm/Vite manage frontend dependencies and builds.
14. Typical end-to-end flow
A request enters through the web root, is bootstrapped by the framework core, matched by the router, optionally checks auth/permissions, reads or writes data through the DB layer, and returns either a Blade-rendered page, a print template, or a small API response. CLI tasks follow a separate path through the console subsystem into migrations, seeding, or environment/tooling commands.
Main entry points: Router.php Router · Console.php Console · Framework.php Framework · app.blade.php Shell
Components 23
Entrypoints
Web and CLI runtime entry paths
Core
Framework bootstrap, routing, console, and shared services
- Framework · Bootstraps the app and coordinates runtime services
app/core/Framework.php - Router · Matches requests to pages or handlers
app/core/Router.php - DB · Database access wrapper
app/core/DB.php - Console · Dispatches framework commands
app/core/Console.php - Installer · Initial setup and installation flow
app/core/Installer.php - DevTool · Developer utilities and local tooling
app/core/DevTool.php - Helpers · Common helper functions used across the app
app/core/functions.php - Search API · Standalone search endpoint
app/api/search.php
UI
Blade templates and frontend assets
- Shell · Shared application shell and navigation
app/src/layout/app.blade.php - Auth pages · Login and authentication screens
app/src/pages/auth/login.blade.php - Main pages · Home, profile, settings, and users screens
app/src/pages/main/home.blade.php - Manage pages · Administrative management screens
app/src/pages/manage/user.blade.php - Prints · Report and document rendering templates
app/src/pages/prints/reports/dummy.blade.php - Errors · HTTP error screens
app/src/pages/errors/404.blade.php - Assets · CSS, JS, and Vite-built frontend assets
app/src/assets/js/app.js
Data
Schema, seeds, localization, and public delivery assets
- Migrations · Database schema evolution scripts
app/database/migrations/2023_01_01_000001_create_users_table.php - Seeders · Bootstrap data for installation and admin access
app/database/seeds/AdminUserSeeder.php - Validation · Localized validation strings
app/lang/en/validation.php - PWA public · Manifest, service worker, and published static assets
app/public/manifest.json
Config
App feature and permission configuration
- Access config · Module and permission definitions
app/config/permissions.php
Connections 27
- .htaccess → index.php: rewrite to · Web requests are routed to the front controller
- index.php → Framework: boot · HTTP entrypoint initializes the framework
- minilara → Console: dispatch · CLI entrypoint sends commands to the console subsystem
- Framework → Router: routes · Framework delegates request matching
- Framework → DB: uses · Framework accesses the database layer
- Framework → Helpers: shares · Framework and app code rely on common helpers
- Router → Auth pages: serves · Routes can resolve to auth pages
- Router → Main pages: serves · Routes can resolve to main screens
- Router → Manage pages: serves · Routes can resolve to management screens
- Router → Prints: serves · Routes can resolve to print templates
- Router → Errors: falls back to · Router can surface error pages
- Router → Search API: exposes · Routing also exposes a direct search API endpoint
- Console → Installer: runs · Console powers setup workflows
- Console → DevTool: runs · Console powers developer utilities
- Console → Migrations: applies · CLI is used to run schema changes
- Console → Seeders: seeds · CLI initializes baseline data
- Main pages → Shell: wraps with · Main screens share the application shell
- Auth pages → Shell: wraps with · Auth screens use the shared layout
- Manage pages → Shell: wraps with · Management screens use the shared layout
- Prints → Shell: formats with · Print templates still share common structure where needed
- Shell → Assets: loads · Shared layout pulls in frontend assets
- Assets → PWA public: ships with · Built frontend is delivered with public static assets
- DB → Migrations: evolves via · Database schema is defined by migrations
- DB → Seeders: initializes via · Database starts with seeded records
- Validation → Framework: supports · Validation messages support request handling
- Access config → Manage pages: guards · Permissions govern admin-facing screens
- Access config → Main pages: guards · Permissions govern authenticated app screens