Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

move files around

Andras Bacsaidd51b002b8fa
diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php
index ca7c4b6595..e9584aad1a 100644
--- a/app/Http/Controllers/ApplicationController.php
+++ b/app/Http/Controllers/ApplicationController.php
@@ -21,7 +21,7 @@ class ApplicationController extends Controller
if (!$application) {
return redirect()->route('home');
}
- return view('project.applications.configuration', ['application' => $application]);
+ return view('project.application.configuration', ['application' => $application]);
}
public function deployments()
{
@@ -37,7 +37,7 @@ class ApplicationController extends Controller
if (!$application) {
return redirect()->route('home');
}
- return view('project.applications.deployments', ['application' => $application, 'deployments' => $application->deployments()]);
+ return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]);
}
public function deployment()
@@ -58,7 +58,7 @@ class ApplicationController extends Controller
}
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
- return view('project.applications.deployment', [
+ return view('project.application.deployment', [
'application' => $application,
'activity' => $activity,
'deployment_uuid' => $deployment_uuid,
diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php
index 1c1b220fc0..6ac9dc6118 100644
--- a/app/Http/Controllers/ProjectController.php
+++ b/app/Http/Controllers/ProjectController.php
@@ -46,7 +46,7 @@ class ProjectController extends Controller
if (!$application) {
return redirect()->route('home');
}
- return view('project.applications.configuration', ['application' => $application]);
+ return view('project.application.configuration', ['application' => $application]);
}
public function application_deployments()
{
@@ -62,7 +62,7 @@ class ProjectController extends Controller
if (!$application) {
return redirect()->route('home');
}
- return view('project.applications.deployments', ['application' => $application, 'deployments' => $application->deployments()]);
+ return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]);
}
public function application_deployment()
@@ -83,7 +83,7 @@ class ProjectController extends Controller
}
$activity = Activity::where('properties->deployment_uuid', '=', $deployment_uuid)->first();
- return view('project.applications.deployment', [
+ return view('project.application.deployment', [
'application' => $application,
'activity' => $activity,
'deployment_uuid' => $deployment_uuid,
diff --git a/app/Http/Livewire/DeployApplication.php b/app/Http/Livewire/Project/Application/Deploy.php
similarity index 93%
rename from app/Http/Livewire/DeployApplication.php
rename to app/Http/Livewire/Project/Application/Deploy.php
index 4294c08d61..9a1263eda3 100644
--- a/app/Http/Livewire/DeployApplication.php
+++ b/app/Http/Livewire/Project/Application/Deploy.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Http\Livewire;
+namespace App\Http\Livewire\Project\Application;
use App\Jobs\DeployApplicationJob;
use App\Models\Application;
@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Route;
use Livewire\Component;
use Visus\Cuid2\Cuid2;
-class DeployApplication extends Component
+class Deploy extends Component
{
public string $applicationId;
public $activity;
@@ -35,7 +35,7 @@ class DeployApplication extends Component
}
protected function redirectToDeployment()
{
- return redirect()->route('project.applications.deployment', $this->parameters);
+ return redirect()->route('project.application.deployment', $this->parameters);
}
public function start()
{
diff --git a/app/Http/Livewire/Application/Destination.php b/app/Http/Livewire/Project/Application/Destination.php
similarity index 66%
rename from app/Http/Livewire/Application/Destination.php
rename to app/Http/Livewire/Project/Application/Destination.php
index a630941cc5..571c81d9bc 100644
--- a/app/Http/Livewire/Application/Destination.php
+++ b/app/Http/Livewire/Project/Application/Destination.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Http\Livewire\Application;
+namespace App\Http\Livewire\Project\Application;
use Livewire\Component;
diff --git a/app/Http/Livewire/Application/EnvironmentVariables.php b/app/Http/Livewire/Project/Application/EnvironmentVariables.php
similarity index 69%
rename from app/Http/Livewire/Application/EnvironmentVariables.php
rename to app/Http/Livewire/Project/Application/EnvironmentVariables.php
index 29a73bb8c6..dc05c61c78 100644
--- a/app/Http/Livewire/Application/EnvironmentVariables.php
+++ b/app/Http/Livewire/Project/Application/EnvironmentVariables.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Http\Livewire\Application;
+namespace App\Http\Livewire\Project\Application;
use Livewire\Component;
diff --git a/app/Http/Livewire/Application/General.php b/app/Http/Livewire/Project/Application/General.php
similarity index 98%
rename from app/Http/Livewire/Application/General.php
rename to app/Http/Livewire/Project/Application/General.php
index 6e8db8ca72..1bf6706ac3 100644
--- a/app/Http/Livewire/Application/General.php
+++ b/app/Http/Livewire/Project/Application/General.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Http\Livewire\Application;
+namespace App\Http\Livewire\Project\Application;
use App\Models\Application;
use Livewire\Component;
diff --git a/app/Http/Livewire/PollDeployment.php b/app/Http/Livewire/Project/Application/GetDeployments.php
similarity index 83%
rename from app/Http/Livewire/PollDeployment.php
rename to app/Http/Livewire/Project/Application/GetDeployments.php
index d58cf4f243..1037eb727d 100644
--- a/app/Http/Livewire/PollDeployment.php
+++ b/app/Http/Livewire/Project/Application/GetDeployments.php
@@ -1,11 +1,11 @@
<?php
-namespace App\Http\Livewire;
+namespace App\Http\Livewire\Project\Application;
use Livewire\Component;
use Spatie\Activitylog\Models\Activity;
-class PollDeployment extends Component
+class GetDeployments extends Component
{
public string $deployment_uuid;
public string $created_at;
diff --git a/app/Http/Livewire/PollActivity.php b/app/Http/Livewire/Project/Application/PollDeployment.php
similarity index 88%
rename from app/Http/Livewire/PollActivity.php
rename to app/Http/Livewire/Project/Application/PollDeployment.php
index b10fc8da6c..148cadf27c 100644
--- a/app/Http/Livewire/PollActivity.php
+++ b/app/Http/Livewire/Project/Application/PollDeployment.php
@@ -1,11 +1,11 @@
<?php
-namespace App\Http\Livewire;
+namespace App\Http\Livewire\Project\Application;
use Livewire\Component;
use Spatie\Activitylog\Models\Activity;
-class PollActivity extends Component
+class PollDeployment extends Component
{
public $activity;
public $isKeepAliveOn = true;
diff --git a/app/Http/Livewire/Application/Source.php b/app/Http/Livewire/Project/Application/Source.php
similarity index 90%
rename from app/Http/Livewire/Application/Source.php
rename to app/Http/Livewire/Project/Application/Source.php
index f4981846b6..16d7eeadcb 100644
--- a/app/Http/Livewire/Application/Source.php
+++ b/app/Http/Livewire/Project/Application/Source.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Http\Livewire\Application;
+namespace App\Http\Livewire\Project\Application;
use App\Models\Application;
use Livewire\Component;
diff --git a/app/Http/Livewire/Application/Storages.php b/app/Http/Livewire/Project/Application/Storages.php
similarity index 75%
rename from app/Http/Livewire/Application/Storages.php
rename to app/Http/Livewire/Project/Application/Storages.php
index 340c897ada..38d5b45954 100644
--- a/app/Http/Livewire/Application/Storages.php
+++ b/app/Http/Livewire/Project/Application/Storages.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Http\Livewire\Application;
+namespace App\Http\Livewire\Project\Application;
use Illuminate\Database\Eloquent\Collection;
use Livewire\Component;
diff --git a/app/Http/Livewire/Project/NewProject.php b/app/Http/Livewire/Project/NewProject.php
new file mode 100644
index 0000000000..b24a31580f
--- /dev/null
+++ b/app/Http/Livewire/Project/NewProject.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace App\Http\Livewire\Project;
+
+use Livewire\Component;
+
+class NewProject extends Component
+{
+
+}
diff --git a/resources/views/components/applications/navbar.blade.php b/resources/views/components/applications/navbar.blade.php
index 84112940d0..ef6716338b 100644
--- a/resources/views/components/applications/navbar.blade.php
+++ b/resources/views/components/applications/navbar.blade.php
@@ -1,5 +1,5 @@
<nav class="flex gap-4 py-2 bg-gray-100">
- <a href="{{ route('project.applications.configuration', Route::current()->parameters()) }}">Configuration</a>
- <a href="{{ route('project.applications.deployments', Route::current()->parameters()) }}">Deployments</a>
- <livewire:deploy-application :applicationId="$applicationId" />
+ <a href="{{ route('project.application.configuration', Route::current()->parameters()) }}">Configuration</a>
+ <a href="{{ route('project.application.deployments', Route::current()->parameters()) }}">Deployments</a>
+ <livewire:project.application.deploy :applicationId="$applicationId" />
</nav>
diff --git a/resources/views/home.blade.php b/resources/views/dashboard.blade.php
similarity index 81%
rename from resources/views/home.blade.php
rename to resources/views/dashboard.blade.php
index 86159f0824..c13d96d292 100644
--- a/resources/views/home.blade.php
+++ b/resources/views/dashboard.blade.php
@@ -1,5 +1,5 @@
<x-layout>
- <h1>Projects</h1>
+ <h1>Projects <button><a class="no-underline" href="{{ route('project.new') }}">New</a></button></h1>
@forelse ($projects as $project)
<a href="{{ route('project.environments', [$project->uuid]) }}">{{ data_get($project, 'name') }}</a>
@empty
diff --git a/resources/views/livewire/deploy-application.blade.php b/resources/views/livewire/project/application/deploy.blade.php
similarity index 100%
rename from resources/views/livewire/deploy-application.blade.php
rename to resources/views/livewire/project/application/deploy.blade.php
diff --git a/resources/views/livewire/application/destination.blade.php b/resources/views/livewire/project/application/destination.blade.php
similarity index 100%
rename from resources/views/livewire/application/destination.blade.php
rename to resources/views/livewire/project/application/destination.blade.php
diff --git a/resources/views/livewire/application/environment-variables.blade.php b/resources/views/livewire/project/application/environment-variables.blade.php
similarity index 100%
rename from resources/views/livewire/application/environment-variables.blade.php
rename to resources/views/livewire/project/application/environment-variables.blade.php
diff --git a/resources/views/livewire/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php
similarity index 100%
rename from resources/views/livewire/application/general.blade.php
rename to resources/views/livewire/project/application/general.blade.php
diff --git a/resources/views/livewire/poll-deployment.blade.php b/resources/views/livewire/project/application/get-deployments.blade.php
similarity index 100%
rename from resources/views/livewire/poll-deployment.blade.php
rename to resources/views/livewire/project/application/get-deployments.blade.php
diff --git a/resources/views/livewire/poll-activity.blade.php b/resources/views/livewire/project/application/poll-deployment.blade.php
similarity index 100%
rename from resources/views/livewire/poll-activity.blade.php
rename to resources/views/livewire/project/application/poll-deployment.blade.php
diff --git a/resources/views/livewire/application/source.blade.php b/resources/views/livewire/project/application/source.blade.php
similarity index 100%
rename from resources/views/livewire/application/source.blade.php
rename to resources/views/livewire/project/application/source.blade.php
diff --git a/resources/views/livewire/application/storages.blade.php b/resources/views/livewire/project/application/storages.blade.php
similarity index 100%
rename from resources/views/livewire/application/storages.blade.php
rename to resources/views/livewire/project/application/storages.blade.php
diff --git a/resources/views/livewire/project/new-project.blade.php b/resources/views/livewire/project/new-project.blade.php
new file mode 100644
index 0000000000..e22a7f78f7
--- /dev/null
+++ b/resources/views/livewire/project/new-project.blade.php
@@ -0,0 +1,11 @@
+<div>
+ <div class="flex flex-col w-64 gap-2">
+ <button>Repository (any git)</button>
+ <button>Repository through GitHub App</button>
+ <button>Repository through GitLab App</button>
+ <button>Repository through Bitbucket App</button>
+ <button>Deploy Database</button>
+ <button>Deploy Service</button>
+ <button>Empty Project</button>
+ </div>
+</div>
diff --git a/resources/views/project/applications/configuration.blade.php b/resources/views/project/application/configuration.blade.php
similarity index 72%
rename from resources/views/project/applications/configuration.blade.php
rename to resources/views/project/application/configuration.blade.php
index ee33b1b43b..0a83858d5b 100644
--- a/resources/views/project/applications/configuration.blade.php
+++ b/resources/views/project/application/configuration.blade.php
@@ -10,19 +10,19 @@
</a>
</div>
<div x-cloak x-show="tab === 'general'">
- <livewire:application.general :applicationId="$application->id" />
+ <livewire:project.application.general :applicationId="$application->id" />
</div>
<div x-cloak x-show="tab === 'envs'">
- <livewire:application.environment-variables />
+ <livewire:project.application.environment-variables />
</div>
<div x-cloak x-show="tab === 'source'">
- <livewire:application.source :applicationId="$application->id" />
+ <livewire:project.application.source :applicationId="$application->id" />
</div>
<div x-cloak x-show="tab === 'destination'">
- <livewire:application.destination :destination="$application->destination" />
+ <livewire:project.application.destination :destination="$application->destination" />
</div>
<div x-cloak x-show="tab === 'storages'">
- <livewire:application.storages :storages="$application->persistentStorages" />
+ <livewire:project.application.storages :storages="$application->persistentStorages" />
</div>
</div>
</x-applications.layout>
diff --git a/resources/views/project/application/deployment.blade.php b/resources/views/project/application/deployment.blade.php
new file mode 100644
index 0000000000..48c245f987
--- /dev/null
+++ b/resources/views/project/application/deployment.blade.php
@@ -0,0 +1,3 @@
+<x-applications.layout :applicationId="$application->id" title="Deployment">
+ <livewire:project.application.poll-deployment :activity="$activity" :deployment_uuid="$deployment_uuid" />
+</x-applications.layout>
diff --git a/resources/views/project/applications/deployments.blade.php b/resources/views/project/application/deployments.blade.php
similarity index 52%
rename from resources/views/project/applications/deployments.blade.php
rename to resources/views/project/application/deployments.blade.php
index 47b7cf34d8..71df4c7dfc 100644
--- a/resources/views/project/applications/deployments.blade.php
+++ b/resources/views/project/application/deployments.blade.php
@@ -1,8 +1,7 @@
<x-applications.layout :applicationId="$application->id" title="Deployments">
<div class="pt-2">
@forelse ($deployments as $deployment)
- <livewire:poll-deployment :deployment_uuid="data_get($deployment->properties, 'deployment_uuid')" :created_at="data_get($deployment, 'created_at')" :status="data_get($deployment->properties, 'status')" />
-
+ <livewire:project.application.get-deployments :deployment_uuid="data_get($deployment->properties, 'deployment_uuid')" :created_at="data_get($deployment, 'created_at')" :status="data_get($deployment->properties, 'status')" />
@empty
<p>No deployments found.</p>
@endforelse
diff --git a/resources/views/project/applications/deployment.blade.php b/resources/views/project/applications/deployment.blade.php
deleted file mode 100644
index 07c148b79e..0000000000
--- a/resources/views/project/applications/deployment.blade.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<x-applications.layout :applicationId="$application->id" title="Deployment">
- <livewire:poll-activity :activity="$activity" :deployment_uuid="$deployment_uuid" />
-</x-applications.layout>
diff --git a/resources/views/project/new.blade.php b/resources/views/project/new.blade.php
new file mode 100644
index 0000000000..f23e5726f2
--- /dev/null
+++ b/resources/views/project/new.blade.php
@@ -0,0 +1,4 @@
+<x-layout>
+ <h1>New Project</h1>
+ <livewire:project.new-project />
+</x-layout>
diff --git a/resources/views/project/resources.blade.php b/resources/views/project/resources.blade.php
index f3249dfb0d..85ad66146b 100644
--- a/resources/views/project/resources.blade.php
+++ b/resources/views/project/resources.blade.php
@@ -3,7 +3,7 @@
<div>
@foreach ($environment->applications as $application)
<p>
- <a href="{{ route('project.applications.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
+ <a href="{{ route('project.application.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
{{ $application->name }}
</a>
</p>
diff --git a/routes/web.php b/routes/web.php
index bfe2f035d0..826729807e 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -23,11 +23,11 @@ Route::middleware(['auth'])->group(function () {
Route::get('/', function () {
$projects = session('currentTeam')->load(['projects'])->projects;
$servers = session('currentTeam')->load(['servers'])->servers;
- return view('home', [
+ return view('dashboard', [
'servers' => $servers->sortBy('name'),
'projects' => $projects->sortBy('name')
]);
- })->name('home');
+ })->name('dashboard');
Route::get('/profile', function () {
return view('profile');
@@ -67,6 +67,7 @@ Route::middleware(['auth'])->group(function () {
});
Route::middleware(['auth'])->group(function () {
+ Route::get('/project/new', fn () => view('project.new'))->name('project.new');
Route::get(
'/project/{project_uuid}',
[ProjectController::class, 'environments']
@@ -80,15 +81,15 @@ Route::middleware(['auth'])->group(function () {
Route::get(
'/project/{project_uuid}/{environment_name}/application/{application_uuid}',
[ApplicationController::class, 'configuration']
- )->name('project.applications.configuration');
+ )->name('project.application.configuration');
Route::get(
'/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment',
[ApplicationController::class, 'deployments']
- )->name('project.applications.deployments');
+ )->name('project.application.deployments');
Route::get(
'/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment/{deployment_uuid}',
[ApplicationController::class, 'deployment']
- )->name('project.applications.deployment');
+ )->name('project.application.deployment');
});