Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/App/templates/JSON-LD/index.jsonld.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"url": "{{ absolute_url('/') }}",
"name": "Dotkernel",
"description": "Dotkernel is a collection of open-source application skeletons built on Mezzio and Laminas - pre-configured and ready for anything from a presentation site to an enterprise-grade API.",
"publisher": { "@id": "{{ absolute_url('/') }}#organization" }
"publisher": {
"@id": "{{ absolute_url('/') }}#organization"
}
},
{
"@type": "Organization",
Expand Down
2 changes: 1 addition & 1 deletion src/App/templates/app/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
{% for post in posts %}
<a class="post-card" href="{{ url('page::blog-resource', {categorySlug: post.category.slug, slug: post.slug}) }}">
<div class="post-date">{{ post.postDate|date('M d, Y') }}</div>
<h4>{{ post.title }}</h4>
<h3>{{ post.title }}</h3>
<p>{{ post.excerpt }}</p>
<span class="read-more">Read more →</span>
</a>
Expand Down
3 changes: 1 addition & 2 deletions src/App/templates/error/404.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
{% block content %}
<div class="page-intro home-intro error-messages">
<div class="container">
<h2>Oops!</h2>
<h2>This is awkward.</h2>
<span class="eyebrow">Oops! This is awkward.</span>
<h1>404</h1>
<p class="text-dark">
You are looking for something that doesn't exist or may have moved. Check out one of the links on this page
Expand Down
3 changes: 1 addition & 2 deletions src/App/templates/error/error.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
{% block content %}
<div class="page-intro home-intro error-messages">
<div class="container">
<h2>Oops!</h2>
<h2>This is awkward.</h2>
<span class="eyebrow">Oops! This is awkward.</span>
<h1>{{ status }}</h1>
<h2 class="message">{{ reason }}</h2>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/App/templates/partial/meta.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta property="og:image" content="{{ meta.image ?? app.meta.image }}"/>
<meta property="og:type" content="{{ meta.type ?? app.meta.type }}"/>
<meta property="og:site_name" content="{{ app.meta.siteName }}"/>
<meta property="og:url" content="{{ meta.url ?? app.meta.url }}"/>
<meta property="og:url" content="{{ meta.url ?? url(routeName ?? null) }}"/>
<meta property="og:locale" content="{{ app.meta.locale }}"/>

<meta name="twitter:card" content="{{ app.meta.twitterCard }}"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Blog/templates/page/author-resource.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<path d="M14 4v6h6"/>
</svg>
<span class="post-card-kicker">{{ post.category.name }}</span>
<h4>{{ post.title }}</h4>
<h2>{{ post.title }}</h2>
<p>{{ post.excerpt|length > 200 ? post.excerpt|slice(0, 200)|trim ~ '…' : post.excerpt }}</p>
<span class="post-card-meta">{{ post.postDate|date('M d, Y') }}</span>
<span class="read-more">Read more →</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<article class="article">
<div class="entry">
<h3>Seamlessly Interconnected Middleware for Enterprise-Level Solutions</h3>
<h2>Seamlessly Interconnected Middleware for Enterprise-Level Solutions</h2>

<p class="mb-3">The request lifecycle is the sequence of steps that happen from the moment a user makes an HTTP request until the server sends back a response. </p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cache
<pre><strong>Name:</strong> bugtraq:url
<strong>Propriety:</strong> http://www.dotkernel.net/view.php?id=%BUGID%</pre>
For <strong>above</strong> Proprieties , apply <strong>only</strong> to project folder, <strong>NOT</strong> recursive
<h3>Final step( below instructions are good <strong>only</strong> for <strong>svn:keywords</strong> )</h3>
<h2>Final step( below instructions are good <strong>only</strong> for <strong>svn:keywords</strong> )</h2>
&nbsp;

Check the <strong>Apply property recursively to:</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<article class="article">
<div class="entry">
<h1></h1>
<h2></h2>

<p class="mb-3">Content negotiation is an important aspect of RESTful APIs to make it possible for diverse systems to work seamlessly together. It's based on enabling clients and servers to agree on the format and language of data they exchange.</p>

Expand Down Expand Up @@ -75,7 +75,7 @@
<li>or <strong>resource URI patterns</strong>.</li>
</ul>

<h4><a href="#http-request-headers"></a>HTTP Request Headers</h4>
<h3><a href="#http-request-headers"></a>HTTP Request Headers</h3>

<p class="mb-3">The HTTP request headers <code>Content-Type</code> and <code>Accept</code> are used to determine the data format that will be sent in the request and the response. There are several types to choose from. Here are some examples:</p>

Expand All @@ -99,7 +99,7 @@ Accept: application/json</pre>

<p class="mb-3">If the <code>Accept</code> header is not present, the server gets to decide the format of the response.</p>

<h4><a href="#content-negotiation-using-url-patterns"></a>Content Negotiation using URL Patterns</h4>
<h3><a href="#content-negotiation-using-url-patterns"></a>Content Negotiation using URL Patterns</h3>

<p class="mb-3">Below are a couple of ways to communicate a preferred data format.</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
<blockquote><p class="mb-3">Dotkernel API has come a long way since this post was created. <a href="https://www.dotkernel.com/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5/" data-type="link" data-id="https://www.dotkernel.com/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5/">Check out the newest version of Dotkernel API</a> to stay up to date with the latest functional and security features.</p>
</blockquote>

<h4><a href="https://github.com/dotkernel/api/releases/tag/v1.0.0">DotKernel API 1.0.0</a> was just released!</h4>
<h2><a href="https://github.com/dotkernel/api/releases/tag/v1.0.0">DotKernel API 1.0.0</a> was just released!</h2>
<p class="mb-3"> </p>
<h5>What is DotKernel API?</h5>
<h3>What is DotKernel API?</h3>
<p class="mb-3">It is a <a href="https://github.com/zendframework/zend-expressive">Zend Expressive 3</a> application aiming to help developers quickly and efficiently develop an API.</p>
<p class="mb-3"> </p>
<h5>How does it work?</h5>
<h3>How does it work?</h3>
<p class="mb-3">Under the hood it uses the following libraries:</p>
<ul>
<li><a href="https://github.com/ezimuel/zend-expressive-api">ezimuel/zend-expressive-api</a>: - skeleton application on which this API is based on</li>
Expand All @@ -54,7 +54,7 @@
<li><a href="https://github.com/swagger-api/swagger-ui">swagger-api/swagger-ui</a>: ^3.22 - for creating OpenAPI 3 documentation</li>
</ul>
<p class="mb-3"> </p>
<h5>What does it offer?</h5>
<h3>What does it offer?</h3>
<p class="mb-3">Out-of-the-box, DotKernel API provides the following features:</p>
<ul>
<li>Secure authentication via OAuth2</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="entry">
<strong>This article covers the basic authorization of a Client application which use a backend built using </strong><a href="https://github.com/dotkernel/api" target="_blank" rel="noopener noreferrer"><strong>DotKernel API</strong></a>

<h3>Authorization Request</h3>
<h2>Authorization Request</h2>
Client application users send a <strong>POST</strong> request to the backend containing the following JSON object:
<pre>
{
Expand All @@ -45,7 +45,7 @@ Client application users send a <strong>POST</strong> request to the backend con
}
</pre>

<h3>Authorization Response</h3>
<h2>Authorization Response</h2>
If the credentials are correct, the <strong>API</strong> will return a <strong>JSON</strong> object containing the authentication data:
<pre>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<article class="article">
<div class="entry">
<strong>This article covers the basic authorization of a Server Side application  built using <a href="https://github.com/dotkernel/api" target="_blank" rel="noopener noreferrer">DotKernel API</a></strong>
<h3>Protecting an endpoint</h3>
<h2>Protecting an endpoint</h2>
<ul>
<li><strong>no-auth:</strong> the resource can be accessed without the need of authentication/authorization</li>
<li><strong>authentication</strong>: the resource can be accessed only by authenticated users</li>
Expand Down Expand Up @@ -67,20 +67,20 @@ Under the key <strong>roles </strong> you can define role inheritance. In the ab
<strong><em>Of course, this setup is just a model, you should not use it in live projects because guests will end up having the same rights as admins.</em></strong>

Under the key <strong>permissions </strong>you can define which routes are accessible to a role. In the above example, a <strong>member </strong> has access to the routes named <strong>avatar</strong>, <strong>users </strong>and <strong>user</strong>.
<h4>1. No-auth endpoints:</h4>
<h3>1. No-auth endpoints:</h3>
These endpoints can be accessed without authentication/authorization. Examples could be: <em>login</em>, <em>register</em>, <em>contact </em>etc...
Creating a route for such an endpoint will use only the handler(s) responsible for returning the content:

<pre>
$app->get('/users', UserHandler::class, 'users');
</pre>
<h4>2. Endpoints requiring Authentication:</h4>
<h3>2. Endpoints requiring Authentication:</h3>
These endpoints can be accessed only if a valid <code>Bearer token</code> is present in the request headers. Else, the API will return a <code>**401 Unauthorized**</code> response. Creating a route for such an endpoint will have a structure similar to the following example:

<pre>
$app->get('/users', , 'users');
</pre>
<h4>3. Endpoints requiring Authorization:</h4>
<h3>3. Endpoints requiring Authorization:</h3>
These endpoints can be accessed only if a valid <code> Bearer token</code> is present in the request headers. Else, the API will return a <code>**403 Forbidden**</code> response. Creating a route for such an endpoint will have a structure similar to the following example:

<pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
<blockquote><p class="mb-3">The table below refers to <a href="https://github.com/dotkernel/api/tree/7.0" data-type="link" data-id="https://github.com/dotkernel/api/tree/7.0" target="_blank" rel="noreferrer noopener">Dotkernel API V7</a></p>
</blockquote>

<figure><div class="table-responsive"><table class="table table-bordered table-sm"><thead><tr><th></th><th><strong>API Tools (formerly Apigility)</strong></th><th><strong>Dotkernel API</strong></th></tr></thead><tbody><tr><td>URL</td><td><a href="https://api-tools.getlaminas.org/" target="_blank" rel="noreferrer noopener">api-tools</a></td><td><a href="https://www.dotkernel.org" target="_blank" rel="noreferrer noopener">Dotkernel API</a></td></tr><tr><td>First Release</td><td>2012</td><td>2018</td></tr><tr><td>PHP Version</td><td>&lt;= 8.2</td><td><img src="https://img.shields.io/packagist/php-v/dotkernel/api" alt="PHP Version"></td></tr><tr><td>Architecture</td><td>MVC, Event Driven</td><td>Middleware</td></tr><tr><td>OSS Lifecycle</td><td>Archived</td><td><img src="https://img.shields.io/osslifecycle/dotkernel/api?style=flat&amp;label=" alt="OSS Lifecycle"></td></tr><tr><td>Style</td><td>REST, RPC</td><td>REST</td></tr><tr><td>Versioning</td><td>Yes</td><td>Deprecations (API Evolution) *</td></tr><tr><td>Documentation</td><td>Swagger (Automated)</td><td>Postman (<em>Manual</em>), OpenAPI 3.0 (Swagger)</td></tr><tr><td>Content-Negotiation</td><td>Custom</td><td>Custom</td></tr><tr><td>License</td><td>BSD-3</td><td>MIT</td></tr><tr><td>Default DB Layer</td><td>laminas-db</td><td>doctrine-orm 3.x</td></tr><tr><td>Authorization</td><td>ACL</td><td>RBAC-guard</td></tr><tr><td>Authentication</td><td>HTTP Basic/Digest OAuth2.0</td><td>OAuth2.0</td></tr><tr><td>CI/CD</td><td>Yes</td><td>Yes</td></tr><tr><td>Unit Tests</td><td>Yes</td><td>Yes</td></tr><tr><td>Code (Endpoint) Generator</td><td>Yes</td><td><a href="https://docs.dotkernel.org/dot-maker/v1/overview/" target="_blank" rel="noreferrer noopener">dot-maker</a></td></tr><tr><td>PSR</td><td>PSR-7</td><td>PSR-7, PSR-15</td></tr></tbody></table></div></figure>
<div class="table-responsive"><table class="table table-bordered table-sm"><thead><tr><th></th><th><strong>API Tools (formerly Apigility)</strong></th><th><strong>Dotkernel API</strong></th></tr></thead><tbody><tr><td>URL</td><td><a href="https://api-tools.getlaminas.org/" target="_blank" rel="noreferrer noopener">api-tools</a></td><td><a href="https://www.dotkernel.org" target="_blank" rel="noreferrer noopener">Dotkernel API</a></td></tr><tr><td>First Release</td><td>2012</td><td>2018</td></tr><tr><td>PHP Version</td><td>&lt;= 8.2</td><td><img src="https://img.shields.io/packagist/php-v/dotkernel/api" alt="PHP Version"></td></tr><tr><td>Architecture</td><td>MVC, Event Driven</td><td>Middleware</td></tr><tr><td>OSS Lifecycle</td><td>Archived</td><td><img src="https://img.shields.io/osslifecycle/dotkernel/api?style=flat&amp;label=" alt="OSS Lifecycle"></td></tr><tr><td>Style</td><td>REST, RPC</td><td>REST</td></tr><tr><td>Versioning</td><td>Yes</td><td>Deprecations (API Evolution) *</td></tr><tr><td>Documentation</td><td>Swagger (Automated)</td><td>Postman (<em>Manual</em>), OpenAPI 3.0 (Swagger)</td></tr><tr><td>Content-Negotiation</td><td>Custom</td><td>Custom</td></tr><tr><td>License</td><td>BSD-3</td><td>MIT</td></tr><tr><td>Default DB Layer</td><td>laminas-db</td><td>doctrine-orm 3.x</td></tr><tr><td>Authorization</td><td>ACL</td><td>RBAC-guard</td></tr><tr><td>Authentication</td><td>HTTP Basic/Digest OAuth2.0</td><td>OAuth2.0</td></tr><tr><td>CI/CD</td><td>Yes</td><td>Yes</td></tr><tr><td>Unit Tests</td><td>Yes</td><td>Yes</td></tr><tr><td>Code (Endpoint) Generator</td><td>Yes</td><td><a href="https://docs.dotkernel.org/dot-maker/v1/overview/" target="_blank" rel="noreferrer noopener">dot-maker</a></td></tr><tr><td>PSR</td><td>PSR-7</td><td>PSR-7, PSR-15</td></tr></tbody></table></div></figure>

<h4>Note</h4>
<h2>Note</h2>

<blockquote><ul><li>Versioning is replaced by <a href="https://docs.dotkernel.org/api-documentation/v6/tutorials/api-evolution/" target="_blank" rel="noreferrer noopener">Deprecations</a>, using evolution strategy</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

<article class="article">
<div class="entry">
<h1></h1>
<h2></h2>

<p class="mb-3">Dotkernel API has received a lot of love from our developers, with regular updates to the platform for years. We use Dotkernel API in our projects, so any bugs and issues are addressed as soon as they are found. Still, it's not unlikely that some hidden issues remain in fringe use cases that we simply haven't explored. The occurrence of bugs increases when the API is used in a complex frontend project.</p>

<p class="mb-3">Fatal errors are easily found in the API logs, but it's another matter altogether to deal with incorrect data processing that doesn't generate errors in the frontend that interfaces with the API. The error reporting endpoint was designed to allow the <strong>frontend developers</strong> of your API to report any bugs they encounter in a secure way that is fully under your control.</p>

<h4>Example case usage</h4>
<h2>Example case usage</h2>

<ul><li>Frontend developed in Angular.</li>

Expand All @@ -47,7 +47,7 @@

<p class="mb-3">Error reporting is done by sending a <strong>POST</strong> request to the <code>/error-report</code> endpoint, together with a <strong>token</strong> in the header. In the sections below we will detail how to configure error reporting in your API and how the endpoint is used by the frontend developers.</p>

<h4>Generating a token and adding it to your API config</h4>
<h3>Generating a token and adding it to your API config</h3>

<p class="mb-3">First you need to generate a token for your request. This is done by using the below command.</p>

Expand All @@ -62,7 +62,7 @@
]
]</pre>

