26
Nov

DIY DOMAINING MARKETPLACE SERIES PART IV-1/2: Designing the Admin dashboard, with a bulk template publisher.

Part IV

Welcome to part IV of our series “Domaining DIY Challenge: Your Own Domain Marketplace” (Part I is here, Part II, Part III, Github repository checkpoint is here ).

The idea is to be able to paste up to 100 domains into a textarea, choose the Marketplace name,  Choose the template (as per part III but with a little enhancement this time) and then click a button that will invoke a PHP script ( don’t worry, we will build it together ) which will publish the landing pages across the chosen domains.

Feel free to suggest additional functionalities and at the end of the series we will try to accommodate them.

Now, for the requirements:

Requirements for our Admin bulk publisher.

Requirements for our Admin bulk publisher.

Let’s look at our requirements, one by one:

R0: This is the label that will say “Please paste domain(s) below. html component: label. id: “please-paste-label”.

R1:  Domains will be separated by a carriage return ( enter key ).

R2: A validation will be needed here before we invoke the bulk publisher: Maximum of 100 domains per run.

R3: This is the textarea of which one will be able to paste their domains.The textarea component is a a html textarea; id: “pasted-domains”. Knowing these variables will make it easier to understand the source code a little bit later on, still within this article.

R4: Label that says “Marketplace name”; html component: label; id: “label-market-name”.

R5:This value will set the page title (browser tab). No SEO metas will be considered here giving this is an admin dashboard, so there is no need to rank.

R6: Label that will contain the phrase “Please choose template”; html component: label; id: “label-template”

R7. This will be the drop down menu of which one can choose which template is to be published. For now we have only one template in our gallery (Part III). There will be a slight modification in the template, and that is so we can proper replace a few strings so the page is intelligent enough to match the domain name in its content, where is relevant.

R8. Publish button. By clicking in this element a few things should occur before we allow the action to be performed:

R8-V1: Validation logic 1: There must be at least one domain in the textarea, and a maximum of 100. Anything outside this range should produce a error message, which will be either “Please paste at least one domain” or “Please paste a maximum of 100 domains”.

R8-V2: Validation logic 2: Domains must be separated by a carriage return. So the logic here needs to also eliminate white spaces (trim) and invalid characters such a comma with a price (please see R8-V3).

R8-V3: The price will be fetched from the json file we created in Part II. However, at the end of the series we will be making an enhancement here where it will allow the user to input domains as such (Domain1.com ; $999 ; footer message ; POS link message ; marketplace name ; and any other variable combination you wish to place here – this will also serve as hook for the upcoming article “Control your domain using REST APIs” which will be part of the series “Creating the ultimate Domaining server”. ). But for now we will be eliminating extra characters and spaces because the price will be fetched from the POS .json file.

R8-V4: The script invoked is called bulk-publish-custom-domain-market.php and resides in the server side. We will be taking additional security measures here.

OK. Now that we’ve got our requirements, here’s the assumptions that will drive the way we approach this challenge:

Please note while assumptions in this article is for this article only, the assumptions in Part I are global assumptions for Parts I..X.

Assumption 1: Your server is either cpanel-based ( hosting account ) or cloud-based ( AWS or Google cloud ). It’s OK if your cloud based is also cpanel-based.

Assumption 2: The Linux stack we will be using is CentOS7 ( which is FREE ).

Assumption 3: Your webserver is either Apache or nginx ( please let me know if you have a different architecture and it might be possible to adjust the .php to support your weirdness :-).

Assumption 4: All assumptions in Part I are still true for this and all other parts.

OK then, Let’s get technical ! 

Here’s the HTML and the CSS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html>

<head> </head>

<body>
<div class="c1426">DomainOverflow.com's DIY Challenge, Build your own Domain Marketplace PART IV: Admin dashboard</div>
<div class="blk-row"><div class="blk1">
<form class="form" onSubmit="return PreValidation()" method="post" action ="bulk-publish-custom-domain-market.php">
<div class="form-group"><label class="label">Please paste domain(s) below:</label></div>

<textarea class="textarea" required ></textarea><!-- the required keyword makes the input mandatory, easing our post-validation-->

