You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2015/05/01 23:33:37 UTC

[50/57] [partial] airavata-php-gateway git commit: AIRAVATA 1632 + Job Description for Admin Dashboard

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/app.php
----------------------------------------------------------------------
diff --git a/app/config/app.php b/app/config/app.php
new file mode 100755
index 0000000..39aee38
--- /dev/null
+++ b/app/config/app.php
@@ -0,0 +1,194 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Application Debug Mode
+	|--------------------------------------------------------------------------
+	|
+	| When your application is in debug mode, detailed error messages with
+	| stack traces will be shown on every error that occurs within your
+	| application. If disabled, a simple generic error page is shown.
+	|
+	*/
+
+	'debug' => true,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Application URL
+	|--------------------------------------------------------------------------
+	|
+	| This URL is used by the console to properly generate URLs when using
+	| the Artisan command line tool. You should set this to the root of
+	| your application so that it is used when running Artisan tasks.
+	|
+	*/
+
+	'url' => 'http://localhost',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Application Timezone
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify the default timezone for your application, which
+	| will be used by the PHP date and date-time functions. We have gone
+	| ahead and set this to a sensible default for you out of the box.
+	|
+	*/
+
+	'timezone' => 'UTC',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Application Locale Configuration
+	|--------------------------------------------------------------------------
+	|
+	| The application locale determines the default locale that will be used
+	| by the translation service provider. You are free to set this value
+	| to any of the locales which will be supported by the application.
+	|
+	*/
+
+	'locale' => 'en',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Application Fallback Locale
+	|--------------------------------------------------------------------------
+	|
+	| The fallback locale determines the locale to use when the current one
+	| is not available. You may change the value to correspond to any of
+	| the language folders that are provided through your application.
+	|
+	*/
+
+	'fallback_locale' => 'en',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Encryption Key
+	|--------------------------------------------------------------------------
+	|
+	| This key is used by the Illuminate encrypter service and should be set
+	| to a random, 32 character string, otherwise these encrypted strings
+	| will not be safe. Please do this before deploying an application!
+	|
+	*/
+
+	'key' => 'tez6xP65a0BGj1ZtX7PPfYhC9OIW9AjS',
+
+	'cipher' => MCRYPT_RIJNDAEL_128,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Autoloaded Service Providers
+	|--------------------------------------------------------------------------
+	|
+	| The service providers listed here will be automatically loaded on the
+	| request to your application. Feel free to add your own services to
+	| this array to grant expanded functionality to your applications.
+	|
+	*/
+
+	'providers' => array(
+
+		'Illuminate\Foundation\Providers\ArtisanServiceProvider',
+		'Illuminate\Auth\AuthServiceProvider',
+		'Illuminate\Cache\CacheServiceProvider',
+		'Illuminate\Session\CommandsServiceProvider',
+		'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
+		'Illuminate\Routing\ControllerServiceProvider',
+		'Illuminate\Cookie\CookieServiceProvider',
+		'Illuminate\Database\DatabaseServiceProvider',
+		'Illuminate\Encryption\EncryptionServiceProvider',
+		'Illuminate\Filesystem\FilesystemServiceProvider',
+		'Illuminate\Hashing\HashServiceProvider',
+		'Illuminate\Html\HtmlServiceProvider',
+		'Illuminate\Log\LogServiceProvider',
+		'Illuminate\Mail\MailServiceProvider',
+		'Illuminate\Database\MigrationServiceProvider',
+		'Illuminate\Pagination\PaginationServiceProvider',
+		'Illuminate\Queue\QueueServiceProvider',
+		'Illuminate\Redis\RedisServiceProvider',
+		'Illuminate\Remote\RemoteServiceProvider',
+		'Illuminate\Auth\Reminders\ReminderServiceProvider',
+		'Illuminate\Database\SeedServiceProvider',
+		'Illuminate\Session\SessionServiceProvider',
+		'Illuminate\Translation\TranslationServiceProvider',
+		'Illuminate\Validation\ValidationServiceProvider',
+		'Illuminate\View\ViewServiceProvider',
+		'Illuminate\Workbench\WorkbenchServiceProvider',
+
+	),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Service Provider Manifest
+	|--------------------------------------------------------------------------
+	|
+	| The service provider manifest is used by Laravel to lazy load service
+	| providers which are not needed for each request, as well to keep a
+	| list of all of the services. Here, you may set its storage spot.
+	|
+	*/
+
+	'manifest' => storage_path().'/meta',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Class Aliases
+	|--------------------------------------------------------------------------
+	|
+	| This array of class aliases will be registered when this application
+	| is started. However, feel free to register as many as you wish as
+	| the aliases are "lazy" loaded so they don't hinder performance.
+	|
+	*/
+
+	'aliases' => array(
+
+		'App'             => 'Illuminate\Support\Facades\App',
+		'Artisan'         => 'Illuminate\Support\Facades\Artisan',
+		'Auth'            => 'Illuminate\Support\Facades\Auth',
+		'Blade'           => 'Illuminate\Support\Facades\Blade',
+		'Cache'           => 'Illuminate\Support\Facades\Cache',
+		'ClassLoader'     => 'Illuminate\Support\ClassLoader',
+		'Config'          => 'Illuminate\Support\Facades\Config',
+		'Controller'      => 'Illuminate\Routing\Controller',
+		'Cookie'          => 'Illuminate\Support\Facades\Cookie',
+		'Crypt'           => 'Illuminate\Support\Facades\Crypt',
+		'DB'              => 'Illuminate\Support\Facades\DB',
+		'Eloquent'        => 'Illuminate\Database\Eloquent\Model',
+		'Event'           => 'Illuminate\Support\Facades\Event',
+		'File'            => 'Illuminate\Support\Facades\File',
+		'Form'            => 'Illuminate\Support\Facades\Form',
+		'Hash'            => 'Illuminate\Support\Facades\Hash',
+		'HTML'            => 'Illuminate\Support\Facades\HTML',
+		'Input'           => 'Illuminate\Support\Facades\Input',
+		'Lang'            => 'Illuminate\Support\Facades\Lang',
+		'Log'             => 'Illuminate\Support\Facades\Log',
+		'Mail'            => 'Illuminate\Support\Facades\Mail',
+		'Paginator'       => 'Illuminate\Support\Facades\Paginator',
+		'Password'        => 'Illuminate\Support\Facades\Password',
+		'Queue'           => 'Illuminate\Support\Facades\Queue',
+		'Redirect'        => 'Illuminate\Support\Facades\Redirect',
+		'Redis'           => 'Illuminate\Support\Facades\Redis',
+		'Request'         => 'Illuminate\Support\Facades\Request',
+		'Response'        => 'Illuminate\Support\Facades\Response',
+		'Route'           => 'Illuminate\Support\Facades\Route',
+		'Schema'          => 'Illuminate\Support\Facades\Schema',
+		'Seeder'          => 'Illuminate\Database\Seeder',
+		'Session'         => 'Illuminate\Support\Facades\Session',
+		'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait',
+		'SSH'             => 'Illuminate\Support\Facades\SSH',
+		'Str'             => 'Illuminate\Support\Str',
+		'URL'             => 'Illuminate\Support\Facades\URL',
+		'Validator'       => 'Illuminate\Support\Facades\Validator',
+		'View'            => 'Illuminate\Support\Facades\View',
+
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/app_config.ini
----------------------------------------------------------------------
diff --git a/app/config/app_config.ini b/app/config/app_config.ini
new file mode 100644
index 0000000..d70d26e
--- /dev/null
+++ b/app/config/app_config.ini
@@ -0,0 +1,91 @@
+;--------------------------------------- Identity Server Constants ----------------------
+
+;Admin Role Name
+admin-role-name = "admin"
+;Gateway User Role
+gateway-admin = "Internal/everyone"
+
+;Tenant admin's username
+admin-username = "test@testphprg.scigap.org"
+
+;Tenant admin's password
+admin-password = "testadmin@scigap.org"
+
+;Identity server domain
+server = "idp.scigap.org"
+
+;Identity server web services endpoint
+service-url = "https://idp.scigap.org:7443/services/"
+
+;Gateway Domain Name 
+gateway-id = "default"
+
+;Path the to server certificate file
+cafile-path = "/resources/security/idp_scigap_org.pem"
+
+;Enable HTTPS server verification
+verify-peer = true
+
+;Allow self signed server certificates
+allow-self-signed = false
+
+;--------------------------------------- Airavata Constants ----------------------
+
+
+;development
+airavata-port = 9930;
+airavata-server = 'gw111.iu.xsede.org'
+
+;production
+;airavata-server = 'gw127.iu.xsede.org'
+;airavata-port = 8930; 
+
+airavata-timeout = 100000;
+experiment-data-root = '/../experimentData/'
+ssh-user = 'root'
+data-path = 'file://home/pga/production/experimentData/'
+experiment-data-root-absolute = '/var/www/experimentData/'
+;USER_STORE = 'WSO2','XML','USER_API'
+user-store = "WSO2"
+admin-role = "admin"
+gateway-admin-role = "gateway_admin"
+user-role = "Internal/everyone"
+;identity server roles assigned for Gateway
+gateway-role-prepend = "gateway_"
+gateway-role-admin-append = "_admin"
+req-url = 'https://gw111.iu.xsede.org:8443/credential-store/acs-start-servlet'
+gateway-name = 'PHP-Reference-Gateway'
+email = 'admin@gw120.iu.xsede.org'
+;file size in MB
+server-allowed-file-size = 64
+
+;Credential Store Token
+credential-store-token = "bdc612fe-401e-4684-88e9-317f99409c45"
+
+;----------------------------------------- Experiment Defaults --------------------
+
+;default Queue name 
+queue-name = 'normal'
+;default Node Count
+node-count = '1'
+;default Total Core Count
+total-cpu-count = '4'
+;default Wall Time Limit
+wall-time-limit = '30'
+
+
+user-role = "Internal/everyone"
+;identity server roles assigned for Gateway
+gateway-role-prepend = "gateway_"
+gateway-role-admin-append = "_admin"
+req-url = 'https://gw111.iu.xsede.org:8443/credential-store/acs-start-servlet'
+gateway-name = 'PHP-Reference-Gateway'
+email = 'admin@gw120.iu.xsede.org'
+;file size in MB
+server-allowed-file-size = 64
+
+;Credential Store Token
+credential-store-token = 'bdc612fe-401e-4684-88e9-317f99409c45'
+
+;Advanced Experiment Options available
+advanced-experiment-options = true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/app_config.ini.template
----------------------------------------------------------------------
diff --git a/app/config/app_config.ini.template b/app/config/app_config.ini.template
new file mode 100644
index 0000000..3ec74f0
--- /dev/null
+++ b/app/config/app_config.ini.template
@@ -0,0 +1,74 @@
+;--------------------------------------- Identity Server Constants ----------------------
+
+;Admin Role Name
+admin-role-name = "admin"
+;Gateway User Role
+gateway-admin = "Internal/everyone"
+
+;Tenant admin's username
+admin-username = “$username”
+
+;Tenant admin's password
+admin-password = “$password”
+
+;Identity server domain
+server = "idp.scigap.org"
+
+;Identity server web services endpoint
+service-url = "https://idp.scigap.org:7443/services/"
+
+;Gateway Domain Name 
+gateway-id = “$gatewayname”
+
+;Path the to server certificate file
+cafile-path = "/resources/security/idp_scigap_org.pem"
+
+;Enable HTTPS server verification
+verify-peer = true
+
+;Allow self signed server certificates
+allow-self-signed = false
+
+;--------------------------------------- Airavata Constants ----------------------
+
+
+;development
+airavata-port = 9930;
+airavata-server = 'gw111.iu.xsede.org'
+
+;production
+;airavata-server = 'gw127.iu.xsede.org'
+;airavata-port = 8930; 
+
+airavata-timeout = 100000;
+experiment-data-root = '/../experimentData/'
+ssh-user = 'root'
+data-path = 'file://home/pga/production/experimentData/'
+experiment-data-root-absolute = '/var/www/experimentData/'
+;USER_STORE = 'WSO2','XML','USER_API'
+user-store = "WSO2"
+admin-role = "admin"
+gateway-admin-role = "gateway_admin"
+user-role = "Internal/everyone"
+;identity server roles assigned for Gateway
+gateway-role-prepend = "gateway_"
+gateway-role-admin-append = "_admin"
+req-url = 'https://gw111.iu.xsede.org:8443/credential-store/acs-start-servlet'
+gateway-name = 'PHP-Reference-Gateway'
+email = 'admin@gw120.iu.xsede.org'
+;file size in MB
+server-allowed-file-size = 64
+
+;Credential Store Token
+credential-store-token="811351f3-7484-4931-b354-24881e7963e9"
+
+;----------------------------------------- Experiment Defaults --------------------
+
+;default Queue name 
+queue-name = 'long'
+;default Node Count
+node-count = '1'
+;default Total Core Count
+total-cpu-count = '4'
+;default Wall Time Limit
+wall-time-limit = '30'

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/auth.php
----------------------------------------------------------------------
diff --git a/app/config/auth.php b/app/config/auth.php
new file mode 100755
index 0000000..eacbbfa
--- /dev/null
+++ b/app/config/auth.php
@@ -0,0 +1,71 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Authentication Driver
+	|--------------------------------------------------------------------------
+	|
+	| This option controls the authentication driver that will be utilized.
+	| This driver manages the retrieval and authentication of the users
+	| attempting to get access to protected areas of your application.
+	|
+	| Supported: "database", "eloquent"
+	|
+	*/
+
+	'driver' => 'eloquent',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Authentication Model
+	|--------------------------------------------------------------------------
+	|
+	| When using the "Eloquent" authentication driver, we need to know which
+	| Eloquent model should be used to retrieve your users. Of course, it
+	| is often just the "User" model but you may use whatever you like.
+	|
+	*/
+
+	'model' => 'User',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Authentication Table
+	|--------------------------------------------------------------------------
+	|
+	| When using the "Database" authentication driver, we need to know which
+	| table should be used to retrieve your users. We have chosen a basic
+	| default value but you may easily change it to any table you like.
+	|
+	*/
+
+	'table' => 'users',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Password Reminder Settings
+	|--------------------------------------------------------------------------
+	|
+	| Here you may set the settings for password reminders, including a view
+	| that should be used as your password reminder e-mail. You will also
+	| be able to set the name of the table that holds the reset tokens.
+	|
+	| The "expire" time is the number of minutes that the reminder should be
+	| considered valid. This security feature keeps tokens short-lived so
+	| they have less time to be guessed. You may change this as needed.
+	|
+	*/
+
+	'reminder' => array(
+
+		'email' => 'emails.auth.reminder',
+
+		'table' => 'password_reminders',
+
+		'expire' => 60,
+
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/cache.php
----------------------------------------------------------------------
diff --git a/app/config/cache.php b/app/config/cache.php
new file mode 100755
index 0000000..34e5bf0
--- /dev/null
+++ b/app/config/cache.php
@@ -0,0 +1,89 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Cache Driver
+	|--------------------------------------------------------------------------
+	|
+	| This option controls the default cache "driver" that will be used when
+	| using the Caching library. Of course, you may use other drivers any
+	| time you wish. This is the default when another is not specified.
+	|
+	| Supported: "file", "database", "apc", "memcached", "redis", "array"
+	|
+	*/
+
+	'driver' => 'apc',
+
+	/*
+	|--------------------------------------------------------------------------
+	| File Cache Location
+	|--------------------------------------------------------------------------
+	|
+	| When using the "file" cache driver, we need a location where the cache
+	| files may be stored. A sensible default has been specified, but you
+	| are free to change it to any other place on disk that you desire.
+	|
+	*/
+
+	'path' => storage_path().'/cache',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Database Cache Connection
+	|--------------------------------------------------------------------------
+	|
+	| When using the "database" cache driver you may specify the connection
+	| that should be used to store the cached items. When this option is
+	| null the default database connection will be utilized for cache.
+	|
+	*/
+
+	'connection' => null,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Database Cache Table
+	|--------------------------------------------------------------------------
+	|
+	| When using the "database" cache driver we need to know the table that
+	| should be used to store the cached items. A default table name has
+	| been provided but you're free to change it however you deem fit.
+	|
+	*/
+
+	'table' => 'cache',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Memcached Servers
+	|--------------------------------------------------------------------------
+	|
+	| Now you may specify an array of your Memcached servers that should be
+	| used when utilizing the Memcached cache driver. All of the servers
+	| should contain a value for "host", "port", and "weight" options.
+	|
+	*/
+
+	'memcached' => array(
+
+		array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
+
+	),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Cache Key Prefix
+	|--------------------------------------------------------------------------
+	|
+	| When utilizing a RAM based store such as APC or Memcached, there might
+	| be other applications utilizing the same cache. So, we'll specify a
+	| value to get prefixed to all our keys so we can avoid collisions.
+	|
+	*/
+
+	'prefix' => 'laravel',
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/compile.php
----------------------------------------------------------------------
diff --git a/app/config/compile.php b/app/config/compile.php
new file mode 100755
index 0000000..d5e5518
--- /dev/null
+++ b/app/config/compile.php
@@ -0,0 +1,18 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Additional Compiled Classes
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify additional classes to include in the compiled file
+	| generated by the `artisan optimize` command. These should be classes
+	| that are included on basically every request into the application.
+	|
+	*/
+
+
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/database.php
----------------------------------------------------------------------
diff --git a/app/config/database.php b/app/config/database.php
new file mode 100755
index 0000000..3498fa8
--- /dev/null
+++ b/app/config/database.php
@@ -0,0 +1,124 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| PDO Fetch Style
+	|--------------------------------------------------------------------------
+	|
+	| By default, database results will be returned as instances of the PHP
+	| stdClass object; however, you may desire to retrieve records in an
+	| array format for simplicity. Here you can tweak the fetch style.
+	|
+	*/
+
+	'fetch' => PDO::FETCH_CLASS,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Database Connection Name
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify which of the database connections below you wish
+	| to use as your default connection for all database work. Of course
+	| you may use many connections at once using the Database library.
+	|
+	*/
+
+	'default' => 'mysql',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Database Connections
+	|--------------------------------------------------------------------------
+	|
+	| Here are each of the database connections setup for your application.
+	| Of course, examples of configuring each database platform that is
+	| supported by Laravel is shown below to make development simple.
+	|
+	|
+	| All database work in Laravel is done through the PHP PDO facilities
+	| so make sure you have the driver for your particular database of
+	| choice installed on your machine before you begin development.
+	|
+	*/
+
+	'connections' => array(
+
+		'sqlite' => array(
+			'driver'   => 'sqlite',
+			'database' => __DIR__.'/../database/production.sqlite',
+			'prefix'   => '',
+		),
+
+		'mysql' => array(
+			'driver'    => 'mysql',
+			'host'      => 'localhost',
+			'database'  => 'forge',
+			'username'  => 'forge',
+			'password'  => '',
+			'charset'   => 'utf8',
+			'collation' => 'utf8_unicode_ci',
+			'prefix'    => '',
+		),
+
+		'pgsql' => array(
+			'driver'   => 'pgsql',
+			'host'     => 'localhost',
+			'database' => 'forge',
+			'username' => 'forge',
+			'password' => '',
+			'charset'  => 'utf8',
+			'prefix'   => '',
+			'schema'   => 'public',
+		),
+
+		'sqlsrv' => array(
+			'driver'   => 'sqlsrv',
+			'host'     => 'localhost',
+			'database' => 'database',
+			'username' => 'root',
+			'password' => '',
+			'prefix'   => '',
+		),
+
+	),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Migration Repository Table
+	|--------------------------------------------------------------------------
+	|
+	| This table keeps track of all the migrations that have already run for
+	| your application. Using this information, we can determine which of
+	| the migrations on disk haven't actually been run in the database.
+	|
+	*/
+
+	'migrations' => 'migrations',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Redis Databases
+	|--------------------------------------------------------------------------
+	|
+	| Redis is an open source, fast, and advanced key-value store that also
+	| provides a richer set of commands than a typical key-value systems
+	| such as APC or Memcached. Laravel makes it easy to dig right in.
+	|
+	*/
+
+	'redis' => array(
+
+		'cluster' => false,
+
+		'default' => array(
+			'host'     => '127.0.0.1',
+			'port'     => 6379,
+			'database' => 0,
+		),
+
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/local/app.php
----------------------------------------------------------------------
diff --git a/app/config/local/app.php b/app/config/local/app.php
new file mode 100755
index 0000000..c56fcb9
--- /dev/null
+++ b/app/config/local/app.php
@@ -0,0 +1,18 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Application Debug Mode
+	|--------------------------------------------------------------------------
+	|
+	| When your application is in debug mode, detailed error messages with
+	| stack traces will be shown on every error that occurs within your
+	| application. If disabled, a simple generic error page is shown.
+	|
+	*/
+
+	'debug' => true,
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/local/database.php
----------------------------------------------------------------------
diff --git a/app/config/local/database.php b/app/config/local/database.php
new file mode 100755
index 0000000..fbcb95a
--- /dev/null
+++ b/app/config/local/database.php
@@ -0,0 +1,47 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Database Connections
+	|--------------------------------------------------------------------------
+	|
+	| Here are each of the database connections setup for your application.
+	| Of course, examples of configuring each database platform that is
+	| supported by Laravel is shown below to make development simple.
+	|
+	|
+	| All database work in Laravel is done through the PHP PDO facilities
+	| so make sure you have the driver for your particular database of
+	| choice installed on your machine before you begin development.
+	|
+	*/
+
+	'connections' => array(
+
+		'mysql' => array(
+			'driver'    => 'mysql',
+			'host'      => 'localhost',
+			'database'  => 'homestead',
+			'username'  => 'homestead',
+			'password'  => 'secret',
+			'charset'   => 'utf8',
+			'collation' => 'utf8_unicode_ci',
+			'prefix'    => '',
+		),
+
+		'pgsql' => array(
+			'driver'   => 'pgsql',
+			'host'     => 'localhost',
+			'database' => 'homestead',
+			'username' => 'homestead',
+			'password' => 'secret',
+			'charset'  => 'utf8',
+			'prefix'   => '',
+			'schema'   => 'public',
+		),
+
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/mail.php
----------------------------------------------------------------------
diff --git a/app/config/mail.php b/app/config/mail.php
new file mode 100755
index 0000000..76fd9e4
--- /dev/null
+++ b/app/config/mail.php
@@ -0,0 +1,124 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Mail Driver
+	|--------------------------------------------------------------------------
+	|
+	| Laravel supports both SMTP and PHP's "mail" function as drivers for the
+	| sending of e-mail. You may specify which one you're using throughout
+	| your application here. By default, Laravel is setup for SMTP mail.
+	|
+	| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log"
+	|
+	*/
+
+	'driver' => 'smtp',
+
+	/*
+	|--------------------------------------------------------------------------
+	| SMTP Host Address
+	|--------------------------------------------------------------------------
+	|
+	| Here you may provide the host address of the SMTP server used by your
+	| applications. A default option is provided that is compatible with
+	| the Mailgun mail service which will provide reliable deliveries.
+	|
+	*/
+
+	'host' => 'smtp.mailgun.org',
+
+	/*
+	|--------------------------------------------------------------------------
+	| SMTP Host Port
+	|--------------------------------------------------------------------------
+	|
+	| This is the SMTP port used by your application to deliver e-mails to
+	| users of the application. Like the host we have set this value to
+	| stay compatible with the Mailgun e-mail application by default.
+	|
+	*/
+
+	'port' => 587,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Global "From" Address
+	|--------------------------------------------------------------------------
+	|
+	| You may wish for all e-mails sent by your application to be sent from
+	| the same address. Here, you may specify a name and address that is
+	| used globally for all e-mails that are sent by your application.
+	|
+	*/
+
+	'from' => array('address' => null, 'name' => null),
+
+	/*
+	|--------------------------------------------------------------------------
+	| E-Mail Encryption Protocol
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify the encryption protocol that should be used when
+	| the application send e-mail messages. A sensible default using the
+	| transport layer security protocol should provide great security.
+	|
+	*/
+
+	'encryption' => 'tls',
+
+	/*
+	|--------------------------------------------------------------------------
+	| SMTP Server Username
+	|--------------------------------------------------------------------------
+	|
+	| If your SMTP server requires a username for authentication, you should
+	| set it here. This will get used to authenticate with your server on
+	| connection. You may also set the "password" value below this one.
+	|
+	*/
+
+	'username' => null,
+
+	/*
+	|--------------------------------------------------------------------------
+	| SMTP Server Password
+	|--------------------------------------------------------------------------
+	|
+	| Here you may set the password required by your SMTP server to send out
+	| messages from your application. This will be given to the server on
+	| connection so that the application will be able to send messages.
+	|
+	*/
+
+	'password' => null,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Sendmail System Path
+	|--------------------------------------------------------------------------
+	|
+	| When using the "sendmail" driver to send e-mails, we will need to know
+	| the path to where Sendmail lives on this server. A default path has
+	| been provided here, which will work well on most of your systems.
+	|
+	*/
+
+	'sendmail' => '/usr/sbin/sendmail -bs',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Mail "Pretend"
+	|--------------------------------------------------------------------------
+	|
+	| When this option is enabled, e-mail will not actually be sent over the
+	| web and will instead be written to your application's logs files so
+	| you may inspect the message. This is great for local development.
+	|
+	*/
+
+	'pretend' => false,
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/queue.php
----------------------------------------------------------------------
diff --git a/app/config/queue.php b/app/config/queue.php
new file mode 100755
index 0000000..940a4cd
--- /dev/null
+++ b/app/config/queue.php
@@ -0,0 +1,85 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Queue Driver
+	|--------------------------------------------------------------------------
+	|
+	| The Laravel queue API supports a variety of back-ends via an unified
+	| API, giving you convenient access to each back-end using the same
+	| syntax for each one. Here you may set the default queue driver.
+	|
+	| Supported: "sync", "beanstalkd", "sqs", "iron", "redis"
+	|
+	*/
+
+	'default' => 'sync',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Queue Connections
+	|--------------------------------------------------------------------------
+	|
+	| Here you may configure the connection information for each server that
+	| is used by your application. A default configuration has been added
+	| for each back-end shipped with Laravel. You are free to add more.
+	|
+	*/
+
+	'connections' => array(
+
+		'sync' => array(
+			'driver' => 'sync',
+		),
+
+		'beanstalkd' => array(
+			'driver' => 'beanstalkd',
+			'host'   => 'localhost',
+			'queue'  => 'default',
+			'ttr'    => 60,
+		),
+
+		'sqs' => array(
+			'driver' => 'sqs',
+			'key'    => 'your-public-key',
+			'secret' => 'your-secret-key',
+			'queue'  => 'your-queue-url',
+			'region' => 'us-east-1',
+		),
+
+		'iron' => array(
+			'driver'  => 'iron',
+			'host'    => 'mq-aws-us-east-1.iron.io',
+			'token'   => 'your-token',
+			'project' => 'your-project-id',
+			'queue'   => 'your-queue-name',
+			'encrypt' => true,
+		),
+
+		'redis' => array(
+			'driver' => 'redis',
+			'queue'  => 'default',
+		),
+
+	),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Failed Queue Jobs
+	|--------------------------------------------------------------------------
+	|
+	| These options configure the behavior of failed queue job logging so you
+	| can control which database and table are used to store the jobs that
+	| have failed. You may change them to any database / table you wish.
+	|
+	*/
+
+	'failed' => array(
+
+		'database' => 'mysql', 'table' => 'failed_jobs',
+
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/remote.php
----------------------------------------------------------------------
diff --git a/app/config/remote.php b/app/config/remote.php
new file mode 100755
index 0000000..2169c43
--- /dev/null
+++ b/app/config/remote.php
@@ -0,0 +1,59 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Remote Connection Name
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify the default connection that will be used for SSH
+	| operations. This name should correspond to a connection name below
+	| in the server list. Each connection will be manually accessible.
+	|
+	*/
+
+	'default' => 'production',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Remote Server Connections
+	|--------------------------------------------------------------------------
+	|
+	| These are the servers that will be accessible via the SSH task runner
+	| facilities of Laravel. This feature radically simplifies executing
+	| tasks on your servers, such as deploying out these applications.
+	|
+	*/
+
+	'connections' => array(
+
+		'production' => array(
+			'host'      => '',
+			'username'  => '',
+			'password'  => '',
+			'key'       => '',
+			'keyphrase' => '',
+			'root'      => '/var/www',
+		),
+
+	),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Remote Server Groups
+	|--------------------------------------------------------------------------
+	|
+	| Here you may list connections under a single group name, which allows
+	| you to easily access all of the servers at once using a short name
+	| that is extremely easy to remember, such as "web" or "database".
+	|
+	*/
+
+	'groups' => array(
+
+		'web' => array('production')
+
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/services.php
----------------------------------------------------------------------
diff --git a/app/config/services.php b/app/config/services.php
new file mode 100755
index 0000000..c8aba2a
--- /dev/null
+++ b/app/config/services.php
@@ -0,0 +1,31 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Third Party Services
+	|--------------------------------------------------------------------------
+	|
+	| This file is for storing the credentials for third party services such
+	| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
+	| default location for this type of information, allowing packages
+	| to have a conventional place to find your various credentials.
+	|
+	*/
+
+	'mailgun' => array(
+		'domain' => '',
+		'secret' => '',
+	),
+
+	'mandrill' => array(
+		'secret' => '',
+	),
+
+	'stripe' => array(
+		'model'  => 'User',
+		'secret' => '',
+	),
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/session.php
----------------------------------------------------------------------
diff --git a/app/config/session.php b/app/config/session.php
new file mode 100755
index 0000000..ae34302
--- /dev/null
+++ b/app/config/session.php
@@ -0,0 +1,140 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Session Driver
+	|--------------------------------------------------------------------------
+	|
+	| This option controls the default session "driver" that will be used on
+	| requests. By default, we will use the lightweight native driver but
+	| you may specify any of the other wonderful drivers provided here.
+	|
+	| Supported: "file", "cookie", "database", "apc",
+	|            "memcached", "redis", "array"
+	|
+	*/
+
+	'driver' => 'file',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Lifetime
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify the number of minutes that you wish the session
+	| to be allowed to remain idle before it expires. If you want them
+	| to immediately expire on the browser closing, set that option.
+	|
+	*/
+
+	'lifetime' => 120,
+
+	'expire_on_close' => false,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session File Location
+	|--------------------------------------------------------------------------
+	|
+	| When using the native session driver, we need a location where session
+	| files may be stored. A default has been set for you but a different
+	| location may be specified. This is only needed for file sessions.
+	|
+	*/
+
+	'files' => storage_path().'/sessions',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Database Connection
+	|--------------------------------------------------------------------------
+	|
+	| When using the "database" or "redis" session drivers, you may specify a
+	| connection that should be used to manage these sessions. This should
+	| correspond to a connection in your database configuration options.
+	|
+	*/
+
+	'connection' => null,
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Database Table
+	|--------------------------------------------------------------------------
+	|
+	| When using the "database" session driver, you may specify the table we
+	| should use to manage the sessions. Of course, a sensible default is
+	| provided for you; however, you are free to change this as needed.
+	|
+	*/
+
+	'table' => 'sessions',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Sweeping Lottery
+	|--------------------------------------------------------------------------
+	|
+	| Some session drivers must manually sweep their storage location to get
+	| rid of old sessions from storage. Here are the chances that it will
+	| happen on a given request. By default, the odds are 2 out of 100.
+	|
+	*/
+
+	'lottery' => array(2, 100),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Cookie Name
+	|--------------------------------------------------------------------------
+	|
+	| Here you may change the name of the cookie used to identify a session
+	| instance by ID. The name specified here will get used every time a
+	| new session cookie is created by the framework for every driver.
+	|
+	*/
+
+	'cookie' => 'laravel_session',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Cookie Path
+	|--------------------------------------------------------------------------
+	|
+	| The session cookie path determines the path for which the cookie will
+	| be regarded as available. Typically, this will be the root path of
+	| your application but you are free to change this when necessary.
+	|
+	*/
+
+	'path' => '/',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Session Cookie Domain
+	|--------------------------------------------------------------------------
+	|
+	| Here you may change the domain of the cookie used to identify a session
+	| in your application. This will determine which domains the cookie is
+	| available to in your application. A sensible default has been set.
+	|
+	*/
+
+	'domain' => null,
+
+	/*
+	|--------------------------------------------------------------------------
+	| HTTPS Only Cookies
+	|--------------------------------------------------------------------------
+	|
+	| By setting this option to true, session cookies will only be sent back
+	| to the server if the browser has a HTTPS connection. This will keep
+	| the cookie from being sent to you if it can not be done securely.
+	|
+	*/
+
+	'secure' => false,
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/testing/cache.php
----------------------------------------------------------------------
diff --git a/app/config/testing/cache.php b/app/config/testing/cache.php
new file mode 100755
index 0000000..66a8a39
--- /dev/null
+++ b/app/config/testing/cache.php
@@ -0,0 +1,20 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Cache Driver
+	|--------------------------------------------------------------------------
+	|
+	| This option controls the default cache "driver" that will be used when
+	| using the Caching library. Of course, you may use other drivers any
+	| time you wish. This is the default when another is not specified.
+	|
+	| Supported: "file", "database", "apc", "memcached", "redis", "array"
+	|
+	*/
+
+	'driver' => 'array',
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/testing/session.php
----------------------------------------------------------------------
diff --git a/app/config/testing/session.php b/app/config/testing/session.php
new file mode 100755
index 0000000..0364b63
--- /dev/null
+++ b/app/config/testing/session.php
@@ -0,0 +1,21 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Session Driver
+	|--------------------------------------------------------------------------
+	|
+	| This option controls the default session "driver" that will be used on
+	| requests. By default, we will use the lightweight native driver but
+	| you may specify any of the other wonderful drivers provided here.
+	|
+	| Supported: "native", "cookie", "database", "apc",
+	|            "memcached", "redis", "array"
+	|
+	*/
+
+	'driver' => 'array',
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/view.php
----------------------------------------------------------------------
diff --git a/app/config/view.php b/app/config/view.php
new file mode 100755
index 0000000..34b8f38
--- /dev/null
+++ b/app/config/view.php
@@ -0,0 +1,31 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| View Storage Paths
+	|--------------------------------------------------------------------------
+	|
+	| Most templating systems load templates from disk. Here you may specify
+	| an array of paths that should be checked for your views. Of course
+	| the usual Laravel view path has already been registered for you.
+	|
+	*/
+
+	'paths' => array(__DIR__.'/../views'),
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination View
+	|--------------------------------------------------------------------------
+	|
+	| This view will be used to render the pagination link output, and can
+	| be easily customized here to show any view you like. A clean view
+	| compatible with Twitter's Bootstrap is given to you by default.
+	|
+	*/
+
+	'pagination' => 'pagination::slider-3',
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/config/workbench.php
----------------------------------------------------------------------
diff --git a/app/config/workbench.php b/app/config/workbench.php
new file mode 100755
index 0000000..87c5e38
--- /dev/null
+++ b/app/config/workbench.php
@@ -0,0 +1,31 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Workbench Author Name
+	|--------------------------------------------------------------------------
+	|
+	| When you create new packages via the Artisan "workbench" command your
+	| name is needed to generate the composer.json file for your package.
+	| You may specify it now so it is used for all of your workbenches.
+	|
+	*/
+
+	'name' => '',
+
+	/*
+	|--------------------------------------------------------------------------
+	| Workbench Author E-Mail Address
+	|--------------------------------------------------------------------------
+	|
+	| Like the option above, your e-mail address is used when generating new
+	| workbench packages. The e-mail is placed in your composer.json file
+	| automatically after the package is created by the workbench tool.
+	|
+	*/
+
+	'email' => '',
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
new file mode 100755
index 0000000..c80672f
--- /dev/null
+++ b/app/controllers/AccountController.php
@@ -0,0 +1,109 @@
+<?php
+
+class AccountController extends BaseController {
+
+	public function createAccountView()
+	{
+		return View::make('account/create');
+	}
+
+	public function createAccountSubmit()
+	{
+		$rules = array(
+				"username" => "required|min:6",
+				"password" => "required|min:6",
+				"confirm_password" => "required|same:password",
+				"email" => "required",
+		);
+
+		$validator = Validator::make( Input::all(), $rules);
+		if( $validator->fails()){
+			$messages = $validator->messages();
+
+			return Redirect::to("create")
+										->withInput(Input::except('password', 'password_confirm'))
+										->withErrors( $validator);
+		}
+
+        $first_name = $_POST['first_name'];
+        $last_name = $_POST['last_name'];
+        $username = $_POST['username'];
+        $password = $_POST['password'];
+        $confirm_password = $_POST['confirm_password'];
+        $email = $_POST['email'];
+        $organization = $_POST['organization'];
+        $address = $_POST['address'];
+        $country = $_POST['country'];
+        $telephone = $_POST['telephone'];
+        $mobile = $_POST['mobile'];
+        $im = $_POST['im'];
+        $url = $_POST['url'];
+
+        $idStore = new WSISUtilities();
+
+        try
+	    {
+	        $idStore->connect();
+	    }
+	    catch (Exception $e)
+	    {
+	        Utilities::print_error_message('<p>Error connecting to ID store.
+	            Please try again later or report a bug using the link in the Help menu</p>' .
+	            '<p>' . $e->getMessage() . '</p>');
+	    }
+
+        if ($idStore->username_exists($username)) {
+        	return Redirect::to("create")
+										->withInput(Input::except('password', 'password_confirm'))
+										->with("username_exists", true);
+		}
+        else{
+            $idStore->add_user($username, $password, $first_name, $last_name, $email, $organization,
+            $address, $country,$telephone, $mobile, $im, $url);
+            Utilities::print_success_message('New user created!');
+
+            return View::make('home');
+		}
+	}
+
+	public function loginView(){
+		return View::make('account/login');
+	}
+
+	public function loginSubmit(){
+
+        if ( Utilities::form_submitted() ) {
+            $username = $_POST['username'];
+            $password = $_POST['password'];
+            try {
+                if ( Utilities::id_matches_db($username, $password)) {
+                	
+                    Utilities::store_id_in_session($username);
+                    Utilities::print_success_message('Login successful! You will be redirected to your home page shortly.');
+                	$app_config = Utilities::read_config();
+                	Session::put("gateway_id", $app_config["gateway-id"]);
+                	//TODO::If this option is not safe, have to find a better method to send credentials to identity server on every connection.
+                	Session::put("password", $_POST["password"]);
+                	
+                	return Redirect::to( "home");
+
+                } else {
+                	return Redirect::to("login")->with("invalid-credentials", true); 
+                }
+            } catch (Exception $ex) {
+                return Redirect::to("login")->with("invalid-credentials", true); 
+            }
+        }
+
+	}
+
+	public function forgotPassword(){
+		return View::make("account/forgot-password");
+	}
+
+	public function logout(){
+		Session::flush();
+		return Redirect::to('home');
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
new file mode 100644
index 0000000..c55718e
--- /dev/null
+++ b/app/controllers/AdminController.php
@@ -0,0 +1,127 @@
+<?php
+
+class AdminController extends BaseController {
+
+    private $idStore = null;
+
+	public function __construct()
+	{
+		$this->beforeFilter('verifyadmin');
+		$idStore = new WSISUtilities();
+        try
+	    {
+	        $idStore->connect();
+	    }
+	    catch (Exception $e)
+	    {
+	        Utilities::print_error_message('<p>Error connecting to ID store.
+	            Please try again later or report a bug using the link in the Help menu</p>' .
+	            '<p>' . $e->getMessage() . '</p>');
+	    }
+	    $this->idStore = $idStore;
+	    //Session::put("idStore", $idStore);
+		Session::put("nav-active", "user-console");
+	}
+
+	public function console(){
+		return View::make("admin/dashboard");
+	}
+
+	public function dashboard(){
+		//only for super admin
+		//Session::put("scigap_admin", true);
+		$idStore = $this->idStore;
+
+		$crData = CRUtilities::getEditCRData();
+		$gateways = CRUtilities::getAllGatewayProfilesData();
+		return View::make("admin/manage-gateway", array( 
+														"gateways" => $gateways, 
+														"computeResources" => CRUtilities::getAllCRObjects(),
+														"crData" => $crData));
+	}
+
+	public function addAdminSubmit(){
+		$idStore = $this->idStore;
+	    $idStore->updateRoleListOfUser( Input::get("username"), array( "new"=>array("admin"), "deleted"=>array() ) );
+
+   		return View::make("account/admin-dashboard")->with("message", "User has been added to Admin.");
+	}
+
+	public function usersView(){
+		$idStore = $this->idStore;
+		if( Input::has("role"))
+		{
+			$users = $idStore->getUserListOfRole( Input::get("role"));
+			if( isset( $users->return))
+		    	$users = $users->return;
+		    else
+		    	$users = array();
+		}
+		else
+	    	$users = $idStore->listUsers();
+	    
+	    $roles = $idStore->getRoleNames();
+
+	    return View::make("admin/manage-users", array("users" => $users, "roles" => $roles));
+
+	}
+
+	public function addGatewayAdminSubmit(){
+		$idStore = $this->idStore;
+		//check if username exists
+		if( $idStore->username_exists( Input::get("username")) )
+		{
+			//add user to admin role
+			$app_config = Utilities::read_config();
+			$idStore->updateRoleListOfUser( Input::get("username"), array( "new"=>array( $app_config["admin-role-name"]), "deleted"=>array() ) );
+
+			return Redirect::to("admin/dashboard/users?role=" . $app_config["admin-role-name"])->with("Gateway Admin has been added.");
+
+		}
+		else
+		{
+			echo ("username doesn't exist only."); exit;
+		}
+	}
+
+	public function rolesView(){
+		$idStore = $this->idStore;
+		$roles = $idStore->getRoleNames();
+
+		return View::make("admin/manage-roles", array("roles" => $roles));
+	}
+
+	public function experimentsView(){
+		$idStore = $this->idStore;
+		//$roles = $idStore->getExperiments();
+
+		return View::make("admin/manage-experiments" );
+	}
+
+	public function addRole(){
+		$idStore = $this->idStore;
+
+		$idStore->addRole( Input::get("role") );
+		return Redirect::to("admin/dashboard/roles")->with( "message", "Role has been added.");
+	}
+
+	public function getRoles(){
+		$idStore = $this->idStore;
+
+		return json_encode( (array)$idStore->getRoleListOfUser( Input::get("username") ) );
+	}
+
+	public function deleteRole(){
+		$idStore = $this->idStore;
+
+		$idStore->deleteRole( Input::get("role") );
+		return Redirect::to("admin/dashboard/roles")->with( "message", "Role has been deleted.");
+
+	}
+
+	public function credentialStoreView(){
+		$idStore = $this->idStore;
+
+		return View::make("admin/manage-credentials", array("tokens" => array()) );
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/ApplicationController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ApplicationController.php b/app/controllers/ApplicationController.php
new file mode 100644
index 0000000..78b51ff
--- /dev/null
+++ b/app/controllers/ApplicationController.php
@@ -0,0 +1,141 @@
+<?php
+
+class ApplicationController extends BaseController {
+
+	public function __construct()
+	{
+		$this->beforeFilter('verifyadmin');
+		Session::put("nav-active", "app-catalog");
+	}
+
+	public function showAppModuleView()
+	{
+		$data = array();
+		$data["modules"] = AppUtilities::getAllModules();
+		return View::make('application/module', $data);
+	}
+
+	public function modifyAppModuleSubmit()
+	{
+		$update = false;
+		if( Input::has("appModuleId") )
+			$update = true;
+			
+		if( AppUtilities::create_or_update_appModule( Input::all(), $update ) )
+		{
+			if( $update)
+				$message = "Module has been updated successfully!";
+			else
+				$message = "Module has been created successfully!";
+		}
+		else
+			$message = "An error has occurred. Please report the issue.";
+
+
+		return Redirect::to("app/module")->with("message", $message);
+	}
+
+	public function deleteAppModule()
+	{
+		if( AppUtilities::deleteAppModule( Input::get("appModuleId") ) )
+			$message = "Module has been deleted successfully!";
+		else
+			$message = "An error has occurred. Please report the issue.";
+
+		return Redirect::to("app/module")->with("message", $message);
+
+	}
+
+	public function createAppInterfaceView()
+	{
+		$data = array();
+		$data = AppUtilities::getAppInterfaceData();
+		//var_dump( $data["appInterfaces"][14] ); exit;
+		return View::make("application/interface", $data);
+	}
+
+	public function createAppInterfaceSubmit()
+	{
+		$appInterfaceValues = Input::all();
+		//var_dump( $appInterfaceValues); exit;
+		AppUtilities::create_or_update_appInterface( $appInterfaceValues);
+
+		return Redirect::to( "app/interface")->with("message","Application Interface has been created");
+	}
+
+	public function editAppInterfaceSubmit()
+	{
+		if( Input::has("app-interface-id"))
+		{
+			$update = true;
+			$appInterfaceValues = Input::all();
+			//var_dump( $appInterfaceValues); exit;
+			AppUtilities::create_or_update_appInterface( $appInterfaceValues, $update);
+			$message = "Application Interface has been updated!";
+		}
+		else
+		{
+			$message = "An error has occurred. Please report the issue.";
+		}
+		return Redirect::to( "app/interface")->with("message", $message);
+
+	}
+
+	public function deleteAppInterface()
+	{
+		if( AppUtilities::deleteAppInterface( Input::get("appInterfaceId") ) )
+			$message = "Interface has been deleted successfully!";
+		else
+			$message = "An error has occurred. Please report the issue.";
+
+		return Redirect::to("app/interface")->with("message", $message);
+
+	}
+
+	public function createAppDeploymentView()
+	{
+		$data = array();
+		$data = AppUtilities::getAppDeploymentData();
+		//var_dump( $data); exit;
+
+		return View::make("application/deployment", $data);
+	}
+
+	public function createAppDeploymentSubmit()
+	{
+		$appDeploymentValues = Input::all();
+		AppUtilities::create_or_update_appDeployment( $appDeploymentValues );
+		return Redirect::to("app/deployment")->with("message", "App Deployment was created successfully!");
+	}
+
+	public function editAppDeploymentSubmit()
+	{
+		if( Input::has("app-deployment-id"))
+		{
+			$update = true;
+			$appDeploymentValues = Input::all();
+
+			AppUtilities::create_or_update_appDeployment( $appDeploymentValues, $update);
+			$message = "Application Deployment has been updated!";
+		}
+		else
+		{
+			$message = "An error has occurred. Please report the issue.";
+		}
+		return Redirect::to( "app/deployment")->with("message", $message);
+	}
+
+	public function deleteAppDeployment()
+	{
+		if( AppUtilities::deleteAppDeployment( Input::get("appDeploymentId") ) )
+			$message = "Deployment has been deleted successfully!";
+		else
+			$message = "An error has occurred. Please report the issue.";
+
+		return Redirect::to("app/deployment")->with("message", $message);
+
+	}
+
+}
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/BaseController.php
----------------------------------------------------------------------
diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php
new file mode 100755
index 0000000..2bee464
--- /dev/null
+++ b/app/controllers/BaseController.php
@@ -0,0 +1,18 @@
+<?php
+
+class BaseController extends Controller {
+
+	/**
+	 * Setup the layout used by the controller.
+	 *
+	 * @return void
+	 */
+	protected function setupLayout()
+	{
+		if ( ! is_null($this->layout))
+		{
+			$this->layout = View::make($this->layout);
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/ComputeResource.php
----------------------------------------------------------------------
diff --git a/app/controllers/ComputeResource.php b/app/controllers/ComputeResource.php
new file mode 100755
index 0000000..6644c73
--- /dev/null
+++ b/app/controllers/ComputeResource.php
@@ -0,0 +1,238 @@
+<?php
+
+class ComputeResource extends BaseController{
+	
+	/**
+	*    Instantiate a new Compute Resource Controller Instance
+	**/
+
+	public function __construct()
+	{
+		$this->beforeFilter('verifyadmin');
+		Session::put("nav-active", "compute-resource");
+
+	}
+
+	public function createView(){
+			return View::make("resource/create");
+	}
+
+	public function createSubmit(){
+
+		$hostAliases = Input::get("hostaliases");
+		$ips = Input::get("ips");
+		$computeDescription = array( 
+									"hostName"=> trim( Input::get("hostname") ),
+									"hostAliases"=> array_unique( array_filter( $hostAliases) ),
+									"ipAddresses"=> array_unique( array_filter( $ips) ),
+									"resourceDescription"=>Input::get("description") 
+									);
+		$computeResource = CRUtilities::register_or_update_compute_resource( $computeDescription);
+		
+		return Redirect::to( "cr/edit?crId=" . $computeResource->computeResourceId);
+	}
+
+	public function editView(){
+		
+		$data = CRUtilities::getEditCRData();
+		$computeResourceId = "";
+		if( Input::has("crId"))
+			$computeResourceId = Input::get("crId");
+		else if( Session::has("computeResource"))
+		{
+			$computeResource = Session::get("computeResource");
+			$computeResourceId = $computeResource->computeResourceId;
+		}
+
+		if( $computeResourceId != "")
+		{
+			$computeResource = Utilities::get_compute_resource(  $computeResourceId);
+			$jobSubmissionInterfaces = array();
+			$dataMovementInterfaces = array();
+			$addedJSP = array();
+			$addedDMI = array();
+			//var_dump( $computeResource->jobSubmissionInterfaces); exit;
+			if( count( $computeResource->jobSubmissionInterfaces) )
+			{
+				foreach( $computeResource->jobSubmissionInterfaces as $JSI )
+				{
+					$jobSubmissionInterfaces[] = CRUtilities::getJobSubmissionDetails( $JSI->jobSubmissionInterfaceId, $JSI->jobSubmissionProtocol);
+					$addedJSP[] = $JSI->jobSubmissionProtocol;
+				}
+			}
+			//var_dump( CRUtilities::getJobSubmissionDetails( $data["computeResource"]->jobSubmissionInterfaces[0]->jobSubmissionInterfaceId, 1) ); exit;
+			if( count( $computeResource->dataMovementInterfaces) )
+			{
+				foreach( $computeResource->dataMovementInterfaces as $DMI )
+				{
+					$dataMovementInterfaces[] = CRUtilities::getDataMovementDetails( $DMI->dataMovementInterfaceId, $DMI->dataMovementProtocol);
+					$addedDMI[] = $DMI->dataMovementProtocol;
+				}
+			}
+
+			$data["computeResource"] = $computeResource;
+			$data["jobSubmissionInterfaces"] = $jobSubmissionInterfaces;
+			$data["dataMovementInterfaces"] = $dataMovementInterfaces;
+			$data["addedJSP"] = $addedJSP;
+			$data["addedDMI"] = $addedDMI;
+			//var_dump($data["jobSubmissionInterfaces"]); exit;
+			return View::make("resource/edit", $data);
+		}
+		else
+			return View::make("resource/browse")->with("login-alert", "Unable to retrieve this Compute Resource. Please report this error to devs.");
+
+	}
+		
+	public function editSubmit(){
+
+		$tabName = "";
+		if( Input::get("cr-edit") == "resDesc") /* Modify compute Resource description */
+		{
+			$computeDescription = Utilities::get_compute_resource(  Input::get("crId"));
+			$computeDescription->hostName = trim( Input::get("hostname") );
+			$computeDescription->hostAliases = array_unique( array_filter( Input::get("hostaliases") ) );
+			$computeDescription->ipAddresses = array_unique( array_filter( Input::get("ips") ) );
+			$computeDescription->resourceDescription = Input::get("description");
+			$computeDescription->maxMemoryPerNode = Input::get("maxMemoryPerNode");
+			//var_dump( $computeDescription); exit;
+
+			$computeResource = CRUtilities::register_or_update_compute_resource( $computeDescription, true);
+
+			$tabName =  "#tab-desc";
+		}
+		if( Input::get("cr-edit") == "queue") /* Add / Modify a Queue */
+		{
+			$queue = array( "queueName"			=>Input::get("qname"),
+							"queueDescription"	=>Input::get("qdesc"),
+							"maxRunTime"		=>Input::get( "qmaxruntime"),
+							"maxNodes"			=>Input::get("qmaxnodes"),
+							"maxProcessors"		=>Input::get("qmaxprocessors"),
+							"maxJobsInQueue"	=>Input::get("qmaxjobsinqueue"),
+							"maxMemory"			=>Input::get("qmaxmemoryinqueue")
+						);
+
+			$computeDescription = Utilities::get_compute_resource(  Input::get("crId"));
+			$computeDescription->batchQueues[] = CRUtilities::createQueueObject( $queue);
+			$computeResource = CRUtilities::register_or_update_compute_resource( $computeDescription, true);
+			//var_dump( $computeResource); exit;
+			$tabName = "#tab-queues";
+		}
+		else if( Input::get("cr-edit") == "delete-queue" )
+		{
+			CRUtilities::deleteQueue( Input::get("crId"), Input::get("queueName") );
+			$tabName = "#tab-queues";
+		} 
+		else if( Input::get("cr-edit") == "fileSystems")
+		{
+			$computeDescription = Utilities::get_compute_resource(  Input::get("crId"));
+			$computeDescription->fileSystems = array_filter( Input::get("fileSystems"), "trim");
+			$computeResource = CRUtilities::register_or_update_compute_resource( $computeDescription, true);
+
+			$tabName = "#tab-filesystem";
+		}
+		else if( Input::get("cr-edit") == "jsp" ||  Input::get("cr-edit") == "edit-jsp" ) /* Add / Modify a Job Submission Interface */
+		{		
+			$update = false;	
+			if( Input::get("cr-edit") == "edit-jsp")
+				$update = true;
+
+			$jobSubmissionInterface = CRUtilities::create_or_update_JSIObject( Input::all(), $update );
+
+			$tabName = "#tab-jobSubmission";
+		}
+		else if( Input::get("cr-edit") == "jsi-priority") 
+		{
+			$inputs = Input::all();
+			$computeDescription = Utilities::get_compute_resource(  Input::get("crId"));
+			foreach( $computeDescription->jobSubmissionInterfaces as $index => $jsi)
+			{
+				foreach( $inputs["jsi-id"] as $idIndex => $jsiId)
+				{
+					if( $jsiId == $jsi->jobSubmissionInterfaceId )
+					{
+						$computeDescription->jobSubmissionInterfaces[$index]->priorityOrder = $inputs["jsi-priority"][$idIndex];
+						break;
+					}
+				}
+			}
+			$computeResource = CRUtilities::register_or_update_compute_resource( $computeDescription, true);
+
+			return 1; //currently done by ajax.
+		}
+		else if( Input::get("cr-edit") == "dmp" ||  Input::get("cr-edit") == "edit-dmi" ) /* Add / Modify a Data Movement Interface */
+		{
+			$update = false;	
+			if( Input::get("cr-edit") == "edit-dmi")
+				$update = true;
+			$dataMovementInterface = CRUtilities::create_or_update_DMIObject( Input::all(), $update );
+
+			$tabName = "#tab-dataMovement";
+		}
+		else if( Input::get("cr-edit") == "dmi-priority") 
+		{
+			$inputs = Input::all();
+			$computeDescription = Utilities::get_compute_resource(  Input::get("crId"));
+			foreach( $computeDescription->dataMovementInterfaces as $index => $dmi)
+			{
+				foreach( $inputs["dmi-id"] as $idIndex => $dmiId)
+				{
+					if( $dmiId == $dmi->dataMovementInterfaceId )
+					{
+						$computeDescription->dataMovementInterfaces[$index]->priorityOrder = $inputs["dmi-priority"][$idIndex];
+						break;
+					}
+				}
+			}
+			$computeResource = CRUtilities::register_or_update_compute_resource( $computeDescription, true);
+
+			return 1; //currently done by ajax.
+		}
+
+		return Redirect::to("cr/edit?crId=" . Input::get("crId") . $tabName );
+	}
+
+	public function deleteActions(){
+
+		$result = CRUtilities::deleteActions( Input::all() );
+		if( Input::has("jsiId"))
+		{
+			return Redirect::to("cr/edit?crId=" . Input::get("crId"). "#tab-jobSubmission")
+							->with("message", "Job Submission Interface was deleted successfully");
+		}
+		if( Input::has("dmiId"))
+		{
+			return Redirect::to("cr/edit?crId=" . Input::get("crId"). "#tab-dataMovement")
+							->with( "message", "Data Movement Protocol was deleted successfully");
+		}
+		elseif( Input::has("del-crId") )
+		{
+			return Redirect::to("cr/browse")->with("message", "The Compute Resource has been successfully deleted.");
+		}
+		else
+			return $result;
+	}
+
+	public function browseView(){
+		$data = CRUtilities::getBrowseCRData();
+		$allCRs = $data["crObjects"];
+		$appDeployments = $data["appDeployments"];
+
+		$connectedDeployments = array();
+		foreach( (array)$allCRs as $crId => $crName)
+		{
+			$connectedDeployments[ $crId] = 0;
+			foreach( (array)$appDeployments as $deploymentObject)
+			{
+				if( $crId == $deploymentObject->computeHostId)
+					$connectedDeployments[$crId]++;
+			}
+		}
+		return View::make("resource/browse", array(
+												"allCRs" => $allCRs,
+												"connectedDeployments" => $connectedDeployments
+												));
+
+	}
+}
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
new file mode 100755
index 0000000..69abd00
--- /dev/null
+++ b/app/controllers/ExperimentController.php
@@ -0,0 +1,232 @@
+ <?php
+
+class ExperimentController extends BaseController {
+
+	/**
+	*    Instantiate a new ExperimentController Instance
+	**/
+
+	public function __construct()
+	{
+		$this->beforeFilter('verifylogin');
+		Session::put("nav-active", "experiment");
+	}
+
+	public function createView()
+	{
+		Session::forget( 'exp_create_continue');
+		return View::make('experiment/create');
+	}
+
+	public function createSubmit()
+	{
+		$inputs = Input::all();
+
+		if( isset( $_POST['continue'] ))
+		{
+			Session::put( 'exp_create_continue', true);
+			
+			$app_config = Utilities::read_config();
+			$experimentInputs = array( 
+								"disabled" => ' disabled',
+						        "experimentName" => $_POST['experiment-name'],
+						        "experimentDescription" => $_POST['experiment-description'] . ' ',
+						        "project" => $_POST['project'],
+						        "application" => $_POST['application'],
+						        "allowedFileSize" => $app_config["server-allowed-file-size"],
+						        "echo" => ($_POST['application'] == 'Echo')? ' selected' : '',
+						        "wrf" => ($_POST['application'] == 'WRF')? ' selected' : '',
+						        "queueName" => $app_config["queue-name"],
+						        "nodeCount" => $app_config["node-count"],
+						        "cpuCount" => $app_config["total-cpu-count"],
+						        "wallTimeLimit" => $app_config["wall-time-limit"],
+						        "advancedOptions" => $app_config["advanced-experiment-options"]
+					        );
+			return View::make( "experiment/create-complete", array( "expInputs" => $experimentInputs) );
+		}
+
+		else if (isset($_POST['save']) || isset($_POST['launch']))
+		{
+		    $expId = Utilities::create_experiment();
+
+		    if (isset($_POST['launch']) && $expId)
+		    {
+		        Utilities::launch_experiment($expId);
+		    }
+		    /* Not required.
+		    else
+		    {
+		        Utilities::print_success_message("<p>Experiment {$_POST['experiment-name']} created!</p>" .
+		            '<p>You will be redirected to the summary page shortly, or you can
+		            <a href=' . URL::to('/') . '"/experiment/summary?expId=' . $expId . '">go directly</a> to experiment summary page.</p>');
+		        
+		    }*/
+        	return Redirect::to('experiment/summary?expId=' . $expId);
+		}
+		else
+			return Redirect::to("home")->with("message", "Something went wrong here. Please file a bug report using the link in the Help menu.");
+	}
+
+	public function summary()
+	{
+		$experiment = Utilities::get_experiment($_GET['expId']);
+		if( $experiment != null)
+		{
+			$project = Utilities::get_project($experiment->projectID);
+			$expVal = Utilities::get_experiment_values( $experiment, $project);
+			$jobDetails = Utilities::get_job_details( $experiment->experimentID);
+			$transferDetails = Utilities::get_transfer_details( $experiment->experimentID);
+			//var_dump( $jobDetails); exit;
+			// User should not clone or edit a failed experiment. Only create clones of it.
+			if( $expVal["experimentStatusString"] == "FAILED")
+				$expVal["editable"] = false;
+
+			$expVal["cancelable"] = false;
+			if( $expVal["experimentStatusString"] == "LAUNCHED" || $expVal["experimentStatusString"] == "EXECUTING" )
+				$expVal["cancelable"] = true;
+
+			$data = array(
+										"expId" => Input::get("expId"),
+										"experiment" => $experiment,
+										"project" => $project,
+										"jobDetails" => $jobDetails,
+										"expVal" => $expVal
+						);
+
+			if( Request::ajax() )
+			{
+				//admin wants to see an experiment summary
+				if( Input::has("dashboard"))
+				{
+					$data["dashboard"] = true;
+					return View::make("partials/experiment-info", $data);
+				}
+				else
+					return json_encode( $experiment);
+			}
+			else
+			{
+				return View::make( "experiment/summary", $data);
+			}
+		}
+		else
+		{
+			if( Input::has("dashboard"))
+				return View::make( "partials/experiment-info", array("invalidExperimentId" => 1)); 
+			else
+				return View::make( "experiment/summary", array("invalidExperimentId" => 1));
+		}
+	}
+
+	public function expCancel()
+	{
+		Utilities::cancel_experiment( Input::get("expId"));
+
+		return Redirect::to('experiment/summary?expId=' . Input::get("expId"));
+	}
+
+	public function expChange()
+	{
+		//var_dump( Input::all() ); exit;
+		$experiment = Utilities::get_experiment( Input::get('expId') );
+		$project = Utilities::get_project($experiment->projectID);
+
+		$expVal = Utilities::get_experiment_values( $experiment, $project);
+		/*if (isset($_POST['save']))
+		{
+		    $updatedExperiment = Utilities::apply_changes_to_experiment($experiment);
+
+		    Utilities::update_experiment($experiment->experimentID, $updatedExperiment);
+		}*/
+		if (isset($_POST['launch']))
+		{
+		    Utilities::launch_experiment($experiment->experimentID);
+			return Redirect::to('experiment/summary?expId=' . $experiment->experimentID);
+		}
+		elseif (isset($_POST['clone']))
+		{
+		    $cloneId = Utilities::clone_experiment($experiment->experimentID);
+		    $experiment = Utilities::get_experiment( $cloneId );
+			$project = Utilities::get_project($experiment->projectID);
+
+			$expVal = Utilities::get_experiment_values( $experiment, $project);
+
+			return Redirect::to('experiment/edit?expId=' . $experiment->experimentID);
+
+		}
+		
+		elseif (isset($_POST['cancel']))
+		{
+		    Utilities::cancel_experiment($experiment->experimentID);
+			return Redirect::to('experiment/summary?expId=' . $experiment->experimentID);
+
+		}
+	}
+
+	public function editView()
+	{
+		$app_config = Utilities::read_config();
+		$experiment = Utilities::get_experiment($_GET['expId']);
+		$project = Utilities::get_project($experiment->projectID);
+
+		$expVal = Utilities::get_experiment_values( $experiment, $project);
+
+		$experimentInputs = array(	
+								"disabled" => ' ',
+						        "experimentName" => $experiment->name,
+						        "experimentDescription" => $experiment->description,
+						        "application" => $experiment->applicationId,
+						      	"allowedFileSize" => $app_config["server-allowed-file-size"],
+								'experiment' => $experiment,
+								'project' => $project,
+								'expVal' => $expVal,
+								'cloning' => true,
+						        'advancedOptions' => $app_config["advanced-experiment-options"]
+								);
+		return View::make("experiment/edit", array("expInputs" => $experimentInputs) );
+	}
+
+	public function editSubmit()
+	{
+		if (isset($_POST['save']) || isset($_POST['launch']))
+		{
+	        $experiment = Utilities::get_experiment(Input::get('expId') ); // update local experiment variable
+		    $updatedExperiment = Utilities::apply_changes_to_experiment($experiment, Input::all() );
+
+		    Utilities::update_experiment($experiment->experimentID, $updatedExperiment);
+
+		    if (isset($_POST['save']))
+		    {
+		        $experiment = Utilities::get_experiment(Input::get('expId') ); // update local experiment variable
+		    }
+		    if (isset($_POST['launch']))
+		    {
+		        Utilities::launch_experiment($experiment->experimentID);
+		    }
+
+			return Redirect::to('experiment/summary?expId=' . $experiment->experimentID);
+		}
+		else
+			return View::make("home");
+	}
+
+	public function searchView()
+	{
+		$experimentStates = Utilities::getExpStates();
+		return View::make("experiment/search", array( "expStates" => $experimentStates ) );
+	}
+
+	public function searchSubmit()
+	{
+		$expContainer = Utilities::get_expsearch_results( Input::all() );
+
+		$experimentStates = Utilities::getExpStates();
+		return View::make('experiment/search', array(
+													'expStates' => $experimentStates,
+													'expContainer' => $expContainer 
+												));
+	}
+
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/GatewayprofileController.php
----------------------------------------------------------------------
diff --git a/app/controllers/GatewayprofileController.php b/app/controllers/GatewayprofileController.php
new file mode 100644
index 0000000..24b8589
--- /dev/null
+++ b/app/controllers/GatewayprofileController.php
@@ -0,0 +1,79 @@
+<?php
+
+class GatewayprofileController extends BaseController {
+
+	public function __construct()
+	{
+		$this->beforeFilter('verifyadmin');
+		Session::put("nav-active", "gateway-profile");
+	}
+
+	public function createView()
+	{
+		return View::make("gateway/create");
+	}
+
+	public function createSubmit()
+	{
+		$gatewayProfileId = CRUtilities::create_or_update_gateway_profile( Input::all() );
+		//TODO:: Maybe this is a better way. Things to ponder upon.
+		//return Redirect::to("gp/browse")->with("gpId", $gatewayProfileId);
+		return Redirect::to("gp/browse")->with("message","Gateway has been created. You can set preferences now.");
+	}
+
+	public function editGP()
+	{
+		$gatewayProfileId = CRUtilities::create_or_update_gateway_profile( Input::all(), true );
+		return Redirect::to("gp/browse")->with("message","Gateway has been created. You can set preferences now.");
+	}
+
+	public function browseView()
+	{
+		$crObjects = CRUtilities::getAllCRObjects();
+		$crData = CRUtilities::getEditCRData();
+		//var_dump( $crObjects[0]); exit;
+		return View::make("gateway/browse", array(	"gatewayProfiles" => CRUtilities::getAllGatewayProfilesData(),
+													"computeResources" => CRUtilities::getAllCRObjects(),
+													"crData" => CRUtilities::getEditCRData()
+												));
+	}
+
+	public function modifyCRP()
+	{
+		if( CRUtilities::add_or_update_CRP( Input::all()) )
+		{
+			return Redirect::to("admin/dashboard/gateway")->with("message","Compute Resource Preference for the desired Gateway has been set.");
+		}
+	}
+
+	public function delete()
+	{
+		//var_dump( Input::all()); exit;
+		$error = false;
+		if( Input::has("del-gpId")) // if Gateway has to be deleted
+		{
+			if( CRUtilities::deleteGP( Input::get("del-gpId")) )
+				return Redirect::to("admin/dashboard/gateway")->with("message","Gateway Profile has been deleted.");
+			else
+				$error = true;
+		}
+		else if( Input::has("rem-crId")) // if Compute Resource has to be removed from Gateway
+		{
+			if(CRUtilities::deleteCR( Input::all()) )
+				return Redirect::to("admin/dashboard/gateway")->with("message", "The selected Compute Resource has been successfully removed");
+			else
+				$error = true;
+		}
+		else
+			$error = true;
+
+
+		if( $error)
+		{
+			return Redirect::to("admin/dashboard/gateway")->with("message","An error has occurred. Please try again later or report a bug using the link in the Help menu");
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/HomeController.php
----------------------------------------------------------------------
diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php
new file mode 100755
index 0000000..64266ce
--- /dev/null
+++ b/app/controllers/HomeController.php
@@ -0,0 +1,25 @@
+<?php
+
+class HomeController extends BaseController {
+
+	/*
+	|--------------------------------------------------------------------------
+	| Default Home Controller
+	|--------------------------------------------------------------------------
+	|
+	| You may wish to use controllers instead of, or in addition to, Closure
+	| based routes. That's great! Here is an example controller method to
+	| get you started. To route to this controller, just add the route:
+	|
+	|	Route::get('/', 'HomeController@showWelcome');
+	|
+	*/
+
+	public function getIndex()
+	{
+		return View::make('home');
+	}
+
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/controllers/ProjectController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php
new file mode 100755
index 0000000..2a8a934
--- /dev/null
+++ b/app/controllers/ProjectController.php
@@ -0,0 +1,86 @@
+<?php
+
+class ProjectController extends BaseController {
+
+	/**
+	*    Instantiate a new ProjectController Instance
+	**/
+
+	public function __construct()
+	{
+		$this->beforeFilter('verifylogin');
+		Session::put("nav-active", "project");
+
+	}
+
+	public function createView()
+	{
+		return View::make("project/create");
+	}
+
+	public function createSubmit()
+	{
+		if (isset($_POST['save']))
+		{
+			$projectId = Utilities::create_project();
+            return Redirect::to('project/summary?projId=' . $projectId);
+		}
+		else
+		{
+			return Redirect::to('project/create');
+		}
+	}
+
+	public function summary()
+	{
+		if( Input::has("projId"))
+		{
+			Session::put("projId", Input::get("projId"));
+			return View::make("project/summary", 
+					array( "projectId" => Input::get("projId")) );
+		}
+		else
+			return Redirect::to("home");
+	}
+
+	public function editView()
+	{
+		if( Input::has("projId"))
+		{
+			return View::make("project/edit", 
+					array( "projectId" => Input::get("projId"),
+							"project" => Utilities::get_project($_GET['projId']) 
+						 ) );
+		}
+		else
+			return Redirect::to("home");
+	}
+
+	public function editSubmit()
+	{
+		if (isset($_POST['save']))
+	    {
+	    	$projectDetails["owner"] = Session::get("username");
+	    	$projectDetails["name"] = Input::get("project-name");
+	    	$projectDetails["description"] = Input::get("project-description");
+
+	        Utilities::update_project( Input::get("projectId"), $projectDetails);
+
+	        return Redirect::to("project/summary?projId=" . Input::get("projectId") )->with("project_edited", true);
+	    }
+	}
+
+	public function searchView()
+	{
+		return View::make('project/search');
+	}
+
+	public function searchSubmit()
+	{
+        $projects = Utilities::get_projsearch_results( Input::get("search-key"), Input::get("search-value"));
+		return View::make( 'project/search', array('projects' => $projects));
+	}
+
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/database/production.sqlite
----------------------------------------------------------------------
diff --git a/app/database/production.sqlite b/app/database/production.sqlite
new file mode 100755
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/database/seeds/DatabaseSeeder.php
----------------------------------------------------------------------
diff --git a/app/database/seeds/DatabaseSeeder.php b/app/database/seeds/DatabaseSeeder.php
new file mode 100755
index 0000000..1989252
--- /dev/null
+++ b/app/database/seeds/DatabaseSeeder.php
@@ -0,0 +1,17 @@
+<?php
+
+class DatabaseSeeder extends Seeder {
+
+	/**
+	 * Run the database seeds.
+	 *
+	 * @return void
+	 */
+	public function run()
+	{
+		Eloquent::unguard();
+
+		// $this->call('UserTableSeeder');
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/filters.php
----------------------------------------------------------------------
diff --git a/app/filters.php b/app/filters.php
new file mode 100755
index 0000000..93b988b
--- /dev/null
+++ b/app/filters.php
@@ -0,0 +1,115 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Application & Route Filters
+|--------------------------------------------------------------------------
+|
+| Below you will find the "before" and "after" events for the application
+| which may be used to do any work before or after a request into your
+| application. Here you may also register your custom route filters.
+|
+*/
+
+App::before(function($request)
+{
+	$airavataClient = Utilities::get_airavata_client();
+	if( ! is_object( $airavataClient))
+		return View::make("server-down");
+	else
+		Session::put("airavataClient", $airavataClient);
+});
+
+
+App::after(function($request, $response)
+{
+	//
+	// Test commit.
+});
+
+/*
+|--------------------------------------------------------------------------
+| Authentication Filters
+|--------------------------------------------------------------------------
+|
+| The following filters are used to verify that the user of the current
+| session is logged into this application. The "basic" filter easily
+| integrates HTTP Basic authentication for quick, simple checking.
+|
+*/
+
+Route::filter('auth', function()
+{
+	if (Auth::guest())
+	{
+		if (Request::ajax())
+		{
+			return Response::make('Unauthorized', 401);
+		}
+		else
+		{
+			return Redirect::guest('login');
+		}
+	}
+});
+
+
+Route::filter('auth.basic', function()
+{
+	return Auth::basic();
+});
+
+/*
+|--------------------------------------------------------------------------
+| Guest Filter
+|--------------------------------------------------------------------------
+|
+| The "guest" filter is the counterpart of the authentication filters as
+| it simply checks that the current user is not logged in. A redirect
+| response will be issued if they are, which you may freely change.
+|
+*/
+
+Route::filter('guest', function()
+{
+	if (Auth::check()) return Redirect::to('/');
+});
+
+/*
+|--------------------------------------------------------------------------
+| CSRF Protection Filter
+|--------------------------------------------------------------------------
+|
+| The CSRF filter is responsible for protecting your application against
+| cross-site request forgery attacks. If this special token in a user
+| session does not match the one given in this request, we'll bail.
+|
+*/
+
+Route::filter('csrf', function()
+{
+	if (Session::token() != Input::get('_token'))
+	{
+		throw new Illuminate\Session\TokenMismatchException;
+	}
+});
+
+
+Route::filter('verifylogin',function()
+{
+	if( ! Utilities::verify_login() )
+		return Redirect::to("home")->with("login-alert", true);
+});
+
+Route::filter('verifyadmin', function()
+{
+	if( Utilities::verify_login() )
+	{
+		if( !Session::has("admin"))
+		{
+			return Redirect::to("home")->with("admin-alert", true);
+		}
+	} 
+	else
+		return Redirect::to("home")->with("login-alert", true);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/lang/en/pagination.php
----------------------------------------------------------------------
diff --git a/app/lang/en/pagination.php b/app/lang/en/pagination.php
new file mode 100755
index 0000000..6b99ef5
--- /dev/null
+++ b/app/lang/en/pagination.php
@@ -0,0 +1,20 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are used by the paginator library to build
+	| the simple pagination links. You are free to change them to anything
+	| you want to customize your views to better match your application.
+	|
+	*/
+
+	'previous' => '&laquo; Previous',
+
+	'next'     => 'Next &raquo;',
+
+);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/lang/en/reminders.php
----------------------------------------------------------------------
diff --git a/app/lang/en/reminders.php b/app/lang/en/reminders.php
new file mode 100755
index 0000000..e42148e
--- /dev/null
+++ b/app/lang/en/reminders.php
@@ -0,0 +1,24 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Password Reminder Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are the default lines which match reasons
+	| that are given by the password broker for a password update attempt
+	| has failed, such as for an invalid token or invalid new password.
+	|
+	*/
+
+	"password" => "Passwords must be at least six characters and match the confirmation.",
+
+	"user" => "We can't find a user with that e-mail address.",
+
+	"token" => "This password reset token is invalid.",
+
+	"sent" => "Password reminder sent!",
+
+);