<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jack</title>
    <description>The latest articles on DEV Community by Jack (@jack_codes).</description>
    <link>https://dev.to/jack_codes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2354676%2Fcf88fa95-ec06-4925-8719-402d4dc984d3.jpg</url>
      <title>DEV Community: Jack</title>
      <link>https://dev.to/jack_codes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jack_codes"/>
    <language>en</language>
    <item>
      <title>SECURING CONTENT: A Custom Content Management Dashboard.</title>
      <dc:creator>Jack</dc:creator>
      <pubDate>Mon, 05 May 2025 03:20:57 +0000</pubDate>
      <link>https://dev.to/jack_codes/securing-content-a-custom-content-management-dashboard-ajp</link>
      <guid>https://dev.to/jack_codes/securing-content-a-custom-content-management-dashboard-ajp</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/permit_io"&gt;Permit.io Authorization Challenge&lt;/a&gt;: API-First Authorization Reimagined&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a Content Management Dashboard, I was thinking of a customized CMD, where operations are modularized and in the spirit of API-first approach. The application is ready for use, secure and lightweight as it heavily employ API-first methodology. I used  Permit.io to simplify the authorization task here, clear-cut operations, roles, resources, debugging and non-repudiation.&lt;br&gt;
All website managers want to have a view of posts, do CRUD operations on them. Try to retain and engage subscribers using newsletter and discover bugs without touching the always risky terminal and the in-comprehensive cPanels. My application do just that with a possibility to use it side by side with the generic CMS systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The link to github repository:&lt;a href="https://github.com/jackcodes64/cm-dashboard/" rel="noopener noreferrer"&gt;https://github.com/jackcodes64/cm-dashboard/&lt;/a&gt;&lt;br&gt;
My application has 3 tabs in the highest level of abstraction:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login and Home&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Users, writer or admin logs in for authentication, the process also double as a fetch for tokens needed tokens for in-app authorizations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftc1chi2waigd4bck4rap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftc1chi2waigd4bck4rap.png" alt="Image description" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nc06xpqm44df3cdomd2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nc06xpqm44df3cdomd2.png" alt="Image description" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;POST&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the core section of my application. It provides for viewing of posts, updating, deletion, and creation of new post with all needed attributes&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyi3m0g8jifulrp1hdqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyi3m0g8jifulrp1hdqw.png" alt="Image description" width="800" height="383"&gt;&lt;/a&gt;&lt;br&gt;
The post tab further houses the highly powerful ALTER, there you can do the remaining 3 operations. All operations in this section are accessible to all users. Post can be filtered based on categories or specified by the ideally unique heading.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vzhxlb7dkujabomy7b7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vzhxlb7dkujabomy7b7.png" alt="Image description" width="800" height="244"&gt;&lt;/a&gt;&lt;br&gt;
The operations in alter:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0v0lpsijfuyndy2jw6wd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0v0lpsijfuyndy2jw6wd.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;USERS
This table allow for two operations only, read and delete. The delete functionality only accessible to the admin. Its faded out and unusable in writer instances.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftv2vlw3mn4pj1fbwqrgg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftv2vlw3mn4pj1fbwqrgg.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfubgm35l0owpknrqr2q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfubgm35l0owpknrqr2q.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;br&gt;
The CSV file also can be downloaded using the button for email services.&lt;/p&gt;

&lt;p&gt;4.BUGS&lt;br&gt;
This is the last tab, all server side bugs are accessible from here, no need to go stumbling on the server terminal tracing them. The tab is entirely inaccessible to the writer, blotted off and cursor is at "not-allowed".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fif0o6saj86riolu83ccf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fif0o6saj86riolu83ccf.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in admin instance:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6m6vav6f869wuxt0dgbp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6m6vav6f869wuxt0dgbp.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;br&gt;
In the admin instance, the bugs can be marked as resolved:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwihqnl9lp4zjqi3ozz6v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwihqnl9lp4zjqi3ozz6v.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Repo
&lt;/h2&gt;

&lt;p&gt;Github: &lt;a href="https://github.com/jackcodes64/cm-dashboard" rel="noopener noreferrer"&gt;https://github.com/jackcodes64/cm-dashboard&lt;/a&gt;&lt;br&gt;
The link to frontend: &lt;a href="https://cm-dashboard-xbo3.vercel.app/" rel="noopener noreferrer"&gt;https://cm-dashboard-xbo3.vercel.app/&lt;/a&gt;&lt;br&gt;
NOTE: password:2025DEVchallenge, i missed the uppercase C.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Journey
&lt;/h2&gt;

&lt;p&gt;It was after my exams when i realized i need more projects to reinforce my newly acquired backend knowledge. The CMS we were designing for project in class had a lot of authentication and authorization, role-based access, that when i see a SaaS having solved the authorization overhead this comprehensively to let you focus on your project's core logic, i had to experience it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;My project is API heavy and no core operation is done in the frontend. I wanted to develop an application truly dependent on external policies rather than the traditional spaghetti of hardcoded logic.&lt;br&gt;
I had to do research on Permit.io to see if it was feasible having joined late. I then started by fumbling with integration designed. Mulled it over and decided to use pdp as it had a clear example in Permit.io website. &lt;/p&gt;