<div class="blk-row"></div><br/>
<div class="form-group">
<label class="label">Marketplace name:</label><input required class="input" placeholder="Please enter marketplace name"/></div><br/>
<div class="form-group"><label class="label">Please choose template</label>
<select requirede class="select"><option>- Please choose template -</option>
<option value="1">Template from PART II, of this series</option></select></div><div class="form-group"></div><br/><div class="form-group">
<button class="button" type="submit">Click here to publish marketplace</button></div>

</form>

</div></div><div class="blk-row"></div>

<script>

function PreValidation () {

//console.log ("besides empty validation, all other validations will take place on the server side, for your convenience but most importantly: security.");
}

</script>

<style>*{
box-sizing: border-box;
}

body{
margin:0;
}

.blk1{
width:100%;
padding-top:10px;
padding-right:10px;
padding-bottom:10px;
padding-left:10px;
min-height:75px;
}

.c1426{
padding:10px;
text-align:center;
font-family:Verdana, Geneva, sans-serif;
font-size:40px;
padding-top:10px;
padding-right:10px;
padding-bottom:10px;
padding-left:10px;
}

.form{
text-align:center;
font-family:Verdana, Geneva, sans-serif;
font-size:21px;
background-color:rgb(20, 74, 229);
color:white;
}

.textarea{
width:380px;
height:200px;
}
.button{
width:450px;
height:40px;
font-family:Verdana, Geneva, sans-serif;
color:white;
background-color:rgb(133, 0, 0);
font-size:16px;
}
*{box-sizing:border-box;}
body{
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
margin-left:0px;
}
</style>

( click here for the live version link ).

Now, let’s analyse what’s missing:

Missing 1: Logic on the server side to handle input validation and if valid,  bulk publish across the chosen domain, using chosen template.

Missing 2: Website publishing gateway: This is the main reason why PART IV will have two articles. This is Part IV 1/2. Part IV 2/2 will follow shortly.

Before we code the publishing gateway, it is important to remember that this can be achieved in many different ways, so we will elect the most common contexts and support

it fully:

-Domains are in a cpanel-based hosting account ( most registrars ).  This also comprises Cloud ( AWS  , Google Cloud ) IF you happen to run cpanel on your domaining server that is hosted up in the cloud.

-Cloud-based ( i.e.: AWS and Google Cloud )

-Non-cloud without cpanel in a Linux server running Apache as the webserver ( FREE ).

-Cpanel/WHM ( shared, private, vps and cloud ).

-Any Linux-based webserver (shared, private, vps and cloud).

-Any Windows-based webserver ( If under the cloud- Azure included ).

-Github Free-Hosting ( Please don’t try to deploy an entire marketplace in GitHub’s free hosting, unless you wish to be famous very quickly).

-a POST or GET mechanism in a custom context ( you may route freely if using Dotboss.digital’s REST API ) .

Hopefully you now understand why PART IV will have 1 and 2. The publishing gateway is complex but worthy.

We will be covering the above, shortly in PART IV Part 2/2. I didn’t want to add confusion, but given the complexity

of the publishing gateway it is wiser to split, so we can categorize this article as Easy Complexity, and the next a bit higher.

The last thing: Our open-source repository has been updated all the way up to today, feel free to create other branches.

Alternative:

This is the section where I tell you that you could achieve the above much quicker, but using Dotboss.digital:

Video: Creating the Admin dashboard using Dotboss.Digital’s Website builder tailored for Domainers in 3 minutes and 21 seconds.

Video: Applying templates across multiple domains using Dotboss.Digital’s Content Management to publish 100 domains in 2 minutes and 34 seconds.

Study: Using Dotboss.digital’s REST API to register, publish, apply bulk dns functions, buy and sell using your own routing hub or GUI wrapping these APIs.

Picture: Designing the Admin dashboard alternatively.

I hope you will find this useful, and get ready for the next series’ part , where we will be wrapping the above with a bulk domain adder and publishing mechanism using PHP.

Thanks for reading.

s

 

Tags:

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz

%d bloggers like this: