diff --git a/app/controllers/admin/site_panel_controller.rb b/app/controllers/admin/site_panel_controller.rb
new file mode 100644
index 0000000..95ede01
--- /dev/null
+++ b/app/controllers/admin/site_panel_controller.rb
@@ -0,0 +1,18 @@
+class Admin::SitePanelController < OrbitAdminController
+ def index
+ @site_construct = SiteConstruct.new
+ end
+
+ def create
+ site_construct = SiteConstruct.new(site_construct_params)
+ site_construct.member_id = current_user.id.to_s
+ site_construct.save
+ redirect_to admin_site_panel_path("msg" => "success")
+ end
+
+ private
+
+ def site_construct_params
+ params.require(:site_construct).permit!
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/site_panel_api_controller.rb b/app/controllers/site_panel_api_controller.rb
new file mode 100644
index 0000000..04717f8
--- /dev/null
+++ b/app/controllers/site_panel_api_controller.rb
@@ -0,0 +1,50 @@
+class SitePanelApiController < ApplicationController
+ def index
+ ip = request.remote_ip
+ case ip
+ when "211.72.229.126"
+ type = "Pending"
+ when "211.72.229.122"
+ type = "Store"
+ when "127.0.0.1"
+ type = "Pending"
+ else
+ render :text => "Not a valid IP." and return
+ end
+
+ list = SiteConstruct.where(:server_type => type, :constructed => false)
+ string = ""
+ list.each do |entry|
+ string = string + "#{entry.server_type},#{entry.site_name},#{entry.domain_name},#{entry.port},#{entry.db_name},#{entry.path}\n"
+ end
+ render :text => string
+ end
+
+ def constructed
+ site_id = params[:site_id]
+ ip = request.remote_ip
+ case ip
+ when "211.72.229.126"
+ when "211.72.229.122"
+ when "127.0.0.1"
+ else
+ render :text => "Not a valid IP." and return
+ end
+ site = SiteConstruct.where(:site_name => site_id, :constructed => false).first rescue nil
+ if !site.nil?
+ site.constructed = true
+ site.save
+ user = User.find(site.user_id) rescue nil
+ if !user.nil?
+ email = Email.new
+ email.mail_to = user.member_profile.email
+ email.mail_subject = "#{site.site_name} has been constructed."
+ email.mail_content = "#{site.site_name} has been constructed successfully.
You may access the site at #{site.domain_name}
For any questions, please contact R&D Team.
Thank you."
+ email.deliver
+ end
+ render :text => "success"
+ else
+ render :text => "Site not found. Either it is already constructed or not queued for construction."
+ end
+ end
+end
\ No newline at end of file
diff --git a/app/models/site_construct.rb b/app/models/site_construct.rb
new file mode 100644
index 0000000..fef75fb
--- /dev/null
+++ b/app/models/site_construct.rb
@@ -0,0 +1,19 @@
+class SiteConstruct
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ SERVER_TYPES = ["Pending","Store"]
+ SITE_TYPES = ["School","Gravity"]
+
+ field :server_type
+ field :site_name
+ field :domain_name
+ field :db_name
+ field :port
+ field :path
+ field :site_type
+ field :school_name
+ field :user_id
+ field :constructed, type: Boolean, :default => false
+
+end
\ No newline at end of file
diff --git a/app/views/admin/site_panel/_form.html.erb b/app/views/admin/site_panel/_form.html.erb
new file mode 100644
index 0000000..7124dd5
--- /dev/null
+++ b/app/views/admin/site_panel/_form.html.erb
@@ -0,0 +1,129 @@
+<% content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+<% end %>
+<% content_for :page_specific_javascript do %>
+<% end %>
+<%#= f.error_messages %>
+