&lt;p&gt;Chose "quick permit" in the "Connect Environment" section, it was the fastest way to integrate and start having fun.&lt;/p&gt;

&lt;p&gt;I chose node.js language -- it's my runtime environment, allows me to use JavaScript in whole project. &lt;/p&gt;

&lt;p&gt;After the selection of technology to use, a brief but clear and easy to follow instruction proceeded, so clear you're told: "touch test.js". And that's how i tested authorization of "John Doe". Easier than i imagined, but not miraculous ---you have to plumber it right. &lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Was first entrapped in poking of the SDK to do something, later figured out i need to use the cloud hosted PDP. &lt;/li&gt;
&lt;li&gt;Again, for a while i wallowed around my project, trying to figure out errors, only to realize that a detailed Error Log section exploited all possible sources of faults. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What i learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Authorization is not just security, it's UX too.&lt;/li&gt;
&lt;li&gt;API-first authorization is the way to go, almost halves your time in such small projects.&lt;/li&gt;
&lt;li&gt;Dev tasks are better simplified, modularised and re-used: No time wastage in reinventing the wheel.&lt;/li&gt;
&lt;li&gt;Drop the option, don't rely on the user being ethical or responsible.&lt;/li&gt;
&lt;li&gt;Some SaaS like Permit.io, provides for non-repudiation, we can always trace the action back to a user.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  API-First Authorization
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Problem Scope&lt;br&gt;
I needed to design a Content Management Dashboard for two types of users, the admin and the writer(s). The goal was clear, everybody accesses just what they should. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Permission Model&lt;br&gt;
I implemented permission in two levels, in the front end and the back end. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ROLES: newuser/writer, admin&lt;br&gt;
RESOURCES: debugPage, post, and sendEmail &lt;br&gt;
OPERATIONS: All the CRUD operation but on level-based authorization.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;i. Frontend: Basically backend authorization but designed into   a really powerful component - "PermissionGate". I import it into modules and customise it for UX like fading off options inaccessible by the user and having the cursor at "not allowed".
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;ii. Backend&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Installed the SDK into my project directory: npm install 
permitio.&lt;/li&gt;
&lt;li&gt;Imported the Permit module from "permitio".&lt;/li&gt;
&lt;li&gt;Created a permit function from the top level function - Permit.&lt;/li&gt;
&lt;li&gt;Created a checkpoint route attending to permission requirements 
from the frontend--made request using my API key and through 
the PDP.&lt;/li&gt;
&lt;li&gt;Created a permit module for all backend authorizations.
And that's it! Try it, I cannot think of an improvement!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'm very proud of this work. Thank you for reading.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>permitchallenge</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>Farmers' Stethoscope</title>
      <dc:creator>Jack</dc:creator>
      <pubDate>Mon, 24 Mar 2025 06:57:41 +0000</pubDate>
      <link>https://dev.to/jack_codes/farmers-stethoscope-2jp2</link>
      <guid>https://dev.to/jack_codes/farmers-stethoscope-2jp2</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/kendoreact"&gt;KendoReact Free Components Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff3nnijb8vtxy4i4jrzz2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff3nnijb8vtxy4i4jrzz2.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What i built&lt;/strong&gt;&lt;br&gt;
I created a dashboard for farmers to diagnose their crop diseases using AI, plan actions, follow up, get AI insight and other statistics( Market trend and Disease Prevalence) as bonus&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demo&lt;/strong&gt;&lt;br&gt;
Diagnosis page&lt;br&gt;
This is the most important page. It does the actual processing of the image to generate disease and AI insight.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr0oq1mskem6zkwe1blz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr0oq1mskem6zkwe1blz3.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Market&lt;br&gt;
A collapsible markets showing the user market trends and below it an insight from AI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq80u05vbxtrqmevxsbuo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq80u05vbxtrqmevxsbuo.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Disease prevalence&lt;br&gt;
Show the farmer a history of diseases. (I stored these on local storage so may fail after clearing cache, the prompts too got finished too soon)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnixfqznm3e1k2cgyxv8v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnixfqznm3e1k2cgyxv8v.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;br&gt;
Action &lt;br&gt;
In this area, the user can add and remove his actions. Helps the user plan work and follow up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fexjnri5gdmxnfefl6pds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fexjnri5gdmxnfefl6pds.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Auxiliary Sections &lt;br&gt;
These tabs are for further insight. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jackcodes64/disease-detection" rel="noopener noreferrer"&gt;https://github.com/jackcodes64/disease-detection&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;KendoReact Experience&lt;br&gt;
I used these kendoReact components on my job.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;button&lt;/li&gt;
&lt;li&gt;grid&lt;/li&gt;
&lt;li&gt;label&lt;/li&gt;
&lt;li&gt;dropdown&lt;/li&gt;
&lt;li&gt;progressBar&lt;/li&gt;
&lt;li&gt;dateInputs&lt;/li&gt;
&lt;li&gt;popUps&lt;/li&gt;
&lt;li&gt;theme&lt;/li&gt;
&lt;li&gt;card&lt;/li&gt;
&lt;li&gt;input&lt;/li&gt;
&lt;li&gt;form&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AIm to Impress&lt;br&gt;
I used OpenAI for the analysis and response.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>kendoreactchallenge</category>
      <category>react</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
