Skip to content

Repository files navigation

Areacore-wave

Areacore

A lightweight, extensible PHP framework for both web applications and CLI services.

PHPLast CommitVisitorsGitHub stars


✨ Features

  • Lightweight — Minimal footprint, no unnecessary overhead
  • Optimized — Built for performance from the ground up
  • Small Size — Tiny codebase, easy to understand and audit
  • Web & CLI Support — First-class support for HTTP applications and background services/scripts
  • Flexible — Works with MVC, ADR, or any custom structure you prefer

📦 Installation

Clone directly from GitHub:

git clone https://github.com/imseyed/AreaCore.git
cd AreaCore

🏗️ Architecture: Action-Based Architecture (ABA)

Areacore uses an Action-Based Architecture, where every route maps directly to an action — a file, a method, a function, or an inline closure. This keeps the flow explicit and traceable.

Request Lifecycle

Client

└─▶ index.php
└─▶ Router
├─▶ File (e.g. blog/blog-show.php)
├─▶ Static method (e.g. Blog::show())
├─▶ Controller method (e.g. Controller::blog_show())
├─▶ Object method (e.g. [$blog, 'show'])
└─▶ Inline closure (function() { ... })

Routing Examples

php

// Route to a file
Router::get("[blogPost]/{blog.post.ID}/add/{title}")
->page("blog/blog-show.php");
// Route to a static method
Router::get("[blogPost]/{blog.post.ID}/add/{title}")
->call('Blog::show_blog');
// Route to an object method
Router::get("[blogPost]/{blog.post.ID}/add/{title}")
->call([$blog, 'show_blog_obj']);
// Route to an inline closure
Router::get("[blogPost]/{blog.post.ID}/add/{title}")
->call(function () {
echotime();
});

Flexibility: MVC vs ADR

The same routing system supports both patterns — choose what fits your project.

MVC Pattern

// Controller handles the request, Model fetches data, View renders output
Router::get('/blog/{id}')->call('BlogController::show');
// BlogController.phpclass BlogController {
publicstaticfunctionshow(int$id): void {
$post = Blog::find($id); // Model
View::render('blog/show', $post); // View
}
}

ADR Pattern (Action–Domain–Responder)

// Each action is a single-responsibility class or file
Router::get('/blog/{id}')->page('actions/blog/Show-blog-action.php');
// Show-blog-action.php$post = newBlog($id); // Domain
BlogResponder::respond($post); // Responder

Both patterns are fully supported. You can even mix them per route.


📋 Requirements

RequirementVersion
PHP>= 8.1
PDOEnabled

No additional dependencies required.

Note: Areacore is designed to run in both web server environments (Apache, Nginx, Caddy, PHP built-in server) and CLI environments — including cron jobs, queue workers, daemons, and background service scripts.


📚 Documentation

DocumentDescription
Project StructureDirectory layout and file organization
RouterFull routing API reference
ORMDatabase layer and model usage
Quick StartStep-by-step getting started guide
ContributingHow to contribute to Areacore

📄 License

The Laravel framework is open-sourced software licensed under the MIT license.

About

A lightweight, extensible PHP framework for both web applications and CLI services.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages