Added authentication slice skeleton

Necessary to provide initial scaffolding for implementing authentication functionality. This also ensures that application assets are imported for reuse within this slice.

Milestone: minor
This commit is contained in:
Brooke Kuhlmann
2025-09-29 11:11:40 -06:00
parent 772db31036
commit 8bd0c3a121
6 changed files with 61 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# frozen_string_literal: true
module Authentication
# The health slice configuration.
class Slice < Hanami::Slice
import keys: ["assets"], from: Hanami.app.container, as: :main
end
end
+11
View File
@@ -0,0 +1,11 @@
# frozen_string_literal: true
require "hanami/db/relation"
module Authentication
module DB
# The slice database relation.
class Relation < Terminus::DB::Relation
end
end
end
+11
View File
@@ -0,0 +1,11 @@
# frozen_string_literal: true
require "hanami/db/repo"
module Authentication
module DB
# The application database base repository.
class Repository < Terminus::DB::Repo
end
end
end
+11
View File
@@ -0,0 +1,11 @@
# frozen_string_literal: true
require "hanami/db/struct"
module Authentication
module DB
# The application database base struct.
class Struct < Terminus::DB::Struct
end
end
end
+9
View File
@@ -0,0 +1,9 @@
# auto_register: false
# frozen_string_literal: true
module Authentication
# The slice view.
class View < Terminus::View
config.paths += ["app/templates"]
end
end
+11
View File
@@ -0,0 +1,11 @@
# auto_register: false
# frozen_string_literal: true
module Authentication
module Views
# The slice view context.
class Context < Hanami::View::Context
include Deps[main_assets: "main.assets"]
end
end
end