<h4>Validation mechanism</h4>
<h3>Validation mechanism</h3>

<p class="mb-3">Behind the scenes, the API validates your configuration and lets you know if any config items prevent the submission of the error report. Below are the requirements for an application to be able to send error messages to Dotkernel API.</p>

Expand Down Expand Up @@ -97,7 +97,7 @@

<p class="mb-3">If your request passes all the checks, the message is saved in the log file specified in <code>ErrorReportServiceInterface::class</code> . <code>path</code>.</p>

<h5>Tips and tricks</h5>
<h3>Tips and tricks</h3>

<p class="mb-3">If there are multiple applications that report errors to your API, you can <strong>assign a different error reporting token</strong> for each. The tokens support key-value pairs where:</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<article class="article">
<div class="entry">
<h5>This article will walk you through the process of implementing MailChimp into your instance of <a href="https://github.com/dotkernel/api">DotKernel API</a> using <a href="https://github.com/drewm/mailchimp-api">drewm/mailchimp-api</a></h5>
<h2>This article will walk you through the process of implementing MailChimp into your instance of <a href="https://github.com/dotkernel/api">DotKernel API</a> using <a href="https://github.com/drewm/mailchimp-api">drewm/mailchimp-api</a></h2>
&nbsp;

<strong>Step 1</strong>: Add the library to your application using the following command:
Expand Down
Loading