Skip to content

Commit 1d2f744

Browse files
committed
updated content
1 parent e8a34b6 commit 1d2f744

16 files changed

Lines changed: 276 additions & 1 deletion

docs/book/v1/admin/introduction.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Introduction
22

3+
## Summary
4+
5+
An overview of Dotkernel Admin, a skeleton application for quickly building a database-backed administration site with reports, graphs, and a PSR-compliant middleware stack.
6+
7+
## Details
8+
39
Dotkernel Admin is an application (skeleton) intended for quickly setting up an administration site for your platform.
410

511
Dotkernel Admin:
@@ -9,3 +15,14 @@ Dotkernel Admin:
915
- Contains many graphical components to ensure an intuitive user experience.
1016
- Has a PSR-Compliant Middleware Stack to promote a lean, modular architecture and create a common ground between components from various sources.
1117
- Implements [PSR-7](https://www.php-fig.org/psr/psr-7/) (HTTP message interfaces) and [PSR-15](https://www.php-fig.org/psr/psr-15/) (HTTP Server Request Handlers) as defined by the [PHP Framework Interop Group](https://www.php-fig.org/).
18+
19+
## FAQ
20+
21+
**Q: What is Dotkernel Admin?**
22+
A: It's a skeleton application for quickly setting up an administration site to manage records in your database.
23+
24+
**Q: Does Dotkernel Admin include reporting features?**
25+
A: Yes, it has built-in reports and graphs to help you monitor your platform.
26+
27+
**Q: What standards does Dotkernel Admin implement?**
28+
A: PSR-7 and PSR-15, as defined by the PHP Framework Interop Group (PHP-FIG).

docs/book/v1/admin/usage.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Usage
22

3+
## Summary
4+
5+
Explains how Dotkernel Admin fits alongside Dotkernel API and Dotkernel Queue, and how you can start with Admin alone and add the other components later.
6+
7+
## Details
8+
39
Dotkernel Admin can be installed independently or together with other applications in the Dotkernel suite, based on your business requirements.
410
These components are designed to complement each other (out-of-box they are separate codebases):
511

@@ -14,3 +20,14 @@ Later on you can add:
1420

1521
- Dotkernel API to handle all data manipulation.
1622
- Dotkernel Queue for its asynchronous task processing.
23+
24+
## FAQ
25+
26+
**Q: Can Dotkernel Admin be used on its own?**
27+
A: Yes, it can be installed independently and integrated into your existing platform.
28+
29+
**Q: Are Dotkernel Admin, API, and Queue part of the same codebase?**
30+
A: No, out of the box they are separate codebases designed to complement each other.
31+
32+
**Q: What do Dotkernel API and Dotkernel Queue add to Admin?**
33+
A: The API handles data manipulation for the platform, and Queue handles asynchronous task processing.

docs/book/v1/api/introduction.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Introduction
22

3+
## Summary
4+
5+
An overview of Dotkernel API, the Mezzio-based REST API at the root of the Dotkernel Headless Platform, and its PSR-compliant, standards-based architecture.
6+
7+
## Details
8+
39
Dotkernel API is a REST API based on the Mezzio skeleton.
410
The API is the root or the Dotkernel Headless Platform.
511

@@ -8,3 +14,14 @@ Dotkernel API:
814
- Ensures that you build a cohesive system that contains an API-first backend with the same architecture and standards support as other Dotkernel tools and applications.
915
- Has a PSR-Compliant Middleware Stack to promote a lean, modular architecture and create a common ground between components from various sources.
1016
- Implements [PSR-7](https://www.php-fig.org/psr/psr-7/) (HTTP message interfaces) and [PSR-15](https://www.php-fig.org/psr/psr-15/) (HTTP Server Request Handlers) as defined by the [PHP Framework Interop Group](https://www.php-fig.org/).
17+
18+
## FAQ
19+
20+
**Q: What is Dotkernel API built on?**
21+
A: It's a REST API based on the Mezzio skeleton.
22+
23+
**Q: What role does Dotkernel API play in the Headless Platform?**
24+
A: It is the root of the Dotkernel Headless Platform.
25+
26+
**Q: What standards does Dotkernel API implement?**
27+
A: PSR-7 and PSR-15, as defined by the PHP Framework Interop Group (PHP-FIG).

docs/book/v1/api/usage.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Usage
22

3+
## Summary
4+
5+
Explains how Dotkernel API fits alongside Dotkernel Admin and Dotkernel Queue, and how to start with API alone and add the other components later.
6+
7+
## Details
8+
39
Dotkernel API can be installed independently or together with other applications in the Dotkernel suite, based on your business requirements.
410
These components are designed to complement each other (out-of-box they are separate codebases):
511

@@ -17,3 +23,14 @@ Later on you can add:
1723

1824
- Dotkernel Admin for its simple table-based approach, its reports and graphs.
1925
- Dotkernel Queue for its asynchronous task processing.
26+
27+
## FAQ
28+
29+
**Q: Should I start with Dotkernel API or Admin?**
30+
A: Starting with Dotkernel API is a safe bet since it can manage access permissions to keep your data secure.
31+
32+
**Q: How does Dotkernel API separate admin and regular users?**
33+
A: Admin-level users create and edit the data, while regular users read the data for your frontend.
34+
35+
**Q: What can I add to Dotkernel API later?**
36+
A: Dotkernel Admin for its table-based management, reports and graphs, and Dotkernel Queue for asynchronous task processing.

docs/book/v1/config-provider/benefits.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Benefits
22

3+
## Summary
4+
5+
Lists the benefits of using a ConfigProvider, including centralized, modular, container-friendly, and testable configuration.
6+
7+
## Details
8+
39
- **Centralized setup** – Instead of hardcoding bootstrap code, you declare it in a config provider so it's easy to read, change, or extend.
410
- **Modular** – Each package can ship with its own config without interfering with others.
511
- **Container-friendly** – It works well with frameworks using DI containers like Laminas ServiceManager, PHP-DI, or Pimple.
@@ -8,3 +14,14 @@
814
- **Testability** - The consistent, central configuration promotes isolated (e.g. per-module) testing, easier swapping of dependencies and the assertion of pipeline setup (e.g. check if a config key is present).
915

1016
> **Dotkernel ConfigProviders** have to be **added manually** in `config/config.php`, because all the initial ConfigProviders required to install the applications are already injected.
17+
18+
## FAQ
19+
20+
**Q: Why use a ConfigProvider instead of hardcoding bootstrap code?**
21+
A: It centralizes configuration so it's easy to read, change, or extend.
22+
23+
**Q: Does a ConfigProvider work with dependency injection containers?**
24+
A: Yes, it's container-friendly and works with DI containers like Laminas ServiceManager, PHP-DI, or Pimple.
25+
26+
**Q: Do I need to register Dotkernel ConfigProviders manually?**
27+
A: Yes, Dotkernel ConfigProviders must be added manually in `config/config.php`.

docs/book/v1/config-provider/functionality.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# How the ConfigProvider works
22

3+
## Summary
4+
5+
Walks through how the ConfigProvider is picked up during bootstrap, merged, resolved, and executed within the Mezzio middleware pipeline.
6+
7+
## Details
8+
39
The ConfigProvider is automatically picked up by the framework during application bootstrap.
410
Let's look at it step by step:
511

@@ -21,3 +27,14 @@ $config = $container->get('config')['key'] ?? [];
2127
Below you can see how Mezzio and Dotkernel merge and use ConfigProviders to build the middleware pipeline and dependencies.
2228

2329
![Headless Platform with Core Submodule](https://docs.dotkernel.org/img/headless-platform/ConfigProvider.png)
30+
31+
## FAQ
32+
33+
**Q: When is the ConfigProvider picked up?**
34+
A: Automatically, by the framework during application bootstrap.
35+
36+
**Q: What happens during the "Resolve item" step?**
37+
A: `$app->pipe()` resolves a service name from the container, wraps a middleware array, or calls a closure/invokable object.
38+
39+
**Q: Why does the error-handling middleware run last in the pipeline?**
40+
A: So it can catch any exceptions raised by the preceding middleware.

docs/book/v1/config-provider/introduction.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Introduction
22

3+
## Summary
4+
5+
Introduces the `ConfigProvider` class, what it returns, and how it's used across Dotkernel applications and packages, with a code example.
6+
7+
## Details
8+
39
In PHP, the `ConfigProvider` is a class that is part of an application's bootstrap process.
410
It returns an array of configuration, settings, or anything else your application needs.
511
In Dotkernel, each application module and package contains a `ConfigProvider` that normally returns:
@@ -51,3 +57,14 @@ All Dotkernel applications and packages use ConfigProviders:
5157
- [Dotkernel Frontend](https://docs.dotkernel.org/frontend-documentation/)
5258
- [Dotkernel Light](https://docs.dotkernel.org/light-documentation/)
5359
- [Dotkernel Packages](https://docs.dotkernel.org/packages/)
60+
61+
## FAQ
62+
63+
**Q: What does a ConfigProvider return in Dotkernel?**
64+
A: Dependency injection mappings, request handlers, and template file paths.
65+
66+
**Q: Which Dotkernel applications use ConfigProviders?**
67+
A: Dotkernel API, Admin, Frontend, Light, and Packages all use ConfigProviders.
68+
69+
**Q: Is the Dotkernel ConfigProvider approach specific to Dotkernel?**
70+
A: No, it follows an approach similar to Laminas/Mezzio.

docs/book/v1/core/benefits.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Benefits of the Core Submodule
22

3+
## Summary
4+
5+
Lists the benefits the Core submodule pattern provides as your platform grows, such as scalability and easier onboarding.
6+
7+
## Details
8+
39
This design pattern ensures:
410

511
- Design flexibility.
@@ -10,3 +16,14 @@ This design pattern ensures:
1016

1117
As your platform expands, each new application connects to the Dotkernel Headless Platform via the central API which services everything the other applications require.
1218
This ensures consistency throughout your platform, while allowing any number of outside connections as requirements arise.
19+
20+
## FAQ
21+
22+
**Q: How does the Core submodule pattern help as a platform grows?**
23+
A: It provides design flexibility and scalability suited for both enterprise and smaller applications.
24+
25+
**Q: Can multiple developers work on the platform using this pattern?**
26+
A: Yes, it allows splitting the work across multiple developers.
27+
28+
**Q: How do new applications connect to the platform?**
29+
A: Each new application connects via the central API, which services everything the other applications require.

docs/book/v1/core/creation.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Creating a Core Submodule
22

3+
## Summary
4+
5+
A step-by-step guide to turning the Core module into a Git submodule, including adding, committing, and initializing/updating it.
6+
7+
## Instructions
8+
39
The full steps for creating a submodule are described in [Git Tools – Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
410

511
> There is already a Core module in some of the Dotkernel applications, but it works like any other module (App, Page, or User).
@@ -38,3 +44,17 @@ git submodule update
3844
```
3945

4046
> Do not forget to delete the existing Core module before adding the submodule to other applications.
47+
48+
## FAQ
49+
50+
**Q: Where can I find the full steps for creating a Git submodule?**
51+
A: In the official Git documentation, [Git Tools – Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
52+
53+
**Q: What command creates a submodule in an application?**
54+
A: `git submodule add <url>`, using the URL of the new Core repository.
55+
56+
**Q: How do I get the submodule after cloning the project?**
57+
A: Run `git submodule init` followed by `git submodule update`.
58+
59+
**Q: Should I keep the existing Core module after adding the submodule?**
60+
A: No, delete the existing Core module before adding the submodule to other applications.

docs/book/v1/core/introduction.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Introduction
22

3+
## Summary
4+
5+
Introduces the Core submodule as the shared codebase and single source of truth for database entities across Dotkernel applications.
6+
7+
## Details
8+
39
The Core submodule is a common codebase set up to be used by the Dotkernel applications you added to your project.
410
The project setup may differ - e.g. two APIs, one Admin, 3 Frontends - but the Core submodule can be included in all of them.
511

@@ -13,3 +19,14 @@ General rules:
1319
- The current location of the Core submodule is `src/Core`.
1420

1521
[Shared Core Submodule in Dotkernel Headless Platform](https://www.dotkernel.com/headless-platform/shared-core-submodule-in-dotkernel-headless-platform/)
22+
23+
## FAQ
24+
25+
**Q: Can the same Core submodule be used across multiple applications?**
26+
A: Yes, it can be included in any combination of APIs, Admins, and Frontends in your project.
27+
28+
**Q: What is the golden rule for the Core codebase?**
29+
A: It's the only place that manages the database entities.
30+
31+
**Q: Where is the Core submodule located?**
32+
A: At `src/Core`.

0 commit comments

Comments
 (0)