mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-17 00:22:40 +00:00
Cleaned up flavours so they extend/override classic
This commit is contained in:
parent
4441f7ca9a
commit
51dac5c90b
|
@ -1,5 +1,6 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :env, config_env()
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :instance,
|
||||
federating: false,
|
||||
disable_test_apps: true,
|
||||
adapter: Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
|
||||
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
config :activity_pub, :endpoint_module, Bonfire.Web.Endpoint
|
||||
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
config :activity_pub, ecto_repos: [Bonfire.Common.Repo]
|
||||
config :activity_pub, :endpoint_module, Bonfire.Web.Endpoint
|
||||
|
||||
config :activity_pub, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
queues: false
|
||||
|
||||
config :activity_pub, :instance, federating: false
|
||||
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
|
||||
|
||||
config :tesla, adapter: Tesla.Mock
|
||||
|
||||
# Print only warnings and errors during test
|
||||
|
|
|
@ -2,28 +2,21 @@ import Config
|
|||
|
||||
default_locale = "en"
|
||||
|
||||
config :bonfire,
|
||||
localisation_path: "priv/localisation"
|
||||
|
||||
config :bonfire_common,
|
||||
otp_app: :bonfire
|
||||
|
||||
## Localisation & internationalisation
|
||||
# TODO: determine which keys can be set at runtime vs compile-time
|
||||
|
||||
# internationalisation
|
||||
config :bonfire_common, Bonfire.Common.Localise.Cldr,
|
||||
default_locale: default_locale,
|
||||
# locales that will be made available on top of those for which gettext localisation files are available
|
||||
locales: ["fr", "en", "es", "it", "vi"],
|
||||
locales: ["fr", "en", "es"],
|
||||
providers: [Cldr.Language],
|
||||
gettext: Bonfire.Common.Localise.Gettext,
|
||||
# extra Gettex modules from dependencies not using the one from Bonfire.Common, so we can change their locale too
|
||||
extra_gettext: [Timex.Gettext],
|
||||
data_dir: "priv/cldr",
|
||||
data_dir: "./priv/cldr",
|
||||
add_fallback_locales: true,
|
||||
# precompile_number_formats: ["¤¤#,##0.##"],
|
||||
# precompile_transliterations: [{:latn, :arab}, {:thai, :latn}]
|
||||
force_locale_download: Mix.env() == :prod,
|
||||
# force_locale_download: false,
|
||||
generate_docs: true
|
||||
|
||||
config :ex_cldr,
|
||||
|
|
|
@ -63,29 +63,43 @@ extensions_with_config =
|
|||
:bonfire_boundaries,
|
||||
:bonfire_federate_activitypub,
|
||||
:bonfire_search,
|
||||
:bonfire_mailer
|
||||
:bonfire_mailer,
|
||||
:bonfire_fail,
|
||||
:bonfire_pages_beacon
|
||||
]
|
||||
|
||||
extensions_with_ui =
|
||||
extensions_with_config ++
|
||||
context_and_queries_extensions ++
|
||||
[
|
||||
:bonfire_boundaries,
|
||||
:bonfire_federate_activitypub,
|
||||
:bonfire_search,
|
||||
:bonfire_ui_common,
|
||||
:bonfire_ui_me,
|
||||
:bonfire_ui_social,
|
||||
:bonfire_ui_valueflows,
|
||||
:bonfire_ui_cooperation,
|
||||
:bonfire_ui_coordination,
|
||||
:bonfire_ui_breadpub,
|
||||
:bonfire_ui_kanban,
|
||||
:bonfire_breadpub,
|
||||
:bonfire_recycleapp,
|
||||
:bonfire_ui_reflow
|
||||
:bonfire_upcycle,
|
||||
:bonfire_recyclapp,
|
||||
:bonfire_ui_reflow,
|
||||
:rauversion_extension
|
||||
]
|
||||
|
||||
config :bonfire, :verb_names, verbs
|
||||
config :bonfire, :context_modules_search_path, context_and_queries_extensions
|
||||
config :bonfire, :query_modules_search_path, context_and_queries_extensions
|
||||
config :bonfire, :config_modules_search_path, extensions_with_config
|
||||
config :bonfire, :ui_modules_search_path, extensions_with_ui
|
||||
|
||||
# NOTE: these shouldn't be needed anymore since we scan all apps with Bonfire.Common.ExtensionBehaviour
|
||||
config :bonfire, :extensions_grouped, %{
|
||||
Bonfire.Common.ContextModule => context_and_queries_extensions,
|
||||
Bonfire.Common.SchemaModule => context_and_queries_extensions,
|
||||
Bonfire.Common.QueryModule => context_and_queries_extensions,
|
||||
Bonfire.Common.ConfigModule => extensions_with_config,
|
||||
Bonfire.Common.ExtensionModule => extensions_with_ui,
|
||||
Bonfire.Common.WidgetModule => extensions_with_ui,
|
||||
Bonfire.Common.NavModule => extensions_with_ui
|
||||
}
|
||||
|
||||
# Search these apps/extensions for Verbs to index (i.e. they contain modules with a declare_verbs/0 function)
|
||||
config :bonfire_data_access_control,
|
||||
|
@ -152,6 +166,10 @@ alias Bonfire.Data.Social.PostContent
|
|||
alias Bonfire.Data.Social.Profile
|
||||
alias Bonfire.Data.Social.Replied
|
||||
alias Bonfire.Data.Social.Request
|
||||
alias Bonfire.Data.Social.Pin
|
||||
|
||||
alias Bonfire.Pages.Page
|
||||
alias Bonfire.Pages.Section
|
||||
|
||||
alias Bonfire.Classify.Category
|
||||
alias Bonfire.Geolocate.Geolocation
|
||||
|
@ -169,6 +187,7 @@ alias Bonfire.Tag.Tagged
|
|||
## `rm -Rf _build/*/lib/bonfire_data_*` a lot.
|
||||
|
||||
mixin = [foreign_key: :id, references: :id]
|
||||
mixin_updatable = mixin ++ [on_replace: :update]
|
||||
|
||||
common_assocs = %{
|
||||
### Mixins
|
||||
|
@ -181,23 +200,23 @@ common_assocs = %{
|
|||
# during deletion - when the caretaker is deleted, all their stuff will be too.
|
||||
caretaker: quote(do: has_one(:caretaker, unquote(Caretaker), unquote(mixin))),
|
||||
# A Character has a unique username and some feeds.
|
||||
character: quote(do: has_one(:character, unquote(Character), unquote(mixin))),
|
||||
character: quote(do: has_one(:character, unquote(Character), unquote(mixin_updatable))),
|
||||
# Indicates the creator of an object
|
||||
created: quote(do: has_one(:created, unquote(Created), unquote(mixin))),
|
||||
# Used for non-textual interactions such as likes and follows to indicate the other object.
|
||||
edge: quote(do: has_one(:edge, unquote(Edge), unquote(mixin))),
|
||||
# Adds a name that can appear in the user interface for an object. e.g. for an ACL.
|
||||
named: quote(do: has_one(:named, unquote(Named), unquote(mixin))),
|
||||
named: quote(do: has_one(:named, unquote(Named), unquote(mixin_updatable))),
|
||||
# Adds extra info that can appear in the user interface for an object. e.g. a summary or JSON-encoded data.
|
||||
extra_info: quote(do: has_one(:extra_info, unquote(ExtraInfo), unquote(mixin))),
|
||||
extra_info: quote(do: has_one(:extra_info, unquote(ExtraInfo), unquote(mixin_updatable))),
|
||||
# Information about the remote instance the object is from, if it is not local.
|
||||
peered: quote(do: has_one(:peered, unquote(Peered), unquote(mixin))),
|
||||
# Information about the content of posts, e.g. a scrubbed html body
|
||||
post_content: quote(do: has_one(:post_content, unquote(PostContent), unquote(mixin))),
|
||||
post_content: quote(do: has_one(:post_content, unquote(PostContent), unquote(mixin_updatable))),
|
||||
# Information about a user or other object that they wish to make available
|
||||
profile: quote(do: has_one(:profile, unquote(Profile), unquote(mixin))),
|
||||
profile: quote(do: has_one(:profile, unquote(Profile), unquote(mixin_updatable))),
|
||||
# Threading information, for threaded discussions.
|
||||
replied: quote(do: has_one(:replied, unquote(Replied), unquote(mixin))),
|
||||
replied: quote(do: has_one(:replied, unquote(Replied), unquote(mixin_updatable))),
|
||||
# Information that allows the system to identify special system-managed ACLS.
|
||||
stereotyped: quote(do: has_one(:stereotyped, unquote(Stereotyped), unquote(mixin))),
|
||||
|
||||
|
@ -246,13 +265,7 @@ common_assocs = %{
|
|||
# Retrieves activities where we are the object. e.g. if we are a
|
||||
# post or a user, this could turn up activities from likes or follows.
|
||||
activities:
|
||||
quote(
|
||||
do:
|
||||
has_many(:activities, unquote(Activity),
|
||||
foreign_key: :object_id,
|
||||
references: :id
|
||||
)
|
||||
),
|
||||
quote(do: has_many(:activities, unquote(Activity), foreign_key: :object_id, references: :id)),
|
||||
|
||||
### Stuff I'm not sure how to categorise yet
|
||||
|
||||
|
@ -265,24 +278,14 @@ common = fn names ->
|
|||
for name <- List.wrap(names) do
|
||||
with nil <- common_assocs[name],
|
||||
do:
|
||||
raise(RuntimeError,
|
||||
message: "Expected a common association name, got #{inspect(name)}"
|
||||
)
|
||||
raise(RuntimeError, message: "Expected a common association name, got #{inspect(name)}")
|
||||
end
|
||||
end
|
||||
|
||||
edge = common.([:controlled, :activities, :request, :created])
|
||||
|
||||
edges =
|
||||
common.([
|
||||
:controlled,
|
||||
:activities,
|
||||
:request,
|
||||
:created,
|
||||
:caretaker,
|
||||
:activity,
|
||||
:feed_publishes
|
||||
])
|
||||
common.([:controlled, :activities, :request, :created, :caretaker, :activity, :feed_publishes])
|
||||
|
||||
# first up, pointers could have all the mixins we're using. TODO
|
||||
|
||||
|
@ -375,7 +378,6 @@ config :bonfire_data_access_control, Circle,
|
|||
field(:encircles_count, :integer, virtual: true)
|
||||
# mixins
|
||||
unquote_splicing(common.([:caretaker, :named, :extra_info, :stereotyped]))
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
@ -403,10 +405,7 @@ config :bonfire_data_access_control, Verb, []
|
|||
config :bonfire_boundaries, Stereotyped,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:named, unquote(Named),
|
||||
foreign_key: :id,
|
||||
references: :stereotype_id
|
||||
)
|
||||
has_one(:named, unquote(Named), foreign_key: :id, references: :stereotype_id)
|
||||
end)
|
||||
|
||||
# bonfire_data_activity_pub
|
||||
|
@ -415,11 +414,7 @@ config :bonfire_data_activity_pub, Actor,
|
|||
code:
|
||||
(quote do
|
||||
# hacks
|
||||
belongs_to(:character, unquote(Character),
|
||||
foreign_key: :id,
|
||||
define_field: false
|
||||
)
|
||||
|
||||
belongs_to(:character, unquote(Character), foreign_key: :id, define_field: false)
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
# mixins
|
||||
unquote_splicing(common.([:peered]))
|
||||
|
@ -462,7 +457,6 @@ config :bonfire_data_identity, Caretaker,
|
|||
code:
|
||||
(quote do
|
||||
has_one(:user, unquote(User), foreign_key: :id, references: :caretaker_id)
|
||||
|
||||
# mixins
|
||||
unquote_splicing(common.([:character, :profile]))
|
||||
end)
|
||||
|
@ -475,16 +469,8 @@ config :bonfire_data_identity, Character,
|
|||
unquote_splicing(common.([:actor, :peered, :profile]))
|
||||
has_one(:user, unquote(User), unquote(mixin))
|
||||
has_one(:feed, unquote(Feed), unquote(mixin))
|
||||
|
||||
has_many(:followers, unquote(Follow),
|
||||
foreign_key: :following_id,
|
||||
references: :id
|
||||
)
|
||||
|
||||
has_many(:followed, unquote(Follow),
|
||||
foreign_key: :follower_id,
|
||||
references: :id
|
||||
)
|
||||
has_many(:followers, unquote(Follow), foreign_key: :following_id, references: :id)
|
||||
has_many(:followed, unquote(Follow), foreign_key: :follower_id, references: :id)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
|
@ -496,20 +482,14 @@ config :bonfire_data_identity, Character,
|
|||
config :bonfire_data_identity, Credential,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:account, unquote(Account),
|
||||
foreign_key: :id,
|
||||
define_field: false
|
||||
)
|
||||
belongs_to(:account, unquote(Account), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Email,
|
||||
must_confirm: true,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:account, unquote(Account),
|
||||
foreign_key: :id,
|
||||
define_field: false
|
||||
)
|
||||
belongs_to(:account, unquote(Account), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Self, []
|
||||
|
@ -522,18 +502,11 @@ config :bonfire_data_identity, User,
|
|||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
# mixins
|
||||
has_one(:accounted, unquote(Accounted), foreign_key: :id)
|
||||
|
||||
has_one(:instance_admin, unquote(InstanceAdmin),
|
||||
foreign_key: :id,
|
||||
on_replace: :update
|
||||
)
|
||||
|
||||
has_one(:instance_admin, unquote(InstanceAdmin), foreign_key: :id, on_replace: :update)
|
||||
has_one(:self, unquote(Self), foreign_key: :id)
|
||||
has_one(:shared_user, unquote(Bonfire.Data.SharedUser), foreign_key: :id)
|
||||
has_one(:settings, unquote(Settings), foreign_key: :id)
|
||||
|
||||
unquote_splicing(common.([:actor, :character, :created, :peered, :profile]))
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
# manies
|
||||
|
@ -555,10 +528,7 @@ config :bonfire_data_identity, User,
|
|||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:user_activities, unquote(Activity),
|
||||
foreign_key: :subject_id,
|
||||
references: :id
|
||||
)
|
||||
has_many(:user_activities, unquote(Activity), foreign_key: :subject_id, references: :id)
|
||||
|
||||
has_many(:boost_activities, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
|
@ -594,22 +564,15 @@ config :bonfire_data_social, Activity,
|
|||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
has_many(:feed_publishes, unquote(FeedPublish), unquote(mixin))
|
||||
has_one(:seen, unquote(Edge), foreign_key: :object_id, references: :id)
|
||||
|
||||
# ugly workaround needed for certain queries (TODO: check if still needed)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :id, references: :id)
|
||||
# mixins linked to the object rather than the activity:
|
||||
has_one(:created, unquote(Created),
|
||||
foreign_key: :id,
|
||||
references: :object_id
|
||||
)
|
||||
|
||||
has_one(:replied, unquote(Replied),
|
||||
foreign_key: :id,
|
||||
references: :object_id
|
||||
)
|
||||
|
||||
has_one(:created, unquote(Created), foreign_key: :id, references: :object_id)
|
||||
has_one(:replied, unquote(Replied), foreign_key: :id, references: :object_id)
|
||||
field(:path, EctoMaterializedPath.ULIDs, virtual: true)
|
||||
|
||||
field(:federate_activity_pub, :any, virtual: true)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
|
@ -628,15 +591,8 @@ config :bonfire_data_social, Activity,
|
|||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:controlled, unquote(Controlled),
|
||||
foreign_key: :id,
|
||||
references: :object_id
|
||||
)
|
||||
|
||||
has_many(:tagged, unquote(Tagged),
|
||||
foreign_key: :id,
|
||||
references: :object_id
|
||||
)
|
||||
has_many(:controlled, unquote(Controlled), foreign_key: :id, references: :object_id)
|
||||
has_many(:tagged, unquote(Tagged), foreign_key: :id, references: :object_id)
|
||||
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
|
@ -685,11 +641,7 @@ config :bonfire_data_social, FeedPublish,
|
|||
code:
|
||||
(quote do
|
||||
field(:dummy, :any, virtual: true)
|
||||
|
||||
has_one(:activity, unquote(Activity),
|
||||
foreign_key: :object_id,
|
||||
references: :id
|
||||
)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :object_id, references: :id)
|
||||
|
||||
# belongs_to :character, unquote(Character), foreign_key: :id, define_field: false
|
||||
# belongs_to :user, unquote(User), foreign_key: :id, define_field: false
|
||||
|
@ -728,6 +680,12 @@ config :bonfire_data_social, Like,
|
|||
|
||||
# has_one: [activity: {Activity, foreign_key: :object_id, references: :liked_id}] # requires an ON clause
|
||||
|
||||
config :bonfire_data_social, Pin,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Flag,
|
||||
code:
|
||||
(quote do
|
||||
|
@ -753,19 +711,11 @@ config :bonfire_data_social, Message,
|
|||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([
|
||||
:activity,
|
||||
:caretaker,
|
||||
:created,
|
||||
:peered,
|
||||
:post_content,
|
||||
:replied
|
||||
])
|
||||
common.([:activity, :caretaker, :created, :peered, :post_content, :replied])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :feed_publishes, :tagged, :tags, :files, :media]))
|
||||
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
# special
|
||||
|
@ -791,20 +741,11 @@ config :bonfire_data_social, Post,
|
|||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([
|
||||
:activities,
|
||||
:activity,
|
||||
:caretaker,
|
||||
:created,
|
||||
:peered,
|
||||
:post_content,
|
||||
:replied
|
||||
])
|
||||
common.([:activities, :activity, :caretaker, :created, :peered, :post_content, :replied])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media, :feed_publishes]))
|
||||
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
# special
|
||||
|
@ -855,52 +796,24 @@ config :bonfire_data_social, Replied,
|
|||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
belongs_to(:post, unquote(Post), foreign_key: :id, define_field: false)
|
||||
|
||||
belongs_to(:post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
define_field: false
|
||||
)
|
||||
|
||||
has_one(:activity, unquote(Activity),
|
||||
foreign_key: :object_id,
|
||||
references: :id
|
||||
)
|
||||
|
||||
belongs_to(:post_content, unquote(PostContent), foreign_key: :id, define_field: false)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :object_id, references: :id)
|
||||
# used in changesets
|
||||
field(:replying_to, :map, virtual: true)
|
||||
|
||||
has_one(:reply_to_post, unquote(Post),
|
||||
foreign_key: :id,
|
||||
references: :reply_to_id
|
||||
)
|
||||
has_one(:reply_to_post, unquote(Post), foreign_key: :id, references: :reply_to_id)
|
||||
|
||||
has_one(:reply_to_post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
references: :reply_to_id
|
||||
)
|
||||
|
||||
has_one(:reply_to_created, unquote(Created),
|
||||
foreign_key: :id,
|
||||
references: :reply_to_id
|
||||
)
|
||||
|
||||
has_one(:reply_to_created, unquote(Created), foreign_key: :id, references: :reply_to_id)
|
||||
# has_one :reply_to_creator_user, through: [:reply_to_created, :creator_user]
|
||||
# has_one :reply_to_creator_character, through: [:reply_to_created, :creator_character]
|
||||
# has_one :reply_to_creator_profile, through: [:reply_to_created, :creator_profile]
|
||||
has_many(:direct_replies, unquote(Replied),
|
||||
foreign_key: :reply_to_id,
|
||||
references: :id
|
||||
)
|
||||
|
||||
has_many(:thread_replies, unquote(Replied),
|
||||
foreign_key: :thread_id,
|
||||
references: :id
|
||||
)
|
||||
|
||||
has_one(:thread_post, unquote(Post),
|
||||
foreign_key: :id,
|
||||
references: :thread_id
|
||||
)
|
||||
has_many(:direct_replies, unquote(Replied), foreign_key: :reply_to_id, references: :id)
|
||||
has_many(:thread_replies, unquote(Replied), foreign_key: :thread_id, references: :id)
|
||||
has_one(:thread_post, unquote(Post), foreign_key: :id, references: :thread_id)
|
||||
|
||||
has_one(:thread_post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
|
@ -923,10 +836,7 @@ config :bonfire_data_social, Replied,
|
|||
config :bonfire_data_social, Created,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:creator_user, unquote(User),
|
||||
foreign_key: :creator_id,
|
||||
define_field: false
|
||||
)
|
||||
belongs_to(:creator_user, unquote(User), foreign_key: :creator_id, define_field: false)
|
||||
|
||||
belongs_to(:creator_character, unquote(Character),
|
||||
foreign_key: :creator_id,
|
||||
|
@ -954,6 +864,86 @@ config :bonfire_data_social, Profile,
|
|||
|
||||
######### other extensions
|
||||
|
||||
config :bonfire_pages, Page,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(common.([:activities, :activity, :caretaker, :created, :post_content]))
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media, :feed_publishes]))
|
||||
|
||||
# special
|
||||
has_one(:permitted, unquote(Permitted), foreign_key: :object_id)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_many(:ranked, unquote(Bonfire.Data.Assort.Ranked),
|
||||
foreign_key: :scope_id,
|
||||
references: :id
|
||||
)
|
||||
|
||||
# add references of page sections
|
||||
many_to_many(:sections, unquote(Pointer),
|
||||
join_through: unquote(Bonfire.Data.Assort.Ranked),
|
||||
unique: true,
|
||||
join_keys: [scope_id: :id, item_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_pages, Section,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(common.([:activities, :activity, :caretaker, :created, :post_content]))
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media, :feed_publishes]))
|
||||
|
||||
# special
|
||||
has_one(:permitted, unquote(Permitted), foreign_key: :object_id)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_many(:ranked, unquote(Bonfire.Data.Assort.Ranked),
|
||||
foreign_key: :item_id,
|
||||
references: :id
|
||||
)
|
||||
|
||||
# add references of page sections
|
||||
many_to_many(:pages, unquote(Pointer),
|
||||
join_through: unquote(Bonfire.Data.Assort.Ranked),
|
||||
unique: true,
|
||||
join_keys: [item_id: :id, scope_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_files, Media,
|
||||
code:
|
||||
(quote do
|
||||
|
@ -975,7 +965,6 @@ config :bonfire_classify, Category,
|
|||
# mixins
|
||||
# TODO :caretaker
|
||||
unquote_splicing(common.([:activity, :created, :actor, :peered, :profile, :character]))
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :feed_publishes]))
|
||||
|
||||
|
@ -995,15 +984,7 @@ config :bonfire_geolocate, Bonfire.Geolocate.Geolocation,
|
|||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([
|
||||
:activity,
|
||||
:caretaker,
|
||||
:created,
|
||||
:actor,
|
||||
:peered,
|
||||
:profile,
|
||||
:character
|
||||
])
|
||||
common.([:activity, :caretaker, :created, :actor, :peered, :profile, :character])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
import Config
|
||||
|
||||
alias Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
actor_types = ["Person", "Group", "Application", "Service", "Organization"]
|
||||
|
||||
# compile envs
|
||||
config :bonfire,
|
||||
federation_search_path: [
|
||||
:bonfire_common,
|
||||
:bonfire_me,
|
||||
:bonfire_social,
|
||||
:bonfire_valueflows,
|
||||
:bonfire_classify,
|
||||
:bonfire_geolocate,
|
||||
:bonfire_quantify
|
||||
],
|
||||
# enable/disable logging of federation logic
|
||||
log_federation: true,
|
||||
federation_fallback_module: Bonfire.Social.APActivities
|
||||
|
||||
config :bonfire, actor_AP_types: actor_types
|
||||
|
||||
# config :bonfire, Bonfire.Instance,
|
||||
# hostname: hostname,
|
||||
# description: desc
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
import Config
|
||||
|
||||
# see `Bonfire.Files.RuntimeConfig` for what env vars to set
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_data_shared_user,
|
||||
disabled: false
|
||||
|
||||
config :bonfire_api_graphql,
|
||||
disabled: false
|
|
@ -1,11 +1,8 @@
|
|||
import Config
|
||||
|
||||
# NOTE: make sure you also copy the config that needs to go in your app's runtime.exs config
|
||||
|
||||
config :bonfire_livebook,
|
||||
disabled: false
|
||||
|
||||
config :livebook, :base_url_path, "/livebook/"
|
||||
disabled: false,
|
||||
base_url_path: "/livebook/"
|
||||
|
||||
# Sets the default authentication mode to token
|
||||
config :livebook, :authentication_mode, :token
|
||||
|
|
|
@ -6,5 +6,5 @@ config :bonfire_mailer,
|
|||
|
||||
config :bonfire, Bonfire.Mailer,
|
||||
# what service you want to use to send emails, from these: https://github.com/thoughtbot/bamboo#available-adapters
|
||||
# we recommend leaving LocalAdapter (which is just a fallback which won't actually send emails) and setting the actual adapter in runtime config, refer to the env vars in `Bonfire.Mailer.RuntimeConfig`
|
||||
# we recommend leaving LocalAdapter (which is just a fallback which won't actually send emails) and setting the actual adapter in runtime.exs
|
||||
adapter: Bamboo.LocalAdapter
|
||||
|
|
|
@ -5,3 +5,4 @@ config :bonfire_quantify,
|
|||
|
||||
# specify what types a unit can have as context
|
||||
config :bonfire_quantify, Bonfire.Quantify.Units, valid_contexts: [:any]
|
||||
# Bonfire.Quantify.Units, Bonfire.Data.Identity.User
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import Config
|
||||
|
||||
# see Bonfire.Search.RuntimeConfig for env vars configured at runtime
|
||||
config :bonfire_search,
|
||||
adapter: Bonfire.Search.Meili
|
||||
|
||||
# for use by API client
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
config :phoenix, :format_encoders, json: Jason
|
||||
|
|
|
@ -1,22 +1,18 @@
|
|||
import Config
|
||||
|
||||
# Please note that these are defaults meant to be overridden in Settings rather than edited here
|
||||
# Please note that most of these are defaults meant to be overridden by instance admins in Settings rather than edited here
|
||||
config :bonfire, :ui,
|
||||
theme: [
|
||||
instance_name: "Bonfire",
|
||||
instance_theme: "bonfire",
|
||||
instance_theme_light: "light",
|
||||
instance_icon: "/images/bonfire-icon.png",
|
||||
instance_image: "/images/bonfires.png",
|
||||
instance_description: "This is a bonfire demo instance for testing purposes",
|
||||
instance_welcome: [
|
||||
title: "👋 Welcome",
|
||||
description: "
|
||||
Bonfire is a federated social networking toolkit for communities and individuals to design, operate and control their digital lives, by assembling their own social networks like lego blocks in order to cultivate safe and private spaces while being interconnected with the rest of the 'fediverse' and the internet at wide on their own terms.
|
||||
The bonfire ecosystem will include:
|
||||
1. Bonfire apps/flavours: Open source federated networks that are ready to be installed and used for different purposes. Made up of a set of pre-configured extensions.
|
||||
2. Bonfire extensions: Forkable/customisable modules providing different features or UX, ready to be used within bonfire apps.
|
||||
3. Bonfire device: A plug-and-play device to have anything you need in your hands (literally).
|
||||
4. Bonfire cloud services: Your public identity in the cloud can receive messages even when your device is offline. Syncs your Bonfire device with the fediverse, and deletes already-synced data from the cloud. Open source so others can host equivalent services.
|
||||
description:
|
||||
"Bonfire is a federated social networking toolkit to customise and host your own online space and control your experience at the most granular level.
|
||||
|
||||
More details at https://bonfirenetworks.org",
|
||||
links: [
|
||||
|
@ -27,8 +23,8 @@ More details at https://bonfirenetworks.org",
|
|||
]
|
||||
]
|
||||
],
|
||||
|
||||
# end theme
|
||||
hide_app_switcher: true,
|
||||
# rich_text_editor_disabled: true,
|
||||
rich_text_editor: Bonfire.Editor.Quill,
|
||||
# rich_text_editor: Bonfire.Editor.Ck,
|
||||
|
@ -41,7 +37,6 @@ More details at https://bonfirenetworks.org",
|
|||
"Noto Sans (More Languages)",
|
||||
"OpenDyslexic"
|
||||
],
|
||||
theme: "bonfire",
|
||||
themes: [
|
||||
"bonfire",
|
||||
"dark",
|
||||
|
@ -91,6 +86,7 @@ More details at https://bonfirenetworks.org",
|
|||
summary: true
|
||||
],
|
||||
profile: [
|
||||
# TODO: make dynamic based on active extensions
|
||||
sections: [
|
||||
timeline: Bonfire.UI.Social.ProfileTimelineLive,
|
||||
# private: Bonfire.UI.Social.MessageThreadsLive,
|
||||
|
@ -101,49 +97,31 @@ More details at https://bonfirenetworks.org",
|
|||
follow: Bonfire.UI.Me.RemoteInteractionFormLive
|
||||
],
|
||||
navigation: [
|
||||
timeline: "Timeline",
|
||||
posts: "Posts",
|
||||
boosts: "Boosts"
|
||||
# private: "Messages",
|
||||
timeline: "timeline",
|
||||
posts: "posts",
|
||||
boosts: "boosts"
|
||||
# private: "private",
|
||||
],
|
||||
widgets: []
|
||||
],
|
||||
category: [
|
||||
navigation: [
|
||||
timeline: "Published",
|
||||
submitted: "Submitted"
|
||||
],
|
||||
sections: [
|
||||
timeline: Bonfire.UI.Social.ProfileTimelineLive,
|
||||
posts: Bonfire.UI.Social.ProfilePostsLive,
|
||||
boosts: Bonfire.UI.Social.ProfileBoostsLive,
|
||||
followers: Bonfire.UI.Social.ProfileFollowsLive,
|
||||
follow: Bonfire.UI.Me.RemoteInteractionFormLive,
|
||||
new: Bonfire.Classify.Web.NewCategoryLive,
|
||||
settings: Bonfire.Classify.Web.SettingsLive
|
||||
]
|
||||
],
|
||||
invites_component: Bonfire.Invite.Links.Web.InvitesLive,
|
||||
smart_input_activities: [
|
||||
post: "Compose a post",
|
||||
category: "Create a topic"
|
||||
# offer: "Publish an offer",
|
||||
# need: "Publish a need",
|
||||
# transfer_resource: "Transfer a resource",
|
||||
# produce_resource: "Add a resource",
|
||||
# intent: "Indicate an itent",
|
||||
# economic_event: "Record an economic event",
|
||||
# process: "Define a process"
|
||||
category: "Create a topic",
|
||||
label: "New label"
|
||||
],
|
||||
smart_input_components: [
|
||||
post: Bonfire.UI.Social.WritePostContentLive,
|
||||
message: Bonfire.UI.Social.WritePostContentLive,
|
||||
category: Bonfire.Classify.Web.NewCategoryLive
|
||||
],
|
||||
invites_component: Bonfire.Invite.Links.Web.InvitesLive
|
||||
category: Bonfire.Classify.Web.NewCategoryLive,
|
||||
label: Bonfire.Classify.Web.NewLabelLive,
|
||||
page: Bonfire.Pages.Web.CreatePageLive,
|
||||
section: Bonfire.Pages.Web.EditSectionLive
|
||||
]
|
||||
|
||||
# config :surface_boxicon,
|
||||
# icons: [
|
||||
# regular: ["shield-x", "shield", "check-shield"],
|
||||
# solid: ["shield-x", "shield", "check-shield"],
|
||||
# logos: nil
|
||||
# ]
|
||||
config :surface_catalogue,
|
||||
title: "Bonfire UI",
|
||||
subtitle: "Surface Components Documentation & Examples"
|
||||
|
||||
config :iconify_ex,
|
||||
generated_icon_modules_path: "./extensions/bonfire/lib/web/icons"
|
||||
|
|
|
@ -25,7 +25,7 @@ config :bonfire,
|
|||
user_schema: Bonfire.Data.Identity.User,
|
||||
org_schema: Bonfire.Data.Identity.User,
|
||||
home_page: Bonfire.Web.HomeLive,
|
||||
user_home_page: Bonfire.UI.Social.FeedsLive,
|
||||
user_home_page: Bonfire.Web.HomeLive,
|
||||
# limit for prod
|
||||
default_pagination_limit: 15,
|
||||
# very high limit for prod
|
||||
|
@ -44,29 +44,28 @@ config :bonfire, Bonfire.Web.Endpoint,
|
|||
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
|
||||
transport_options: [socket_opts: [:inet6]]
|
||||
],
|
||||
render_errors: [
|
||||
view: Bonfire.UI.Common.ErrorView,
|
||||
accepts: ~w(html json),
|
||||
layout: false
|
||||
],
|
||||
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false],
|
||||
pubsub_server: Bonfire.PubSub
|
||||
|
||||
config :phoenix, :json_library, Jason
|
||||
config :phoenix_gon, :json_library, Jason
|
||||
|
||||
config :bonfire, ecto_repos: [Bonfire.Common.Repo]
|
||||
config :ecto_sparkles, :otp_app, :bonfire
|
||||
config :bonfire, :ecto_repos, [Bonfire.Common.Repo]
|
||||
config :rauversion_extension, :repo_module, Bonfire.Common.Repo
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
config :activity_pub, :endpoint_module, Bonfire.Web.Endpoint
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# point to the appropriate definition to support any Postgres extensions used by your Bonfire flavour or extensions
|
||||
types: Bonfire.Geolocate.PostgresTypes
|
||||
config :rauversion_extension, :user_schema, Bonfire.Data.Identity.User
|
||||
config :rauversion_extension, :router_helper, Bonfire.Web.Router.Helpers
|
||||
config :rauversion_extension, :default_layout_module, Bonfire.UI.Common.LayoutView
|
||||
config :rauversion_extension, :user_table, "pointers_pointer"
|
||||
config :rauversion_extension, :user_key_type, :uuid
|
||||
|
||||
# priv: flavour_path <> "/repo",
|
||||
config :ecto_sparkles, :otp_app, :bonfire
|
||||
|
||||
config :ecto_shorts,
|
||||
repo: Bonfire.Common.Repo,
|
||||
error_module: EctoShorts.Actions.Error
|
||||
config :bonfire, Bonfire.Common.Repo, types: Bonfire.Geolocate.PostgresTypes
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, types: Bonfire.Geolocate.PostgresTypes
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, database: "bonfire_test_instance"
|
||||
# priv: flavour_path <> "/repo"
|
||||
|
||||
# ecto query filtering
|
||||
# config :query_elf, :id_types, [:id, :binary_id, Pointers.ULID]
|
||||
|
@ -91,7 +90,8 @@ config :mime, :types, %{
|
|||
"application/json" => ["json"],
|
||||
"application/activity+json" => ["activity+json"],
|
||||
"application/ld+json" => ["ld+json"],
|
||||
"application/jrd+json" => ["jrd+json"]
|
||||
"application/jrd+json" => ["jrd+json"],
|
||||
"audio/ogg" => ["ogg"]
|
||||
}
|
||||
|
||||
config :sentry,
|
||||
|
@ -99,15 +99,21 @@ config :sentry,
|
|||
environment_name: Mix.env(),
|
||||
# enable_source_code_context: true,
|
||||
root_source_code_path: File.cwd!(),
|
||||
included_environments: [:prod, :dev],
|
||||
included_environments: [:prod],
|
||||
tags: %{app_version: Mix.Project.config()[:version]}
|
||||
|
||||
# include config for all used Bonfire extensions
|
||||
# include Bonfire-specific config files
|
||||
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
|
||||
# IO.inspect(include_config: config)
|
||||
import_config config
|
||||
end
|
||||
|
||||
# include configs for the current flavour (augmenting or overriding the previous ones)
|
||||
for config <- "flavour_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
|
||||
# IO.inspect(include_config: config)
|
||||
import_config config
|
||||
end
|
||||
|
||||
import_config "activity_pub.exs"
|
||||
|
||||
# finally, append/override config based on env, which will override any config set above (including from imported files)
|
||||
|
|
|
@ -1,55 +1,69 @@
|
|||
# absinthe_client = "https://github.com/mayel/absinthe_client"
|
||||
activity_pub = "https://github.com/bonfire-networks/activity_pub#develop"
|
||||
arrows = "https://github.com/bonfire-networks/arrows#main"
|
||||
bonfire_api_graphql = "https://github.com/bonfire-networks/bonfire_api_graphql#main"
|
||||
bonfire_valueflows_api_schema = "https://github.com/bonfire-networks/bonfire_valueflows_api_schema#main"
|
||||
bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#main"
|
||||
bonfire_classify = "https://github.com/bonfire-networks/bonfire_classify#main"
|
||||
## GENERAL
|
||||
bonfire = "https://github.com/bonfire-networks/bonfire_spark#main"
|
||||
bonfire_common = "https://github.com/bonfire-networks/bonfire_common#main"
|
||||
bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"
|
||||
bonfire_editor_quill = "https://github.com/bonfire-networks/bonfire_editor_quill#main"
|
||||
bonfire_mailer = "https://github.com/bonfire-networks/bonfire_mailer#main"
|
||||
bonfire_epics = "https://github.com/bonfire-networks/bonfire_epics#main"
|
||||
bonfire_ecto = "https://github.com/bonfire-networks/bonfire_ecto#main"
|
||||
bonfire_search = "https://github.com/bonfire-networks/bonfire_search#main"
|
||||
bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort#master"
|
||||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#main"
|
||||
bonfire_federate_activitypub = "https://github.com/bonfire-networks/bonfire_federate_activitypub#main"
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
|
||||
## Flavour:CLASSIC
|
||||
bonfire_data_access_control = "https://github.com/bonfire-networks/bonfire_data_access_control#main"
|
||||
bonfire_data_activity_pub = "https://github.com/bonfire-networks/bonfire_data_activity_pub#main"
|
||||
bonfire_data_edges = "https://github.com/bonfire-networks/bonfire_data_edges#main"
|
||||
bonfire_data_identity = "https://github.com/bonfire-networks/bonfire_data_identity#main"
|
||||
bonfire_data_shared_user = "https://github.com/bonfire-networks/bonfire_data_shared_user#main"
|
||||
bonfire_data_social = "https://github.com/bonfire-networks/bonfire_data_social#main"
|
||||
bonfire_ecto = "https://github.com/bonfire-networks/bonfire_ecto#main"
|
||||
bonfire_epics = "https://github.com/bonfire-networks/bonfire_epics#main"
|
||||
bonfire_federate_activitypub = "https://github.com/bonfire-networks/bonfire_federate_activitypub#main"
|
||||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
bonfire_geolocate = "https://github.com/bonfire-networks/bonfire_geolocate#main"
|
||||
bonfire_mailer = "https://github.com/bonfire-networks/bonfire_mailer#main"
|
||||
bonfire_data_edges = "https://github.com/bonfire-networks/bonfire_data_edges#main"
|
||||
bonfire_me = "https://github.com/bonfire-networks/bonfire_me#main"
|
||||
bonfire_quantify = "https://github.com/bonfire-networks/bonfire_quantify#main"
|
||||
bonfire_search = "https://github.com/bonfire-networks/bonfire_search#main"
|
||||
bonfire_social = "https://github.com/bonfire-networks/bonfire_social#main"
|
||||
bonfire_tag = "https://github.com/bonfire-networks/bonfire_tag#main"
|
||||
bonfire_ui_common = "https://github.com/bonfire-networks/bonfire_ui_common#main"
|
||||
bonfire_ui_social = "https://github.com/bonfire-networks/bonfire_ui_social#main"
|
||||
bonfire_ui_social = "https://github.com/bonfire-networks/bonfire_ui_social#main"
|
||||
bonfire_ui_me = "https://github.com/bonfire-networks/bonfire_ui_me#main"
|
||||
# bonfire_web_phoenix = "https://github.com/bonfire-networks/bonfire_web_phoenix#main"
|
||||
# bonfire_website = "https://github.com/bonfire-networks/bonfire_website#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
#ecto_shorts = "https://github.com/bonfire-networks/ecto_shorts#fix/sparkles-namespace"
|
||||
emote = "https://github.com/bonfire-networks/emote#master"
|
||||
flexto = "https://github.com/bonfire-networks/flexto#main"
|
||||
bonfire_data_shared_user = "https://github.com/bonfire-networks/bonfire_data_shared_user#main"
|
||||
bonfire_tag = "https://github.com/bonfire-networks/bonfire_tag#main"
|
||||
|
||||
## UTILS
|
||||
activity_pub = "https://github.com/bonfire-networks/activity_pub#develop"
|
||||
nodeinfo = "https://github.com/bonfire-networks/nodeinfo#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
ex_aws = "https://github.com/bonfire-networks/ex_aws#main"
|
||||
emote = "https://github.com/bonfire-networks/emote#master"
|
||||
paginator = "https://github.com/bonfire-networks/paginator#main"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
flexto = "https://github.com/bonfire-networks/flexto#main"
|
||||
pointers = "https://github.com/bonfire-networks/pointers#main"
|
||||
pointers_ulid = "https://github.com/bonfire-networks/pointers_ulid#main"
|
||||
# surface = "https://github.com/bonfire-networks/surface"
|
||||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
# ex_doc = "https://github.com/elixir-lang/ex_doc#main"
|
||||
#tree_magic = "https://github.com/bonfire-networks/tree_magic.ex"
|
||||
|
||||
# bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"
|
||||
bonfire_editor_quill = "https://github.com/bonfire-networks/bonfire_editor_quill#main"
|
||||
|
||||
## EXPERIMENTAL ##
|
||||
|
||||
bonfire_pages = "https://github.com/bonfire-networks/bonfire_pages#main"
|
||||
# bonfire_pages_beacon = "https://github.com/bonfire-networks/bonfire_pages_beacon"
|
||||
# beacon = "https://github.com/bonfire-networks/beacon#bonfire"
|
||||
# bonfire_website = "https://github.com/bonfire-networks/bonfire_website#main"
|
||||
|
||||
# bonfire_open_id = "https://github.com/bonfire-networks/bonfire_open_id#main"
|
||||
# boruta = "https://gitlab.com/patatoid/boruta_auth#master"
|
||||
furlex = "https://github.com/bonfire-networks/furlex#main"
|
||||
ex_aws = "https://github.com/bonfire-networks/ex_aws#main"
|
||||
|
||||
# surface_boxicon = "https://github.com/bonfire-networks/surface_boxicon#main"
|
||||
iconify_ex = "https://github.com/bonfire-networks/iconify_ex#main"
|
||||
# rauversion_extension = "https://github.com/mayel/rauversion-phx.git#modular-extension-step2"
|
||||
# need for rauversion:
|
||||
mogrify = "https://github.com/chaskiq/mogrify.git#identify-option"
|
||||
|
||||
bonfire_encrypt = "https://github.com/bonfire-networks/bonfire_encrypt#main"
|
||||
|
||||
# surface = "https://github.com/surface-ui/surface"
|
||||
# surface_catalogue = "https://github.com/surface-ui/surface_catalogue" # Testing a UI component library
|
||||
|
||||
# bonfire_livebook = "https://github.com/bonfire-networks/bonfire_livebook#main"
|
||||
# livebook = "https://github.com/mayel/livebook#fork"
|
||||
|
||||
# ex_doc = "https://github.com/elixir-lang/ex_doc#main"
|
||||
|
||||
|
|
|
@ -1,45 +1,70 @@
|
|||
earmark = "~> 1.4.28" # handle markdown
|
||||
# earmark_parser = "~> 1.4.25" # parse markdown
|
||||
|
||||
# Web
|
||||
# livebook = "~> 0.7.2"
|
||||
surface = "~> 0.9.0"
|
||||
phoenix_live_dashboard = "~> 0.7.0"
|
||||
plug_cowboy = "~> 2.5.2"
|
||||
phoenix = "~> 1.7.0-rc.0" # note: usually we should let surface specify the version of both phoenix and liveview
|
||||
phoenix_view = "~> 2.0" # should match phx/lv - dunno why isn't upgraded otherwise
|
||||
phoenix_live_view = "~> 0.18.3"
|
||||
phoenix_live_dashboard = "~> 0.7.2"
|
||||
plug_cowboy = "~> 2.6" # should match the version in phoenix's mix.exs
|
||||
gettext = "~> 0.20"
|
||||
|
||||
# DB
|
||||
ecto = "~> 3.8"
|
||||
ecto_sql = "~> 3.8"
|
||||
flexto = "~> 0.2.3"
|
||||
postgrex = ">= 0.16.2"
|
||||
pointers_ulid = "~> 0.2.2"
|
||||
pointers = "~> 0.5.1"
|
||||
ecto_psql_extras = "~> 0.7.4"
|
||||
|
||||
# Uploads (depending on what service you use)
|
||||
ex_aws_s3 = "~> 2.3"
|
||||
|
||||
# Auth
|
||||
nimble_totp = "~> 0.2.0"
|
||||
eqrcode = "~> 0.1.10"
|
||||
|
||||
# Misc
|
||||
httpoison = "~> 1.8"
|
||||
jason = "~> 1.4.0"
|
||||
telemetry = "~> 1.1.0"
|
||||
telemetry_metrics = "~> 0.6.1"
|
||||
telemetry_poller = "~> 1.0.0"
|
||||
poison = "~> 4.0" # not our preferred one, but some libs use it
|
||||
timex = "~> 3.7.8"
|
||||
solid = "~> 0.13"
|
||||
makeup_elixir = "~> 0.16.0"
|
||||
mime = "~> 2.0.3"
|
||||
|
||||
# Testing
|
||||
floki = "~> 0.33"
|
||||
# untangle = "~> 0.1"
|
||||
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
# bonfire_data_identity = "~> 0.1"
|
||||
# bonfire_data_social = "~> 0.1"
|
||||
|
||||
# Testing a UI component library
|
||||
# surface_catalogue = "~> 0.1.0"
|
||||
#surface_boxicon = "~> 0.6.0"
|
||||
# surface_catalogue = "~> 0.1.0"
|
||||
|
||||
# Language detection
|
||||
text = "~> 0.2.0"
|
||||
text_corpus_udhr = "~> 0.1.0"
|
||||
text_corpus_udhr = "~> 0.1.0"
|
||||
|
||||
# Version overrides
|
||||
#result = "~> 1.7"
|
||||
|
||||
# telemetry
|
||||
telemetry = "~> 1.1.0"
|
||||
telemetry_metrics = "~> 0.6.1"
|
||||
telemetry_poller = "~> 1.0.0"
|
||||
opentelemetry_exporter = "~> 1.0"
|
||||
opentelemetry = "~> 1.0"
|
||||
opentelemetry_api = "~> 1.0"
|
||||
opentelemetry_ecto = "~> 1.0"
|
||||
opentelemetry_liveview = "~> 1.0.0-rc.4"
|
||||
opentelemetry_phoenix = "~> 1.0"
|
||||
opentelemetry_cowboy = "~> 0.2"
|
||||
opentelemetry_oban = "~> 1.0"
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ changelog_issues_closed_after = "2022-08-30"
|
|||
config :bonfire,
|
||||
# Note: you can run `Bonfire.Common.Config.put(:experimental_features_enabled, true)` to enable these in prod too
|
||||
experimental_features_enabled: true,
|
||||
# low limit so it is easier to test
|
||||
# low limit so it is easier to test UX
|
||||
default_pagination_limit: 10
|
||||
|
||||
# config :pseudo_gettext, :locale, "en-pseudo_text" # uncomment to use https://en.wikipedia.org/wiki/Pseudolocalization and check that the app is properly localisable
|
||||
|
@ -15,36 +15,57 @@ config :bonfire, Bonfire.Common.Repo,
|
|||
database: System.get_env("POSTGRES_DB", "bonfire_dev"),
|
||||
# show_sensitive_data_on_connection_error: true,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||
# EctoSparkles does the logging instead
|
||||
log: false
|
||||
|
||||
path_dep_dirs =
|
||||
Mess.deps([path: "deps.path"], [])
|
||||
|> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib"))
|
||||
local_deps =
|
||||
Mess.deps(
|
||||
if(System.get_env("WITH_FORKS", "1") == "1",
|
||||
do: [path: Path.relative_to_cwd("config/deps.path")],
|
||||
else: []
|
||||
),
|
||||
[]
|
||||
)
|
||||
|
||||
local_dep_names = Enum.map(local_deps, &elem(&1, 0))
|
||||
|
||||
dep_paths =
|
||||
Enum.map(local_deps, fn dep ->
|
||||
case elem(dep, 1)[:path] do
|
||||
nil -> nil
|
||||
path -> "#{path}/lib"
|
||||
end
|
||||
end)
|
||||
|> Enum.reject(&is_nil/1)
|
||||
|
||||
watch_paths = dep_paths ++ ["lib/"] ++ ["priv/static/"]
|
||||
|
||||
IO.puts("Watching these deps for code reloading: #{inspect(local_dep_names)}")
|
||||
|
||||
config :phoenix_live_reload,
|
||||
# watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
|
||||
dirs: path_dep_dirs ++ ["lib/"]
|
||||
dirs: watch_paths
|
||||
|
||||
# to include cloned code in patterns
|
||||
path_dep_patterns = Enum.map(path_dep_dirs, &(String.slice(&1, 2..1000) <> ".*ex"))
|
||||
# filename patterns that should trigger page reloads (only within the above dirs)
|
||||
patterns = [
|
||||
~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg|webp)$",
|
||||
# ~r"^priv/gettext/.*(po)$",
|
||||
~r"(_live|live_handler|live_handlers|routes)\.ex$",
|
||||
~r{(views|templates|pages|components)/.*(ex)$},
|
||||
~r".*(heex|leex|sface)$",
|
||||
~r"priv/catalogue/.*(ex)$"
|
||||
]
|
||||
|
||||
# Surface views
|
||||
path_dep_patterns =
|
||||
(path_dep_patterns ++ path_dep_dirs)
|
||||
|> Enum.map(&(String.slice(&1, 2..1000) <> ".*sface"))
|
||||
IO.puts("Watching these filenames for live reloading in the browser: #{inspect(patterns)}")
|
||||
|
||||
# Watch static and templates for browser reloading.
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server: true,
|
||||
# In the development environment, Phoenix will debug errors by default, showing us a very informative debugging page. If we want to see what the application would serve in production, set to false
|
||||
debug_errors: true,
|
||||
check_origin: false,
|
||||
code_reloader: true,
|
||||
reloadable_apps: [:bonfire] ++ local_dep_names,
|
||||
watchers: [
|
||||
# yarn: [
|
||||
# "watch",
|
||||
# cd: Path.expand("assets", File.cwd!())
|
||||
# ],
|
||||
yarn: [
|
||||
"watch.js",
|
||||
cd: Path.expand("assets", File.cwd!())
|
||||
|
@ -59,20 +80,11 @@ config :bonfire, Bonfire.Web.Endpoint,
|
|||
]
|
||||
],
|
||||
live_reload: [
|
||||
patterns:
|
||||
[
|
||||
# ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||
# ~r"^priv/gettext/.*(po)$",
|
||||
# ~r"^web/(live|views)/.*ex$",
|
||||
# ~r"^lib/.*_live\.ex$",
|
||||
# ~r".*leex$",
|
||||
# defp elixirc_paths(:dev), do: ["lib"] ++ catalogues()
|
||||
|
||||
~r"lib/.*(ex|sface)$",
|
||||
~r"priv/catalogue/.*(ex)$"
|
||||
] ++ path_dep_patterns
|
||||
patterns: patterns
|
||||
]
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint, phoenix_profiler: [server: Bonfire.Web.Profiler]
|
||||
|
||||
config :logger,
|
||||
level: :debug,
|
||||
truncate: :infinity
|
||||
|
@ -85,10 +97,12 @@ config :phoenix, :stacktrace_depth, 30
|
|||
|
||||
config :phoenix, :plug_init_mode, :runtime
|
||||
|
||||
config :surface, :compiler, warn_on_undefined_props: true
|
||||
config :surface, :compiler, warn_on_undefined_props: false
|
||||
|
||||
config :exsync,
|
||||
src_monitor: true,
|
||||
reload_timeout: 75,
|
||||
# addition_dirs: ["/forks"],
|
||||
extra_extensions: [".leex", ".heex", ".js", ".css", ".sface"]
|
||||
|
||||
config :versioce, :changelog,
|
||||
|
|
|
@ -8,12 +8,80 @@ host = System.get_env("HOSTNAME", "localhost")
|
|||
server_port = String.to_integer(System.get_env("SERVER_PORT", "4000"))
|
||||
public_port = String.to_integer(System.get_env("PUBLIC_PORT", "4000"))
|
||||
|
||||
## load runtime configs directly via extension-provided modules
|
||||
repos =
|
||||
if System.get_env("TEST_INSTANCE") == "yes",
|
||||
do: [Bonfire.Common.Repo, Bonfire.Common.TestInstanceRepo],
|
||||
else: [Bonfire.Common.Repo]
|
||||
|
||||
# [Bonfire.Common.Repo, Beacon.Repo]
|
||||
|
||||
if (config_env() == :prod or System.get_env("OTEL_ENABLED") == "1") and
|
||||
(System.get_env("OTEL_EXPORTER_OTLP_ENDPOINT") || System.get_env("OTEL_LIGHTSEP_API_KEY") ||
|
||||
System.get_env("OTEL_HONEYCOMB_API_KEY")) do
|
||||
config :opentelemetry,
|
||||
disabled: false
|
||||
|
||||
config :opentelemetry_exporter,
|
||||
otlp_protocol: :http_protobuf
|
||||
|
||||
otel_endpoint = System.get_env("OTEL_EXPORTER_OTLP_ENDPOINT")
|
||||
|
||||
if otel_endpoint do
|
||||
IO.puts("NOTE: OTLP (open telemetry) data will be sent to #{otel_endpoint}")
|
||||
|
||||
config :opentelemetry_exporter,
|
||||
otlp_endpoint: otel_endpoint
|
||||
end
|
||||
|
||||
if System.get_env("OTEL_LIGHTSEP_API_KEY") do
|
||||
IO.puts("NOTE: OTLP (open telemetry) data will be sent to lightstep.com")
|
||||
# Example configuration for Lightstep.com, for more refers to:
|
||||
# https://github.com/open-telemetry/opentelemetry-erlang/tree/main/apps/opentelemetry_exporter#application-environment
|
||||
config :opentelemetry_exporter,
|
||||
# You can configure the compression type for exporting traces.
|
||||
otlp_compression: :gzip,
|
||||
oltp_traces_compression: :gzip,
|
||||
otlp_traces_endpoint: "https://ingest.lightstep.com:443/traces/otlp/v0.9",
|
||||
otlp_headers: [
|
||||
{"lightstep-access-token", System.get_env("OTEL_LIGHTSEP_API_KEY")}
|
||||
]
|
||||
end
|
||||
|
||||
if System.get_env("OTEL_HONEYCOMB_API_KEY") do
|
||||
IO.puts("NOTE: OTLP (open telemetry) data will be sent to honeycomb.io")
|
||||
|
||||
config :opentelemetry, :processors,
|
||||
otel_batch_processor: %{
|
||||
exporter: {
|
||||
:opentelemetry_exporter,
|
||||
%{
|
||||
endpoints: [
|
||||
{:https, 'api.honeycomb.io', 443,
|
||||
[
|
||||
verify: :verify_peer,
|
||||
cacertfile: :certifi.cacertfile(),
|
||||
depth: 3,
|
||||
customize_hostname_check: [
|
||||
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
|
||||
]
|
||||
]}
|
||||
],
|
||||
headers: [
|
||||
{"x-honeycomb-team", System.fetch_env!("OTEL_HONEYCOMB_API_KEY")},
|
||||
{"x-honeycomb-dataset", System.get_env("OTEL_SERVICE_NAME", "bonfire")}
|
||||
],
|
||||
protocol: :grpc
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
## load extensions' runtime configs (and behaviours) directly via extension-provided modules
|
||||
Bonfire.Common.Config.LoadExtensionsConfig.load_configs()
|
||||
##
|
||||
|
||||
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") ||
|
||||
System.get_env("CI") ||
|
||||
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") ||
|
||||
raise """
|
||||
Environment variables for database are missing.
|
||||
For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE
|
||||
|
@ -21,15 +89,16 @@ System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") ||
|
|||
and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost)
|
||||
"""
|
||||
|
||||
if System.get_env("DATABASE_URL") do
|
||||
config :bonfire, Bonfire.Common.Repo, url: System.get_env("DATABASE_URL")
|
||||
else
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# ssl: true,
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost")
|
||||
end
|
||||
repo_connection_config =
|
||||
if System.get_env("DATABASE_URL") do
|
||||
[url: System.get_env("DATABASE_URL")]
|
||||
else
|
||||
[
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost")
|
||||
]
|
||||
end
|
||||
|
||||
secret_key_base =
|
||||
System.get_env("SECRET_KEY_BASE") || System.get_env("CI") ||
|
||||
|
@ -60,13 +129,10 @@ config :bonfire,
|
|||
signing_salt: signing_salt,
|
||||
root_path: File.cwd!()
|
||||
|
||||
start_server? =
|
||||
if config_env() == :test,
|
||||
do: System.get_env("START_SERVER", "true"),
|
||||
else: System.get_env("START_SERVER", "true")
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server: String.to_existing_atom(start_server?),
|
||||
server:
|
||||
config_env() != :test or System.get_env("TEST_INSTANCE") == "yes" or
|
||||
System.get_env("START_SERVER") == "yes",
|
||||
url: [
|
||||
host: host,
|
||||
port: public_port
|
||||
|
@ -78,7 +144,7 @@ config :bonfire, Bonfire.Web.Endpoint,
|
|||
live_view: [signing_salt: signing_salt]
|
||||
|
||||
if System.get_env("SENTRY_DSN") do
|
||||
IO.puts("Note: errors will be reported to Sentry.")
|
||||
IO.puts("NOTE: errors will be reported to Sentry.")
|
||||
|
||||
config :sentry,
|
||||
dsn: System.get_env("SENTRY_DSN")
|
||||
|
@ -86,14 +152,43 @@ if System.get_env("SENTRY_DSN") do
|
|||
if System.get_env("SENTRY_NAME") do
|
||||
config :sentry, server_name: System.get_env("SENTRY_NAME")
|
||||
end
|
||||
else
|
||||
config :sentry,
|
||||
disabled: true
|
||||
end
|
||||
|
||||
pool_size = String.to_integer(System.get_env("POOL_SIZE", "10"))
|
||||
|
||||
database =
|
||||
case config_env() do
|
||||
:test -> "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
:dev -> System.get_env("POSTGRES_DB", "bonfire_dev")
|
||||
_ -> System.get_env("POSTGRES_DB", "bonfire")
|
||||
end
|
||||
|
||||
config :bonfire, ecto_repos: repos
|
||||
config :bonfire_umbrella, ecto_repos: repos
|
||||
config :paginator, ecto_repos: repos
|
||||
config :bonfire, Bonfire.Common.Repo, repo_connection_config
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, repo_connection_config
|
||||
config :beacon, Beacon.Repo, repo_connection_config
|
||||
config :bonfire, Bonfire.Common.Repo, database: database
|
||||
config :beacon, Beacon.Repo, database: database
|
||||
config :paginator, Paginator.Repo, database: database
|
||||
config :beacon, Beacon.Repo, pool_size: pool_size
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, priv: "priv/repo"
|
||||
config :activity_pub, ecto_repos: repos
|
||||
|
||||
config :activity_pub, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
queues: false
|
||||
|
||||
# start prod-only config
|
||||
if config_env() == :prod do
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# ssl: true,
|
||||
database: System.get_env("POSTGRES_DB", "bonfire"),
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
|
||||
# database: System.get_env("POSTGRES_DB", "bonfire"),
|
||||
pool_size: pool_size,
|
||||
# Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead #
|
||||
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false"))
|
||||
end
|
||||
|
|
|
@ -1,42 +1,47 @@
|
|||
## SECRET CONFIG VARIABLES
|
||||
# make sure you change everything to your own secrets and do not check this into git or any public host!
|
||||
## SECRETS ##
|
||||
# make sure you change everything to your own secrets!
|
||||
# and do not check this into git or any public host
|
||||
|
||||
# for sessions/cookies, you can generate strings for these by running: just secrets
|
||||
SECRET_KEY_BASE="you-should-put-a-secure-string-here"
|
||||
SIGNING_SALT="you-should-put-a-different-secure-string-here"
|
||||
ENCRYPTION_SALT="you-should-put-yet-another-secure-string-here"
|
||||
|
||||
# sentry client key
|
||||
SENTRY_DSN=put-your-sentry-dsn-here
|
||||
SECRET_KEY_BASE=you-should-put-a-secure-string-here
|
||||
SIGNING_SALT=you-should-put-a-different-secure-string-here
|
||||
ENCRYPTION_SALT=you-should-put-yet-another-secure-string-here
|
||||
|
||||
# database access
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_DB=bonfire_db
|
||||
POSTGRES_PASSWORD=put_a_secure_db_pw_here
|
||||
|
||||
# signup to mailgun.com and edit with your domain and API key
|
||||
# password for the search index
|
||||
MEILI_MASTER_KEY=put-a-key-to-protect-the-search-index-here
|
||||
|
||||
# email deliverym if you use mailgun.com, edit with your domain and API key
|
||||
MAIL_DOMAIN=mailg.example.com
|
||||
MAIL_KEY=123
|
||||
MAIL_FROM=bonfire@example.com
|
||||
|
||||
# password for the search index
|
||||
MEILI_MASTER_KEY=key-to-protect-search-indexing-here
|
||||
|
||||
# password for the default admin user if you run the seeds
|
||||
SEEDS_USER=root
|
||||
SEEDS_PW=password
|
||||
|
||||
# backend stuff
|
||||
ERLANG_COOKIE=bonfire_cookie
|
||||
|
||||
# Bonfire extensions configs
|
||||
WEB_PUSH_SUBJECT=mailto:administrator@mydomain.net
|
||||
WEB_PUSH_PUBLIC_KEY=xyz
|
||||
WEB_PUSH_PRIVATE_KEY=abc
|
||||
GEOLOCATE_OPENCAGEDATA=
|
||||
GITHUB_TOKEN=xyz
|
||||
|
||||
# Uploads
|
||||
# UPLOADS_S3_BUCKET=
|
||||
# UPLOADS_S3_ACCESS_KEY_ID=
|
||||
# UPLOADS_S3_SECRET_ACCESS_KEY=
|
||||
|
||||
# telemetry API keys
|
||||
# SENTRY_DSN=
|
||||
OTEL_ENABLED=0
|
||||
# OTEL_HONEYCOMB_API_KEY=
|
||||
# OTEL_LIGHTSEP_API_KEY=
|
||||
|
||||
# default admin user if you generate seed data
|
||||
SEEDS_USER=root
|
||||
|
||||
# backend stuff
|
||||
ERLANG_COOKIE=bonfire_cookie
|
||||
|
||||
# Bonfire extensions configs
|
||||
WEB_PUSH_SUBJECT=mailto:bonfire@example.com
|
||||
WEB_PUSH_PUBLIC_KEY=
|
||||
WEB_PUSH_PRIVATE_KEY=
|
||||
GEOLOCATE_OPENCAGEDATA=
|
||||
MAPBOX_API_KEY=pk.eyJ1IjoibWF5ZWwiLCJhIjoiY2tlMmxzNXF5MGFpaDJ0bzR2M29id2EzOCJ9.QsmjD-zypsE0_wonLGCYlA
|
||||
GITHUB_TOKEN=
|
||||
TX_TOKEN=
|
||||
|
||||
## END OF SECRETS ##
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
## PUBLIC CONFIG VARIABLES
|
||||
|
||||
FLAVOUR=classic
|
||||
## OTHER CONFIG ##
|
||||
# server domain name:
|
||||
HOSTNAME=localhost
|
||||
# server port:
|
||||
|
@ -26,6 +24,7 @@ LANG=en_US.UTF-8
|
|||
LANGUAGE=en_US.UTF-8
|
||||
REPLACE_OS_VARS=true
|
||||
LIVEVIEW_ENABLED=true
|
||||
SHOW_DEBUG_IN_DEV=true
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_DB=bonfire_db
|
||||
ACME_AGREE=true
|
||||
|
||||
SHOW_DEBUG_IN_DEV=true
|
||||
|
|
|
@ -19,30 +19,64 @@ config :bonfire_search,
|
|||
|
||||
## Other general test config
|
||||
|
||||
config :logger, level: :info
|
||||
# config :logger, level: :debug
|
||||
# config :logger, level: :notice
|
||||
config :logger, truncate: :infinity
|
||||
config :logger,
|
||||
level: :info,
|
||||
truncate: :infinity
|
||||
|
||||
config :logger, :console, truncate: :infinity
|
||||
|
||||
# Configure your database
|
||||
db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
# db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 20,
|
||||
pool_size: 60,
|
||||
# show_sensitive_data_on_connection_error: true,
|
||||
database: db,
|
||||
# database: db,
|
||||
log: :info,
|
||||
slow_query_ms: 500,
|
||||
queue_target: 5_000,
|
||||
queue_interval: 2_000,
|
||||
timeout: 10_000,
|
||||
connect_timeout: 10_000
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint, http: [port: 4001]
|
||||
# Optionally run a 2nd endpoint for testing federation
|
||||
config :bonfire, Bonfire.Web.FakeRemoteEndpoint,
|
||||
server: true,
|
||||
url: [
|
||||
host: "localhost",
|
||||
port: 4002
|
||||
],
|
||||
http: [
|
||||
port: 4002
|
||||
],
|
||||
secret_key_base: System.get_env("SECRET_KEY_BASE"),
|
||||
live_view: [signing_salt: System.get_env("SIGNING_SALT")],
|
||||
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false]
|
||||
|
||||
test_instance? = System.get_env("TEST_INSTANCE") == "yes"
|
||||
|
||||
config :tesla,
|
||||
adapter: if(test_instance?, do: Tesla.Adapter.Hackney, else: Tesla.Mock)
|
||||
|
||||
oban_mode = if(test_instance?, do: :inline, else: :manual)
|
||||
config :bonfire, Oban, testing: oban_mode
|
||||
config :activity_pub, Oban, testing: oban_mode
|
||||
|
||||
config :activity_pub, :disable_cache, test_instance?
|
||||
|
||||
if test_instance? do
|
||||
config :logger, :console,
|
||||
format: "[$level $metadata] $message\n",
|
||||
metadata: [:instance, :action]
|
||||
else
|
||||
config :logger, :console,
|
||||
format: "[$level $metadata] $message\n",
|
||||
metadata: [:action]
|
||||
end
|
||||
|
||||
config :pbkdf2_elixir, :rounds, 1
|
||||
|
||||
|
@ -53,8 +87,9 @@ config :paginator, Paginator.Repo,
|
|||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost"),
|
||||
database: db
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost")
|
||||
|
||||
# database: db
|
||||
|
||||
config :exsync,
|
||||
src_monitor: false,
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :env, config_env()
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
|
||||
config :nodeinfo, :adapter, Bonfire.Federate.ActivityPub.NodeinfoAdapter
|
||||
|
||||
config :activity_pub, :instance,
|
||||
hostname: "localhost",
|
||||
federation_publisher_modules: [ActivityPubWeb.Publisher],
|
||||
federation_reachability_timeout_days: 7,
|
||||
federating: true,
|
||||
rewrite_policy: [Bonfire.Federate.ActivityPub.BoundariesMRF],
|
||||
handle_unknown_activities: true
|
||||
|
||||
config :activity_pub, :boundaries,
|
||||
block: [],
|
||||
silence_them: [],
|
||||
ghost_them: []
|
||||
|
||||
config :activity_pub, :mrf_simple,
|
||||
reject: [],
|
||||
accept: [],
|
||||
media_removal: [],
|
||||
media_nsfw: [],
|
||||
report_removal: [],
|
||||
avatar_removal: [],
|
||||
banner_removal: []
|
||||
|
||||
config :http_signatures, adapter: ActivityPub.Signature
|
||||
|
||||
config :activity_pub, :http,
|
||||
proxy_url: nil,
|
||||
send_user_agent: true,
|
||||
adapter: [
|
||||
ssl_options: [
|
||||
# Workaround for remote server certificate chain issues
|
||||
partial_chain: &:hackney_connect.partial_chain/1,
|
||||
# We don't support TLS v1.3 yet
|
||||
versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
|
||||
]
|
||||
]
|
||||
|
||||
config :activity_pub, ActivityPubWeb.Endpoint,
|
||||
render_errors: [
|
||||
view: ActivityPubWeb.ErrorView,
|
||||
accepts: ~w(json),
|
||||
layout: false
|
||||
]
|
||||
|
||||
config :activity_pub, :json_contexts, %{
|
||||
"Hashtag" => "as:Hashtag",
|
||||
"ValueFlows" => "https://w3id.org/valueflows#",
|
||||
"om2" => "http://www.ontology-of-units-of-measure.org/resource/om-2/"
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
config :activity_pub, :instance, federating: false
|
||||
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
|
||||
config :activity_pub, :disable_test_apps, true
|
||||
|
||||
config :tesla, adapter: Tesla.Mock
|
||||
|
||||
# Print only warnings and errors during test
|
||||
config :logger, level: :warn
|
||||
|
||||
config :activity_pub, ActivityPubWeb.Endpoint,
|
||||
http: [port: 4000],
|
||||
server: false
|
|
@ -1,9 +0,0 @@
|
|||
import Config
|
||||
|
||||
schema = Bonfire.API.GraphQL.Schema
|
||||
|
||||
config :bonfire_api_graphql,
|
||||
graphql_schema_module: schema
|
||||
|
||||
config :absinthe,
|
||||
schema: schema
|
|
@ -1,25 +0,0 @@
|
|||
import Config
|
||||
|
||||
default_locale = "en"
|
||||
|
||||
config :bonfire_common,
|
||||
otp_app: :bonfire
|
||||
|
||||
# internationalisation
|
||||
config :bonfire_common, Bonfire.Common.Localise.Cldr,
|
||||
default_locale: default_locale,
|
||||
# locales that will be made available on top of those for which gettext localisation files are available
|
||||
locales: ["fr", "en", "es"],
|
||||
providers: [Cldr.Language],
|
||||
gettext: Bonfire.Common.Localise.Gettext,
|
||||
data_dir: "./priv/cldr",
|
||||
add_fallback_locales: true,
|
||||
# precompile_number_formats: ["¤¤#,##0.##"],
|
||||
# precompile_transliterations: [{:latn, :arab}, {:thai, :latn}]
|
||||
# force_locale_download: false,
|
||||
generate_docs: true
|
||||
|
||||
config :ex_cldr,
|
||||
default_locale: default_locale,
|
||||
default_backend: Bonfire.Common.Localise.Cldr,
|
||||
json_library: Jason
|
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
|||
import Config
|
||||
|
||||
alias Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
actor_types = ["Person", "Group", "Application", "Service", "Organization"]
|
||||
|
||||
config :bonfire,
|
||||
federation_search_path: [
|
||||
:bonfire_common,
|
||||
:bonfire_me,
|
||||
:bonfire_social,
|
||||
:bonfire_valueflows,
|
||||
:bonfire_classify,
|
||||
:bonfire_geolocate,
|
||||
:bonfire_quantify
|
||||
],
|
||||
# enable/disable logging of federation logic
|
||||
log_federation: true,
|
||||
federation_fallback_module: Bonfire.Social.APActivities
|
||||
|
||||
config :bonfire, actor_AP_types: actor_types
|
||||
|
||||
# config :bonfire, Bonfire.Instance,
|
||||
# hostname: hostname,
|
||||
# description: desc
|
|
@ -1,56 +0,0 @@
|
|||
import Config
|
||||
|
||||
# where do you want to store files? supports local storage, s3-compatible services, and more
|
||||
# see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider
|
||||
config :waffle,
|
||||
storage: Waffle.Storage.Local,
|
||||
# or {:system, "ASSET_HOST"}
|
||||
asset_host: "/"
|
||||
|
||||
image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"]
|
||||
|
||||
all_allowed_media_types =
|
||||
image_media_types ++
|
||||
[
|
||||
"text/plain",
|
||||
# doc
|
||||
"text/csv",
|
||||
"application/pdf",
|
||||
"application/rtf",
|
||||
"application/msword",
|
||||
"application/vnd.ms-excel",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"application/vnd.oasis.opendocument.presentation",
|
||||
"application/vnd.oasis.opendocument.spreadsheet",
|
||||
"application/vnd.oasis.opendocument.text",
|
||||
"application/epub+zip",
|
||||
# archives
|
||||
"application/x-tar",
|
||||
"application/x-bzip",
|
||||
"application/x-bzip2",
|
||||
"application/gzip",
|
||||
"application/zip",
|
||||
"application/rar",
|
||||
"application/x-7z-compressed",
|
||||
# audio
|
||||
"audio/mpeg",
|
||||
"audio/ogg",
|
||||
"audio/wav",
|
||||
"audio/webm",
|
||||
"audio/opus",
|
||||
# video
|
||||
"video/mp4",
|
||||
"video/mpeg",
|
||||
"video/ogg",
|
||||
"video/webm"
|
||||
]
|
||||
|
||||
config :bonfire_files, image_media_types: image_media_types
|
||||
config :bonfire_files, all_allowed_media_types: all_allowed_media_types
|
||||
|
||||
config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types
|
||||
config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types
|
||||
|
||||
config :bonfire_files, Bonfire.Files.DocumentUploader,
|
||||
allowed_media_types: all_allowed_media_types
|
|
@ -1,6 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_geolocate,
|
||||
templates_path: "lib"
|
||||
|
||||
config :bonfire, :js_config, mapbox_api_key: System.get_env("MAPBOX_API_KEY")
|
|
@ -1,18 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_livebook,
|
||||
disabled: false
|
||||
|
||||
# Sets the default authentication mode to token
|
||||
config :livebook, :authentication_mode, :token
|
||||
|
||||
# Sets the default runtime to ElixirStandalone.
|
||||
# This is the desired default most of the time,
|
||||
# but in some specific use cases you may want
|
||||
# to configure that to the Embedded or Mix runtime instead.
|
||||
# Also make sure the configured runtime has
|
||||
# a synchronous `init` function that takes the
|
||||
# configured arguments.
|
||||
config :livebook, :default_runtime, {Livebook.Runtime.Embedded, []}
|
||||
|
||||
config :livebook, router_helpers_module: Bonfire.Web.Router.Helpers
|
|
@ -1,10 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_mailer,
|
||||
check_mx: true,
|
||||
check_format: true
|
||||
|
||||
config :bonfire, Bonfire.Mailer,
|
||||
# what service you want to use to send emails, from these: https://github.com/thoughtbot/bamboo#available-adapters
|
||||
# we recommend leaving LocalAdapter (which is just a fallback which won't actually send emails) and setting the actual adapter in runtime.exs
|
||||
adapter: Bamboo.LocalAdapter
|
|
@ -1,11 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_open_id,
|
||||
templates_path: "lib"
|
||||
|
||||
config :boruta, Boruta.Oauth,
|
||||
repo: Bonfire.Common.Repo,
|
||||
issuer: "https://bonfirenetworks.org",
|
||||
contexts: [
|
||||
resource_owners: Bonfire.OpenID.Integration
|
||||
]
|
|
@ -1,7 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_quantify,
|
||||
templates_path: "lib"
|
||||
|
||||
config :bonfire_quantify, Bonfire.Quantify.Units,
|
||||
valid_contexts: [Bonfire.Quantify.Units, Bonfire.Data.Identity.User]
|
|
@ -1,14 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_search,
|
||||
disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"),
|
||||
adapter: Bonfire.Search.Meili,
|
||||
# protocol, hostname and port
|
||||
instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"),
|
||||
# secret key
|
||||
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me")
|
||||
|
||||
# for use by API client
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
config :phoenix, :format_encoders, json: Jason
|
||||
config :phoenix, :json_library, Jason
|
|
@ -1,100 +0,0 @@
|
|||
import Config
|
||||
|
||||
default_flavour = "classic"
|
||||
flavour = System.get_env("FLAVOUR", default_flavour)
|
||||
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
|
||||
|
||||
#### Basic configuration
|
||||
|
||||
# You probably won't want to touch these. You might override some in
|
||||
# other config files.
|
||||
|
||||
config :bonfire,
|
||||
otp_app: :bonfire,
|
||||
env: config_env(),
|
||||
flavour: flavour,
|
||||
flavour_path: flavour_path,
|
||||
app_name: System.get_env("APP_NAME", "Bonfire"),
|
||||
repo_module: Bonfire.Common.Repo,
|
||||
web_module: Bonfire.UI.Common.Web,
|
||||
endpoint_module: Bonfire.Web.Endpoint,
|
||||
mailer_module: Bonfire.Mailer,
|
||||
default_web_namespace: Bonfire.UI.Common,
|
||||
default_layout_module: Bonfire.UI.Common.LayoutView,
|
||||
graphql_schema_module: Bonfire.API.GraphQL.Schema,
|
||||
user_schema: Bonfire.Data.Identity.User,
|
||||
org_schema: Bonfire.Data.Identity.User,
|
||||
home_page: Bonfire.Web.HomeLive,
|
||||
localisation_path: "priv/localisation",
|
||||
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
|
||||
signing_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
|
||||
encryption_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs"
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
http: [
|
||||
# this gets overridden in runtime.exs
|
||||
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
|
||||
transport_options: [socket_opts: [:inet6]]
|
||||
],
|
||||
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false],
|
||||
pubsub_server: Bonfire.PubSub
|
||||
|
||||
config :phoenix, :json_library, Jason
|
||||
config :phoenix_gon, :json_library, Jason
|
||||
|
||||
config :bonfire, ecto_repos: [Bonfire.Common.Repo]
|
||||
config :ecto_sparkles, :otp_app, :bonfire
|
||||
config :rauversion_extension, :repo_module, Bonfire.Common.Repo
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
config :activity_pub, :endpoint_module, Bonfire.Web.Endpoint
|
||||
|
||||
config :rauversion_extension, :user_schema, Bonfire.Data.Identity.User
|
||||
config :rauversion_extension, :router_helper, Bonfire.Web.Router.Helpers
|
||||
config :rauversion_extension, :default_layout_module, Bonfire.UI.Common.LayoutView
|
||||
config :rauversion_extension, :user_table, "pointers_pointer"
|
||||
config :rauversion_extension, :user_key_type, :uuid
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo, types: Bonfire.Geolocate.PostgresTypes
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, types: Bonfire.Geolocate.PostgresTypes
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, database: "bonfire_test_instance"
|
||||
# priv: flavour_path <> "/repo"
|
||||
|
||||
# ecto query filtering
|
||||
# config :query_elf, :id_types, [:id, :binary_id, Pointers.ULID]
|
||||
|
||||
config :logger, :console,
|
||||
format: "$time $metadata[$level] $message\n",
|
||||
metadata: [:request_id]
|
||||
|
||||
config :bonfire, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
plugins: [Oban.Plugins.Pruner],
|
||||
queues: [
|
||||
federator_incoming: 50,
|
||||
federator_outgoing: 50
|
||||
]
|
||||
|
||||
config :mime, :types, %{
|
||||
"application/json" => ["json"],
|
||||
"application/activity+json" => ["activity+json"],
|
||||
"application/ld+json" => ["ld+json"],
|
||||
"application/jrd+json" => ["jrd+json"],
|
||||
"audio/ogg" => ["ogg"]
|
||||
}
|
||||
|
||||
config :sentry,
|
||||
dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
|
||||
environment_name: Mix.env(),
|
||||
included_environments: [:prod]
|
||||
|
||||
# include config for all used Bonfire extensions
|
||||
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
|
||||
# IO.inspect(include_config: config)
|
||||
import_config config
|
||||
end
|
||||
|
||||
import_config "activity_pub.exs"
|
||||
|
||||
# finally, append/override config based on env, which will override any config set above (including from imported files)
|
||||
import_config "#{config_env()}.exs"
|
|
@ -1,3 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :phoenix, :json_library, Jason
|
18
flavours/cooperation/config/deps.flavour.git
Normal file
18
flavours/cooperation/config/deps.flavour.git
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Flavour:COOPERATION
|
||||
bonfire_api_graphql = "https://github.com/bonfire-networks/bonfire_api_graphql#main"
|
||||
bonfire_classify = "https://github.com/bonfire-networks/bonfire_classify#main"
|
||||
bonfire_quantify = "https://github.com/bonfire-networks/bonfire_quantify#main"
|
||||
bonfire_geolocate = "https://github.com/bonfire-networks/bonfire_geolocate#main"
|
||||
bonfire_valueflows = "https://github.com/bonfire-networks/bonfire_valueflows#main"
|
||||
bonfire_ui_valueflows = "https://github.com/bonfire-networks/bonfire_ui_valueflows#main"
|
||||
bonfire_ui_kanban = "https://github.com/bonfire-networks/bonfire_ui_kanban#main"
|
||||
bonfire_ui_coordination = "https://github.com/bonfire-networks/bonfire_ui_coordination#main"
|
||||
bonfire_breadpub = "https://github.com/bonfire-networks/bonfire_breadpub#main"
|
||||
# bonfire_ui_reflow = "https://github.com/bonfire-networks/bonfire_ui_reflow#main"
|
||||
# bonfire_recyclapp = "https://github.com/bonfire-networks/bonfire_recyclapp#main"
|
||||
# bonfire_taxonomy_seeder = "https://github.com/bonfire-networks/bonfire_taxonomy_seeder#main"
|
||||
bonfire_valueflows_observe = "https://github.com/bonfire-networks/bonfire_valueflows_observe#main"
|
||||
absinthe_client = "https://github.com/bonfire-networks/absinthe_client#master"
|
||||
|
||||
## Flavour:UPCYCLE
|
||||
bonfire_upcycle = "https://gitlab.com/bonfire-networks/bonfire_upcycle#main"
|
3
flavours/cooperation/config/deps.flavour.hex
Normal file
3
flavours/cooperation/config/deps.flavour.hex
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
# API
|
||||
absinthe = "~> 1.7.0"
|
16
flavours/cooperation/config/deps.flavour.path
Normal file
16
flavours/cooperation/config/deps.flavour.path
Normal file
|
@ -0,0 +1,16 @@
|
|||
bonfire_api_graphql = "extensions/bonfire_api_graphql"
|
||||
bonfire_classify = "extensions/bonfire_classify"
|
||||
bonfire_geolocate = "extensions/bonfire_geolocate"
|
||||
bonfire_quantify = "extensions/bonfire_quantify"
|
||||
bonfire_recyclapp = "extensions/bonfire_recyclapp"
|
||||
bonfire_upcycle = "extensions/bonfire_upcycle"
|
||||
bonfire_ui_valueflows = "extensions/bonfire_ui_valueflows"
|
||||
bonfire_ui_reflow = "extensions/bonfire_ui_reflow"
|
||||
bonfire_ui_coordination = "extensions/bonfire_ui_coordination"
|
||||
bonfire_ui_kanban = "extensions/bonfire_ui_kanban"
|
||||
bonfire_breadpub = "extensions/bonfire_breadpub"
|
||||
bonfire_valueflows = "extensions/bonfire_valueflows"
|
||||
bonfire_valueflows_api_schema = "extensions/bonfire_valueflows_api_schema"
|
||||
bonfire_valueflows_observe = "extensions/bonfire_valueflows_observe"
|
||||
# bonfire_taxonomy_seeder = "extensions/bonfire_taxonomy_seeder"
|
||||
absinthe_client = "forks/absinthe_client"
|
|
@ -1,78 +0,0 @@
|
|||
activity_pub = "https://github.com/bonfire-networks/activity_pub#develop"
|
||||
bonfire = "https://github.com/bonfire-networks/bonfire_spark#main"
|
||||
bonfire_common = "https://github.com/bonfire-networks/bonfire_common#main"
|
||||
bonfire_data_access_control = "https://github.com/bonfire-networks/bonfire_data_access_control#main"
|
||||
bonfire_data_activity_pub = "https://github.com/bonfire-networks/bonfire_data_activity_pub#main"
|
||||
bonfire_data_identity = "https://github.com/bonfire-networks/bonfire_data_identity#main"
|
||||
bonfire_data_social = "https://github.com/bonfire-networks/bonfire_data_social#main"
|
||||
bonfire_data_edges = "https://github.com/bonfire-networks/bonfire_data_edges#main"
|
||||
bonfire_ecto = "https://github.com/bonfire-networks/bonfire_ecto#main"
|
||||
bonfire_epics = "https://github.com/bonfire-networks/bonfire_epics#main"
|
||||
bonfire_me = "https://github.com/bonfire-networks/bonfire_me#main"
|
||||
bonfire_social = "https://github.com/bonfire-networks/bonfire_social#main"
|
||||
bonfire_mailer = "https://github.com/bonfire-networks/bonfire_mailer#main"
|
||||
# bonfire_web_phoenix = "https://github.com/bonfire-networks/bonfire_web_phoenix#main"
|
||||
pointers = "https://github.com/bonfire-networks/pointers#main"
|
||||
pointers_ulid = "https://github.com/bonfire-networks/pointers_ulid#main"
|
||||
nodeinfo = "https://github.com/bonfire-networks/nodeinfo#main"
|
||||
# surface = "https://github.com/bonfire-networks/surface"
|
||||
bonfire_ui_common = "https://github.com/bonfire-networks/bonfire_ui_common#main"
|
||||
bonfire_ui_social = "https://github.com/bonfire-networks/bonfire_ui_social#main"
|
||||
bonfire_ui_me = "https://github.com/bonfire-networks/bonfire_ui_me#main"
|
||||
bonfire_quantify = "https://github.com/bonfire-networks/bonfire_quantify#main"
|
||||
bonfire_geolocate = "https://github.com/bonfire-networks/bonfire_geolocate#main"
|
||||
bonfire_valueflows = "https://github.com/bonfire-networks/bonfire_valueflows#main"
|
||||
bonfire_api_graphql = "https://github.com/bonfire-networks/bonfire_api_graphql#main"
|
||||
bonfire_ui_valueflows = "https://github.com/bonfire-networks/bonfire_ui_valueflows#main"
|
||||
bonfire_ui_kanban = "https://github.com/bonfire-networks/bonfire_ui_kanban#main"
|
||||
# bonfire_ui_reflow = "https://github.com/bonfire-networks/bonfire_ui_reflow#main"
|
||||
bonfire_ui_coordination = "https://github.com/bonfire-networks/bonfire_ui_coordination#main"
|
||||
bonfire_breadpub = "https://github.com/bonfire-networks/bonfire_breadpub#main"
|
||||
# bonfire_recyclapp = "https://github.com/bonfire-networks/bonfire_recyclapp#main"
|
||||
# bonfire_website = "https://github.com/bonfire-networks/bonfire_website#main"
|
||||
bonfire_tag = "https://github.com/bonfire-networks/bonfire_tag#main"
|
||||
bonfire_classify = "https://github.com/bonfire-networks/bonfire_classify#main"
|
||||
# bonfire_taxonomy_seeder = "https://github.com/bonfire-networks/bonfire_taxonomy_seeder#main"
|
||||
bonfire_search = "https://github.com/bonfire-networks/bonfire_search#main"
|
||||
bonfire_data_shared_user = "https://github.com/bonfire-networks/bonfire_data_shared_user#main"
|
||||
bonfire_valueflows_observe = "https://github.com/bonfire-networks/bonfire_valueflows_observe#main"
|
||||
absinthe_client = "https://github.com/bonfire-networks/absinthe_client#master"
|
||||
flexto = "https://github.com/bonfire-networks/flexto#main"
|
||||
bonfire_federate_activitypub = "https://github.com/bonfire-networks/bonfire_federate_activitypub#main"
|
||||
bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#main"
|
||||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
#tree_magic = "https://github.com/bonfire-networks/tree_magic.ex"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
emote = "https://github.com/bonfire-networks/emote#master"
|
||||
paginator = "https://github.com/bonfire-networks/paginator#main"
|
||||
# bonfire_livebook = "https://github.com/bonfire-networks/bonfire_livebook#main"
|
||||
# livebook = "https://github.com/mayel/livebook#fork"
|
||||
bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort#master"
|
||||
# surface = "https://github.com/surface-ui/surface"
|
||||
# surface_catalogue = "https://github.com/surface-ui/surface_catalogue" # Testing a UI component library
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
# ex_doc = "https://github.com/elixir-lang/ex_doc#main"
|
||||
|
||||
bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"
|
||||
bonfire_editor_quill = "https://github.com/bonfire-networks/bonfire_editor_quill#main"
|
||||
|
||||
# bonfire_open_id = "https://github.com/bonfire-networks/bonfire_open_id#main"
|
||||
# boruta = "https://gitlab.com/patatoid/boruta_auth#master"
|
||||
|
||||
ex_aws = "https://github.com/bonfire-networks/ex_aws#main"
|
||||
|
||||
# need for rauversion
|
||||
mogrify = "https://github.com/chaskiq/mogrify.git#identify-option"
|
||||
# rauversion_extension = "https://github.com/mayel/rauversion-phx.git#modular-extension-step2"
|
||||
|
||||
bonfire_pages = "https://github.com/bonfire-networks/bonfire_pages#main"
|
||||
|
||||
# bonfire_pages_beacon = "https://github.com/bonfire-networks/bonfire_pages_beacon"
|
||||
# beacon = "https://github.com/bonfire-networks/beacon#bonfire"
|
||||
|
||||
bonfire_upcycle = "https://gitlab.com/bonfire-networks/bonfire_upcycle#main"
|
||||
|
||||
bonfire_encrypt = "https://github.com/bonfire-networks/bonfire_encrypt#main"
|
|
@ -1,58 +0,0 @@
|
|||
earmark = "~> 1.4.28" # handle markdown
|
||||
# earmark_parser = "~> 1.4.25" # parse markdown
|
||||
# Web
|
||||
# livebook = "~> 0.7.2"
|
||||
surface = "~> 0.9.0"
|
||||
phoenix = "~> 1.7.0-rc.0" # note: usually we should let surface specify the version of both phoenix and liveview
|
||||
phoenix_view = "~> 2.0" # should match phx/lv - dunno why isn't upgraded otherwise
|
||||
phoenix_live_view = "~> 0.18.3"
|
||||
phoenix_live_dashboard = "~> 0.7.2"
|
||||
plug_cowboy = "~> 2.6" # should match the version in phoenix's mix.exs
|
||||
gettext = "~> 0.20"
|
||||
# DB
|
||||
ecto_sql = "~> 3.8"
|
||||
flexto = "~> 0.2.3"
|
||||
postgrex = ">= 0.16.2"
|
||||
pointers_ulid = "~> 0.2.2"
|
||||
pointers = "~> 0.5.1"
|
||||
ecto_psql_extras = "~> 0.7.4"
|
||||
# Uploads (depending on what service you use)
|
||||
ex_aws_s3 = "~> 2.3"
|
||||
# Auth
|
||||
nimble_totp = "~> 0.2.0"
|
||||
eqrcode = "~> 0.1.10"
|
||||
# Misc
|
||||
httpoison = "~> 1.8"
|
||||
jason = "~> 1.4.0"
|
||||
poison = "~> 4.0" # not our preferred one, but some libs use it
|
||||
mime = "~> 2.0.3"
|
||||
# Testing
|
||||
floki = "~> 0.33"
|
||||
# untangle = "~> 0.1"
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
# bonfire_data_identity = "~> 0.1"
|
||||
# bonfire_data_social = "~> 0.1"
|
||||
# Testing a UI component library
|
||||
# surface_catalogue = "~> 0.1.0"
|
||||
# API
|
||||
absinthe = "~> 1.7.0"
|
||||
# Language detection
|
||||
text = "~> 0.2.0"
|
||||
text_corpus_udhr = "~> 0.1.0"
|
||||
# Version overrides
|
||||
#result = "~> 1.7"
|
||||
|
||||
# telemetry
|
||||
telemetry = "~> 1.1.0"
|
||||
telemetry_metrics = "~> 0.6.1"
|
||||
telemetry_poller = "~> 1.0.0"
|
||||
opentelemetry_exporter = "~> 1.0"
|
||||
opentelemetry = "~> 1.0"
|
||||
opentelemetry_api = "~> 1.0"
|
||||
opentelemetry_ecto = "~> 1.0"
|
||||
opentelemetry_liveview = "~> 1.0.0-rc.4"
|
||||
opentelemetry_phoenix = "~> 1.0"
|
||||
opentelemetry_cowboy = "~> 0.2"
|
||||
opentelemetry_oban = "~> 1.0"
|
|
@ -1,117 +0,0 @@
|
|||
import Config
|
||||
|
||||
# Important: indicate date of last release, to generate a changelog for issues closed since then
|
||||
changelog_issues_closed_after = "2022-08-30"
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# Note: you can run `Bonfire.Common.Config.put(:experimental_features_enabled, true)` to enable these in prod too
|
||||
experimental_features_enabled: true,
|
||||
database: System.get_env("POSTGRES_DB", "bonfire_dev"),
|
||||
# show_sensitive_data_on_connection_error: true,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||
# EctoSparkles does the logging instead
|
||||
log: false
|
||||
|
||||
local_deps =
|
||||
Mess.deps(
|
||||
if(System.get_env("WITH_FORKS", "1") == "1",
|
||||
do: [path: Path.relative_to_cwd("config/deps.path")],
|
||||
else: []
|
||||
),
|
||||
[]
|
||||
)
|
||||
|
||||
local_dep_names = Enum.map(local_deps, &elem(&1, 0))
|
||||
|
||||
dep_paths =
|
||||
Enum.map(local_deps, fn dep ->
|
||||
case elem(dep, 1)[:path] do
|
||||
nil -> nil
|
||||
path -> "#{path}/lib"
|
||||
end
|
||||
end)
|
||||
|> Enum.reject(&is_nil/1)
|
||||
|
||||
watch_paths = dep_paths ++ ["lib/"] ++ ["priv/static/"]
|
||||
|
||||
IO.puts("Watching these deps for code reloading: #{inspect(local_dep_names)}")
|
||||
|
||||
config :phoenix_live_reload,
|
||||
# watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
|
||||
dirs: watch_paths
|
||||
|
||||
# filename patterns that should trigger page reloads (only within the above dirs)
|
||||
patterns = [
|
||||
~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg|webp)$",
|
||||
# ~r"^priv/gettext/.*(po)$",
|
||||
~r"(_live|live_handler|live_handlers|routes)\.ex$",
|
||||
~r{(views|templates|pages|components)/.*(ex)$},
|
||||
~r".*(heex|leex|sface)$",
|
||||
~r"priv/catalogue/.*(ex)$"
|
||||
]
|
||||
|
||||
IO.puts("Watching these filenames for live reloading in the browser: #{inspect(patterns)}")
|
||||
|
||||
# Watch static and templates for browser reloading.
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server: true,
|
||||
debug_errors: true,
|
||||
check_origin: false,
|
||||
code_reloader: true,
|
||||
reloadable_apps: [:bonfire] ++ local_dep_names,
|
||||
watchers: [
|
||||
yarn: [
|
||||
"watch.js",
|
||||
cd: Path.expand("assets", File.cwd!())
|
||||
],
|
||||
yarn: [
|
||||
"watch.css",
|
||||
cd: Path.expand("assets", File.cwd!())
|
||||
],
|
||||
yarn: [
|
||||
"watch.assets",
|
||||
cd: Path.expand("assets", File.cwd!())
|
||||
]
|
||||
],
|
||||
live_reload: [
|
||||
patterns: patterns
|
||||
]
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint, phoenix_profiler: [server: Bonfire.Web.Profiler]
|
||||
|
||||
config :logger,
|
||||
level: :debug,
|
||||
truncate: :infinity
|
||||
|
||||
config :logger, :console,
|
||||
# Do not include metadata or timestamps
|
||||
format: "[$level] $message\n"
|
||||
|
||||
config :phoenix, :stacktrace_depth, 30
|
||||
|
||||
config :phoenix, :plug_init_mode, :runtime
|
||||
|
||||
config :exsync,
|
||||
src_monitor: true,
|
||||
reload_timeout: 75,
|
||||
# addition_dirs: ["/forks"],
|
||||
extra_extensions: [".leex", ".heex", ".js", ".css", ".sface"]
|
||||
|
||||
config :versioce, :changelog,
|
||||
# Or your own datagrabber module
|
||||
datagrabber: Versioce.Changelog.DataGrabber.Git,
|
||||
# Or your own formatter module
|
||||
formatter: Versioce.Changelog.Formatter.Keepachangelog
|
||||
|
||||
config :versioce, :changelog,
|
||||
closed_after: changelog_issues_closed_after,
|
||||
changelog_file: "docs/CHANGELOG-autogenerated.md",
|
||||
datagrabber: Bonfire.Common.Changelog.Github.DataGrabber,
|
||||
anchors: %{
|
||||
added: ["Feature"],
|
||||
changed: ["Improvement", "UI/UX", "Refactor"],
|
||||
deprecated: ["[DEP]"],
|
||||
removed: ["[REM]"],
|
||||
fixed: ["Bug"],
|
||||
security: ["Security", "Safety"]
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_api_graphql,
|
||||
disabled: false
|
||||
|
||||
# Please note that most of these are defaults meant to be overridden by instance admins in Settings rather than edited here
|
||||
config :bonfire, :ui,
|
||||
theme: [
|
||||
instance_name: "Bonfire",
|
||||
|
@ -7,7 +11,7 @@ config :bonfire, :ui,
|
|||
instance_theme_light: "light",
|
||||
instance_icon: "/images/bonfire-icon.png",
|
||||
instance_image: "/images/bonfires.png",
|
||||
instance_description: "This is a bonfire demo instance for testing purposes",
|
||||
instance_description: "This is a Bonfire (cooperation flavour) instance for testing purposes",
|
||||
instance_welcome: [
|
||||
title: "👋 Welcome",
|
||||
description:
|
||||
|
@ -23,91 +27,20 @@ More details at https://bonfirenetworks.org",
|
|||
]
|
||||
]
|
||||
],
|
||||
|
||||
# end theme
|
||||
# rich_text_editor_disabled: true,
|
||||
rich_text_editor: Bonfire.Editor.Quill,
|
||||
# rich_text_editor: Bonfire.Editor.Ck,
|
||||
# default
|
||||
font_family: "Inter (Latin Languages)",
|
||||
font_families: [
|
||||
"Inter (Latin Languages)",
|
||||
"Inter (More Languages)",
|
||||
"Noto Sans (Latin Languages)",
|
||||
"Noto Sans (More Languages)",
|
||||
"OpenDyslexic"
|
||||
],
|
||||
themes: [
|
||||
"bonfire",
|
||||
"dark",
|
||||
"synthwave",
|
||||
"retro",
|
||||
"cyberpunk",
|
||||
"valentine",
|
||||
"halloween",
|
||||
"garden",
|
||||
"forest",
|
||||
"aqua",
|
||||
"black",
|
||||
"luxury",
|
||||
"dracula",
|
||||
"business",
|
||||
"night",
|
||||
"coffee"
|
||||
],
|
||||
themes_light: [
|
||||
"light",
|
||||
"cupcake",
|
||||
"bumblebee",
|
||||
"emerald",
|
||||
"corporate",
|
||||
"retro",
|
||||
"cyberpunk",
|
||||
"valentine",
|
||||
"garden",
|
||||
"lofi",
|
||||
"pastel",
|
||||
"fantasy",
|
||||
"wireframe",
|
||||
"cmyk",
|
||||
"autumn",
|
||||
"acid",
|
||||
"lemonade",
|
||||
"winter"
|
||||
],
|
||||
show_trending_tags: [
|
||||
disabled: false,
|
||||
for_last_x_days: 30,
|
||||
limit: 8
|
||||
],
|
||||
smart_input: [
|
||||
post: true,
|
||||
cw: true,
|
||||
summary: true
|
||||
],
|
||||
hide_app_switcher: false,
|
||||
profile: [
|
||||
# TODO: make dynamic based on active extensions
|
||||
sections: [
|
||||
timeline: Bonfire.UI.Social.ProfileTimelineLive,
|
||||
# private: Bonfire.UI.Social.MessageThreadsLive,
|
||||
posts: Bonfire.UI.Social.ProfilePostsLive,
|
||||
boosts: Bonfire.UI.Social.ProfileBoostsLive,
|
||||
followers: Bonfire.UI.Social.ProfileFollowsLive,
|
||||
followed: Bonfire.UI.Social.ProfileFollowsLive,
|
||||
follow: Bonfire.UI.Me.RemoteInteractionFormLive
|
||||
# inventory: Bonfire.UI.Reflow.ProfileInventoryLive,
|
||||
],
|
||||
navigation: [
|
||||
timeline: "timeline",
|
||||
# inventory: "inventory",
|
||||
posts: "posts",
|
||||
boosts: "boosts"
|
||||
# private: "private",
|
||||
],
|
||||
widgets: []
|
||||
],
|
||||
smart_input_activities: [
|
||||
post: "Compose a post",
|
||||
category: "Create a topic",
|
||||
label: "New label",
|
||||
task: "Add a task",
|
||||
offer: "Publish an offer",
|
||||
|
@ -119,11 +52,6 @@ More details at https://bonfirenetworks.org",
|
|||
process: "Define a process"
|
||||
],
|
||||
smart_input_components: [
|
||||
post: Bonfire.UI.Social.WritePostContentLive,
|
||||
message: Bonfire.UI.Social.WritePostContentLive,
|
||||
category: Bonfire.Classify.Web.NewCategoryLive,
|
||||
# label: Bonfire.UI.Coordination.CreateLabelLive,
|
||||
label: Bonfire.Classify.Web.NewLabelLive,
|
||||
task: Bonfire.UI.Coordination.CreateTaskLive,
|
||||
upcycle_intent: Bonfire.Upcycle.Web.CreateIntentLive,
|
||||
upcycle_resource: Bonfire.Upcycle.Web.CreateResourceLive,
|
||||
|
@ -131,9 +59,7 @@ More details at https://bonfirenetworks.org",
|
|||
economic_event: Bonfire.UI.ValueFlows.SelectEconomicEventLive,
|
||||
process: Bonfire.UI.ValueFlows.CreateProcessLive,
|
||||
offer: Bonfire.UI.ValueFlows.CreateIntentLive,
|
||||
need: Bonfire.UI.ValueFlows.CreateIntentLive,
|
||||
page: Bonfire.Pages.Web.CreatePageLive,
|
||||
section: Bonfire.Pages.Web.EditSectionLive
|
||||
need: Bonfire.UI.ValueFlows.CreateIntentLive
|
||||
],
|
||||
resource: [
|
||||
navigation: [
|
||||
|
@ -163,10 +89,3 @@ More details at https://bonfirenetworks.org",
|
|||
# # Bonfire.UI.Social.HashtagsWidgetLive,
|
||||
# ],
|
||||
# ]
|
||||
|
||||
config :surface_catalogue,
|
||||
title: "Bonfire UI",
|
||||
subtitle: "Surface Components Documentation & Examples"
|
||||
|
||||
config :iconify_ex,
|
||||
generated_icon_modules_path: "./extensions/bonfire/lib/web/icons"
|
|
@ -1,20 +0,0 @@
|
|||
import Config
|
||||
|
||||
# We include the path to a cache manifest
|
||||
# containing the digested version of static files. This
|
||||
# manifest is generated by the `mix phx.digest` task,
|
||||
# which you should run after static files are built and
|
||||
# before starting your production server.
|
||||
config :bonfire, Bonfire.Web.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
|
||||
config :logger,
|
||||
backends: [:console, Sentry.LoggerBackend]
|
||||
|
||||
# Do not print debug messages in production
|
||||
config :logger, level: :info
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint, server: true
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# in releases migrations are not in a flavour-specific directory
|
||||
priv: "priv/repo"
|
|
@ -1,203 +0,0 @@
|
|||
# In this file, we load production configuration and secrets
|
||||
# from environment variables. You can also hardcode secrets,
|
||||
# although such is generally not recommended and you have to
|
||||
# remember to add this file to your .gitignore.
|
||||
import Config
|
||||
|
||||
host = System.get_env("HOSTNAME", "localhost")
|
||||
server_port = String.to_integer(System.get_env("SERVER_PORT", "4000"))
|
||||
public_port = String.to_integer(System.get_env("PUBLIC_PORT", "4000"))
|
||||
|
||||
repos =
|
||||
if System.get_env("TEST_INSTANCE") == "yes",
|
||||
do: [Bonfire.Common.Repo, Bonfire.Common.TestInstanceRepo],
|
||||
else: [Bonfire.Common.Repo]
|
||||
|
||||
# [Bonfire.Common.Repo, Beacon.Repo]
|
||||
|
||||
if (config_env() == :prod or System.get_env("OTEL_ENABLED") == "1") and
|
||||
(System.get_env("OTEL_EXPORTER_OTLP_ENDPOINT") || System.get_env("OTEL_LIGHTSEP_API_KEY") ||
|
||||
System.get_env("OTEL_HONEYCOMB_API_KEY")) do
|
||||
config :opentelemetry,
|
||||
disabled: false
|
||||
|
||||
config :opentelemetry_exporter,
|
||||
otlp_protocol: :http_protobuf
|
||||
|
||||
otel_endpoint = System.get_env("OTEL_EXPORTER_OTLP_ENDPOINT")
|
||||
|
||||
if otel_endpoint do
|
||||
IO.puts("NOTE: OTLP (open telemetry) data will be sent to #{otel_endpoint}")
|
||||
|
||||
config :opentelemetry_exporter,
|
||||
otlp_endpoint: otel_endpoint
|
||||
end
|
||||
|
||||
if System.get_env("OTEL_LIGHTSEP_API_KEY") do
|
||||
IO.puts("NOTE: OTLP (open telemetry) data will be sent to lightstep.com")
|
||||
# Example configuration for Lightstep.com, for more refers to:
|
||||
# https://github.com/open-telemetry/opentelemetry-erlang/tree/main/apps/opentelemetry_exporter#application-environment
|
||||
config :opentelemetry_exporter,
|
||||
# You can configure the compression type for exporting traces.
|
||||
otlp_compression: :gzip,
|
||||
oltp_traces_compression: :gzip,
|
||||
otlp_traces_endpoint: "https://ingest.lightstep.com:443/traces/otlp/v0.9",
|
||||
otlp_headers: [
|
||||
{"lightstep-access-token", System.get_env("OTEL_LIGHTSEP_API_KEY")}
|
||||
]
|
||||
end
|
||||
|
||||
if System.get_env("OTEL_HONEYCOMB_API_KEY") do
|
||||
IO.puts("NOTE: OTLP (open telemetry) data will be sent to honeycomb.io")
|
||||
|
||||
config :opentelemetry, :processors,
|
||||
otel_batch_processor: %{
|
||||
exporter: {
|
||||
:opentelemetry_exporter,
|
||||
%{
|
||||
endpoints: [
|
||||
{:https, 'api.honeycomb.io', 443,
|
||||
[
|
||||
verify: :verify_peer,
|
||||
cacertfile: :certifi.cacertfile(),
|
||||
depth: 3,
|
||||
customize_hostname_check: [
|
||||
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
|
||||
]
|
||||
]}
|
||||
],
|
||||
headers: [
|
||||
{"x-honeycomb-team", System.fetch_env!("OTEL_HONEYCOMB_API_KEY")},
|
||||
{"x-honeycomb-dataset", System.get_env("OTEL_SERVICE_NAME", "bonfire")}
|
||||
],
|
||||
protocol: :grpc
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
## load extensions' runtime configs (and behaviours) directly via extension-provided modules
|
||||
Bonfire.Common.Config.LoadExtensionsConfig.load_configs()
|
||||
##
|
||||
|
||||
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") ||
|
||||
raise """
|
||||
Environment variables for database are missing.
|
||||
For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE
|
||||
You can also set POSTGRES_PASSWORD (required),
|
||||
and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost)
|
||||
"""
|
||||
|
||||
repo_connection_config =
|
||||
if System.get_env("DATABASE_URL") do
|
||||
[url: System.get_env("DATABASE_URL")]
|
||||
else
|
||||
[
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost")
|
||||
]
|
||||
end
|
||||
|
||||
secret_key_base =
|
||||
System.get_env("SECRET_KEY_BASE") || System.get_env("CI") ||
|
||||
raise """
|
||||
environment variable SECRET_KEY_BASE is missing.
|
||||
You can generate one by calling: mix phx.gen.secret
|
||||
"""
|
||||
|
||||
signing_salt =
|
||||
System.get_env("SIGNING_SALT") || System.get_env("CI") ||
|
||||
raise """
|
||||
environment variable SIGNING_SALT is missing.
|
||||
"""
|
||||
|
||||
encryption_salt =
|
||||
System.get_env("ENCRYPTION_SALT") || System.get_env("CI") ||
|
||||
raise """
|
||||
environment variable ENCRYPTION_SALT is missing.
|
||||
"""
|
||||
|
||||
config :bonfire,
|
||||
host: host,
|
||||
app_name: System.get_env("APP_NAME", "Bonfire"),
|
||||
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
|
||||
github_token: System.get_env("GITHUB_TOKEN"),
|
||||
show_debug_errors_in_dev: System.get_env("SHOW_DEBUG_IN_DEV"),
|
||||
encryption_salt: encryption_salt,
|
||||
signing_salt: signing_salt
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server:
|
||||
config_env() != :test or System.get_env("TEST_INSTANCE") == "yes" or
|
||||
System.get_env("START_SERVER") == "yes",
|
||||
url: [
|
||||
host: host,
|
||||
port: public_port
|
||||
],
|
||||
http: [
|
||||
port: server_port
|
||||
],
|
||||
secret_key_base: secret_key_base,
|
||||
live_view: [signing_salt: signing_salt]
|
||||
|
||||
if System.get_env("SENTRY_DSN") do
|
||||
IO.puts("Note: errors will be reported to Sentry.")
|
||||
|
||||
config :sentry,
|
||||
dsn: System.get_env("SENTRY_DSN")
|
||||
|
||||
if System.get_env("SENTRY_NAME") do
|
||||
config :sentry, server_name: System.get_env("SENTRY_NAME")
|
||||
end
|
||||
end
|
||||
|
||||
pool_size = String.to_integer(System.get_env("POOL_SIZE", "10"))
|
||||
|
||||
database =
|
||||
case config_env() do
|
||||
:test -> "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
:dev -> System.get_env("POSTGRES_DB", "bonfire_dev")
|
||||
_ -> System.get_env("POSTGRES_DB", "bonfire")
|
||||
end
|
||||
|
||||
config :bonfire, ecto_repos: repos
|
||||
# config :bonfire_umbrella, ecto_repos: repos
|
||||
config :paginator, ecto_repos: repos
|
||||
config :bonfire, Bonfire.Common.Repo, repo_connection_config
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, repo_connection_config
|
||||
config :beacon, Beacon.Repo, repo_connection_config
|
||||
config :bonfire, Bonfire.Common.Repo, database: database
|
||||
config :beacon, Beacon.Repo, database: database
|
||||
config :paginator, Paginator.Repo, database: database
|
||||
config :beacon, Beacon.Repo, pool_size: pool_size
|
||||
config :bonfire, Bonfire.Common.TestInstanceRepo, priv: "priv/repo"
|
||||
config :activity_pub, ecto_repos: repos
|
||||
|
||||
config :activity_pub, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
queues: false
|
||||
|
||||
# start prod-only config
|
||||
if config_env() == :prod do
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# ssl: true,
|
||||
# database: System.get_env("POSTGRES_DB", "bonfire"),
|
||||
pool_size: pool_size,
|
||||
# Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead #
|
||||
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false"))
|
||||
end
|
||||
|
||||
# prod only config
|
||||
|
||||
# start prod and dev only config
|
||||
if config_env() != :test do
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100"))
|
||||
end
|
||||
|
||||
## bonfire_livebook
|
||||
if Code.ensure_loaded?(Livebook) do
|
||||
Livebook.config_runtime()
|
||||
end
|
|
@ -1,38 +0,0 @@
|
|||
# make sure you change everything to your own secrets!
|
||||
# and do not check this into git or any public host
|
||||
|
||||
# for sessions/cookies, you can generate strings for these by running: just secrets
|
||||
SECRET_KEY_BASE="you-should-put-a-secure-string-here"
|
||||
SIGNING_SALT="you-should-put-a-different-secure-string-here"
|
||||
ENCRYPTION_SALT="you-should-put-yet-another-secure-string-here"
|
||||
|
||||
# sentry client key
|
||||
SENTRY_DSN=put-your-sentry-dsn-here
|
||||
|
||||
# database access
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_DB=bonfire_db
|
||||
POSTGRES_PASSWORD=put_a_secure_db_pw_here
|
||||
|
||||
# signup to mailgun.com and edit with your domain and API key
|
||||
MAIL_DOMAIN=mailg.example.com
|
||||
MAIL_KEY=123
|
||||
MAIL_FROM=bonfire@example.com
|
||||
|
||||
# password for the search index
|
||||
MEILI_MASTER_KEY=key-to-protect-search-indexing-here
|
||||
|
||||
# password for the default admin user if you run the seeds
|
||||
SEEDS_USER=root
|
||||
SEEDS_PW=password
|
||||
|
||||
# backend stuff
|
||||
ERLANG_COOKIE=bonfire_cookie
|
||||
|
||||
# Bonfire extensions configs
|
||||
WEB_PUSH_SUBJECT=mailto:administrator@mydomain.net
|
||||
WEB_PUSH_PUBLIC_KEY=xyz
|
||||
WEB_PUSH_PRIVATE_KEY=abc
|
||||
GEOLOCATE_OPENCAGEDATA=
|
||||
MAPBOX_API_KEY="pk.eyJ1IjoibWF5ZWwiLCJhIjoiY2tlMmxzNXF5MGFpaDJ0bzR2M29id2EzOCJ9.QsmjD-zypsE0_wonLGCYlA"
|
||||
GITHUB_TOKEN=xyz
|
|
@ -1,28 +0,0 @@
|
|||
FLAVOUR=cooperation
|
||||
# server domain name:
|
||||
HOSTNAME=localhost
|
||||
# server port:
|
||||
SERVER_PORT=4000
|
||||
# port your visitors will access (typically 80 or 443, will be different than SERVER_PORT only if using a reverse proxy)
|
||||
PUBLIC_PORT=4000
|
||||
# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets section
|
||||
MAIL_BACKEND=none
|
||||
# hostname and port of meili search index
|
||||
SEARCH_MEILI_INSTANCE=http://localhost:7700
|
||||
# require an email address to be invited before being able to sign up
|
||||
INVITE_ONLY=true
|
||||
# a name and tagline for your instance
|
||||
INSTANCE_DESCRIPTION="An instance of Bonfire, a federated app ecosystem for open and cooperative networks"
|
||||
# uncomment in order to NOT automatically change the database schema when you upgrade the app
|
||||
# DISABLE_DB_AUTOMIGRATION=true
|
||||
# max file upload size (default is 20 meg)
|
||||
UPLOAD_LIMIT=20000000
|
||||
# ====================================
|
||||
# You should not have to edit any of the following ones:
|
||||
POSTGRES_HOST=localhost
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US.UTF-8
|
||||
REPLACE_OS_VARS=true
|
||||
LIVEVIEW_ENABLED=true
|
||||
|
||||
ACME_AGREE=true
|
|
@ -1,77 +0,0 @@
|
|||
import Config
|
||||
|
||||
## Import or set test configs for extensions
|
||||
|
||||
import_config "activity_pub_test.exs"
|
||||
|
||||
config :bonfire, Bonfire.Mailer, adapter: Bamboo.TestAdapter
|
||||
|
||||
config :bonfire_search,
|
||||
disabled: true,
|
||||
disable_indexing: true
|
||||
|
||||
## Other general test config
|
||||
|
||||
config :logger,
|
||||
level: :info,
|
||||
truncate: :infinity
|
||||
|
||||
# Configure your database
|
||||
# db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 60,
|
||||
# show_sensitive_data_on_connection_error: true,
|
||||
# database: db,
|
||||
slow_query_ms: 500,
|
||||
log: :info
|
||||
|
||||
# Optionally run a 2nd endpoint for testing federation
|
||||
config :bonfire, Bonfire.Web.FakeRemoteEndpoint,
|
||||
server: true,
|
||||
url: [
|
||||
host: "localhost",
|
||||
port: 4002
|
||||
],
|
||||
http: [
|
||||
port: 4002
|
||||
],
|
||||
secret_key_base: System.get_env("SECRET_KEY_BASE"),
|
||||
live_view: [signing_salt: System.get_env("SIGNING_SALT")],
|
||||
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false]
|
||||
|
||||
test_instance? = System.get_env("TEST_INSTANCE") == "yes"
|
||||
|
||||
config :tesla,
|
||||
adapter: if(test_instance?, do: Tesla.Adapter.Hackney, else: Tesla.Mock)
|
||||
|
||||
oban_mode = if(test_instance?, do: :inline, else: :manual)
|
||||
config :bonfire, Oban, testing: oban_mode
|
||||
config :activity_pub, Oban, testing: oban_mode
|
||||
|
||||
config :activity_pub, :disable_cache, test_instance?
|
||||
|
||||
if test_instance? do
|
||||
config :logger, :console,
|
||||
format: "[$level $metadata] $message\n",
|
||||
metadata: [:instance, :action]
|
||||
else
|
||||
config :logger, :console,
|
||||
format: "[$level $metadata] $message\n",
|
||||
metadata: [:action]
|
||||
end
|
||||
|
||||
config :pbkdf2_elixir, :rounds, 1
|
||||
|
||||
config :mix_test_interactive,
|
||||
clear: true
|
||||
|
||||
config :paginator, Paginator.Repo,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost")
|
|
@ -1,34 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
|
||||
config :nodeinfo, :adapter, Bonfire.Federate.ActivityPub.NodeinfoAdapter
|
||||
|
||||
config :activity_pub, :mrf_simple,
|
||||
media_removal: [],
|
||||
media_nsfw: [],
|
||||
report_removal: [],
|
||||
accept: [],
|
||||
avatar_removal: [],
|
||||
banner_removal: []
|
||||
|
||||
config :activity_pub, :instance,
|
||||
hostname: "localhost",
|
||||
federation_publisher_modules: [ActivityPubWeb.Publisher],
|
||||
federation_reachability_timeout_days: 7,
|
||||
federating: true,
|
||||
rewrite_policy: [Bonfire.Federate.ActivityPub.BoundariesMRF],
|
||||
handle_unknown_activities: true
|
||||
|
||||
config :activity_pub, :http,
|
||||
proxy_url: nil,
|
||||
send_user_agent: true,
|
||||
adapter: [
|
||||
ssl_options: [
|
||||
# Workaround for remote server certificate chain issues
|
||||
partial_chain: &:hackney_connect.partial_chain/1,
|
||||
# We don't support TLS v1.3 yet
|
||||
versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
|
||||
]
|
||||
]
|
|
@ -1,24 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
config :activity_pub, :endpoint_module, Bonfire.Web.Endpoint
|
||||
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
config :activity_pub, ecto_repos: [Bonfire.Common.Repo]
|
||||
|
||||
config :activity_pub, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
queues: false
|
||||
|
||||
config :activity_pub, :instance, federating: false
|
||||
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
|
||||
|
||||
config :tesla, adapter: Tesla.Mock
|
||||
|
||||
# Print only warnings and errors during test
|
||||
config :logger, level: :warn
|
||||
|
||||
config :activity_pub, ActivityPubWeb.Endpoint,
|
||||
http: [port: 4000],
|
||||
server: false
|
|
@ -1,9 +0,0 @@
|
|||
import Config
|
||||
|
||||
schema = Bonfire.API.GraphQL.Schema
|
||||
|
||||
config :bonfire_api_graphql,
|
||||
graphql_schema_module: schema
|
||||
|
||||
config :absinthe,
|
||||
schema: schema
|
|
@ -1,4 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_classify,
|
||||
templates_path: "lib"
|
|
@ -1,20 +0,0 @@
|
|||
import Config
|
||||
|
||||
default_locale = "en"
|
||||
|
||||
config :bonfire_common,
|
||||
otp_app: :bonfire
|
||||
|
||||
# internationalisation
|
||||
config :bonfire_common, Bonfire.Common.Localise.Cldr,
|
||||
default_locale: default_locale,
|
||||
# locales that will be made available on top of those for which gettext localisation files are available
|
||||
locales: ["fr", "en", "es"],
|
||||
providers: [Cldr.Language],
|
||||
gettext: Bonfire.Common.Localise.Gettext,
|
||||
data_dir: "./priv/cldr",
|
||||
add_fallback_locales: true,
|
||||
# precompile_number_formats: ["¤¤#,##0.##"],
|
||||
# precompile_transliterations: [{:latn, :arab}, {:thai, :latn}]
|
||||
# force_locale_download: false,
|
||||
generate_docs: true
|
|
@ -1,942 +0,0 @@
|
|||
import Config
|
||||
|
||||
#### Base configuration
|
||||
|
||||
verbs = [
|
||||
"Boost",
|
||||
"Create",
|
||||
"Delete",
|
||||
"Edit",
|
||||
"Flag",
|
||||
"Follow",
|
||||
"Like",
|
||||
"Mention",
|
||||
"Message",
|
||||
"Read",
|
||||
"Reply",
|
||||
"Request",
|
||||
"See",
|
||||
"Tag"
|
||||
]
|
||||
|
||||
# Choose password hashing backend
|
||||
# Note that this corresponds with our dependencies in mix.exs
|
||||
hasher = if config_env() in [:dev, :test], do: Pbkdf2, else: Argon2
|
||||
|
||||
config :bonfire_data_identity, Bonfire.Data.Identity.Credential, hasher_module: hasher
|
||||
|
||||
#### Sentinel Data Services
|
||||
|
||||
# Search these apps/extensions for Pointable ecto schema definitions to index
|
||||
pointable_schema_extensions = [
|
||||
:bonfire,
|
||||
:bonfire_data_access_control,
|
||||
:bonfire_data_activity_pub,
|
||||
:bonfire_data_identity,
|
||||
:bonfire_data_social,
|
||||
:bonfire_data_edges,
|
||||
:bonfire_tag,
|
||||
:bonfire_classify,
|
||||
:bonfire_data_shared_users,
|
||||
:bonfire_files,
|
||||
:bonfire_quantify,
|
||||
:bonfire_geolocate,
|
||||
:bonfire_valueflows,
|
||||
:bonfire_valueflows_observe
|
||||
]
|
||||
|
||||
config :pointers, :search_path, pointable_schema_extensions
|
||||
|
||||
# Search these apps/extensions for context or queries modules to index (i.e. they contain modules with a query_module/0 or context_modules/0 function)
|
||||
context_and_queries_extensions =
|
||||
pointable_schema_extensions ++
|
||||
[
|
||||
:bonfire_common,
|
||||
:bonfire_me,
|
||||
:bonfire_social
|
||||
]
|
||||
|
||||
extensions_with_config =
|
||||
context_and_queries_extensions ++
|
||||
[
|
||||
:bonfire_boundaries,
|
||||
:bonfire_federate_activitypub,
|
||||
:bonfire_search,
|
||||
:bonfire_mailer
|
||||
]
|
||||
|
||||
config :bonfire, :verb_names, verbs
|
||||
config :bonfire, :context_modules_search_path, context_and_queries_extensions
|
||||
config :bonfire, :query_modules_search_path, context_and_queries_extensions
|
||||
config :bonfire, :config_modules_search_path, extensions_with_config
|
||||
|
||||
# Search these apps/extensions for Verbs to index (i.e. they contain modules with a declare_verbs/0 function)
|
||||
config :bonfire_data_access_control,
|
||||
search_path: [
|
||||
# :bonfire_me,
|
||||
:bonfire_boundaries
|
||||
|
||||
# :bonfire_social,
|
||||
# :bonfire,
|
||||
]
|
||||
|
||||
#### Alias modules for readability
|
||||
alias Pointers.Pointer
|
||||
alias Pointers.Table
|
||||
|
||||
alias Bonfire.Data.AccessControl.Acl
|
||||
alias Bonfire.Data.AccessControl.Circle
|
||||
alias Bonfire.Data.AccessControl.Encircle
|
||||
alias Bonfire.Data.AccessControl.Controlled
|
||||
alias Bonfire.Data.AccessControl.InstanceAdmin
|
||||
alias Bonfire.Data.AccessControl.Grant
|
||||
alias Bonfire.Data.AccessControl.Verb
|
||||
|
||||
alias Bonfire.Data.ActivityPub.Actor
|
||||
alias Bonfire.Data.ActivityPub.Peer
|
||||
alias Bonfire.Data.ActivityPub.Peered
|
||||
|
||||
alias Bonfire.Boundaries.Permitted
|
||||
alias Bonfire.Boundaries.Stereotyped
|
||||
|
||||
alias Bonfire.Data.Edges.Edge
|
||||
alias Bonfire.Data.Edges.EdgeTotal
|
||||
|
||||
alias Bonfire.Data.Identity.Account
|
||||
alias Bonfire.Data.Identity.Accounted
|
||||
alias Bonfire.Data.Identity.Caretaker
|
||||
alias Bonfire.Data.Identity.CareClosure
|
||||
alias Bonfire.Data.Identity.Character
|
||||
alias Bonfire.Data.Identity.Credential
|
||||
alias Bonfire.Data.Identity.Email
|
||||
alias Bonfire.Data.Identity.Named
|
||||
alias Bonfire.Data.Identity.Self
|
||||
alias Bonfire.Data.Identity.Settings
|
||||
alias Bonfire.Data.Identity.User
|
||||
|
||||
alias Bonfire.Data.Social.Activity
|
||||
alias Bonfire.Data.Social.APActivity
|
||||
alias Bonfire.Data.Social.Article
|
||||
alias Bonfire.Data.Social.Block
|
||||
alias Bonfire.Data.Social.Bookmark
|
||||
alias Bonfire.Data.Social.Boost
|
||||
alias Bonfire.Data.Social.Created
|
||||
alias Bonfire.Data.Social.Feed
|
||||
alias Bonfire.Data.Social.FeedPublish
|
||||
alias Bonfire.Data.Social.Flag
|
||||
alias Bonfire.Data.Social.Follow
|
||||
alias Bonfire.Data.Social.Like
|
||||
alias Bonfire.Data.Social.Mention
|
||||
alias Bonfire.Data.Social.Message
|
||||
alias Bonfire.Data.Social.Post
|
||||
alias Bonfire.Data.Social.PostContent
|
||||
alias Bonfire.Data.Social.Profile
|
||||
alias Bonfire.Data.Social.Replied
|
||||
alias Bonfire.Data.Social.Request
|
||||
|
||||
alias Bonfire.Classify.Category
|
||||
alias Bonfire.Geolocate.Geolocation
|
||||
alias Bonfire.Files
|
||||
alias Bonfire.Files.Media
|
||||
alias Bonfire.Tag
|
||||
alias Bonfire.Tag.Tagged
|
||||
|
||||
#### Flexto Stitching
|
||||
|
||||
## WARNING: This is the flaky magic bit. We use configuration to
|
||||
## compile extra stuff into modules. If you add new fields or
|
||||
## relations to ecto models in a dependency, you must recompile that
|
||||
## dependency for it to show up! You will probably find you need to
|
||||
## `rm -Rf _build/*/lib/bonfire_data_*` a lot.
|
||||
|
||||
mixin = [foreign_key: :id, references: :id]
|
||||
|
||||
common_assocs = %{
|
||||
### Mixins
|
||||
|
||||
# A summary of an object that can appear in a feed.
|
||||
activity: quote(do: has_one(:activity, unquote(Activity), unquote(mixin))),
|
||||
# ActivityPub actor information
|
||||
actor: quote(do: has_one(:actor, unquote(Actor), unquote(mixin))),
|
||||
# Indicates the entity responsible for an activity. Sort of like creator, but transferrable. Used
|
||||
# during deletion - when the caretaker is deleted, all their stuff will be too.
|
||||
caretaker: quote(do: has_one(:caretaker, unquote(Caretaker), unquote(mixin))),
|
||||
# A Character has a unique username and some feeds.
|
||||
character: quote(do: has_one(:character, unquote(Character), unquote(mixin))),
|
||||
# Indicates the creator of an object
|
||||
created: quote(do: has_one(:created, unquote(Created), unquote(mixin))),
|
||||
# Used for non-textual interactions such as likes and follows to indicate the other object.
|
||||
edge: quote(do: has_one(:edge, unquote(Edge), unquote(mixin))),
|
||||
# Adds a name that can appear in the user interface for an object. e.g. for an ACL.
|
||||
named: quote(do: has_one(:named, unquote(Named), unquote(mixin))),
|
||||
# Information about the remote instance the object is from, if it is not local.
|
||||
peered: quote(do: has_one(:peered, unquote(Peered), unquote(mixin))),
|
||||
# Information about the content of posts, e.g. a scrubbed html body
|
||||
post_content: quote(do: has_one(:post_content, unquote(PostContent), unquote(mixin))),
|
||||
# Information about a user or other object that they wish to make available
|
||||
profile: quote(do: has_one(:profile, unquote(Profile), unquote(mixin))),
|
||||
# Threading information, for threaded discussions.
|
||||
replied: quote(do: has_one(:replied, unquote(Replied), unquote(mixin))),
|
||||
# Information that allows the system to identify special system-managed ACLS.
|
||||
stereotyped: quote(do: has_one(:stereotyped, unquote(Stereotyped), unquote(mixin))),
|
||||
|
||||
### Multimixins
|
||||
|
||||
# Links to access control information for this object.
|
||||
controlled: quote(do: has_many(:controlled, unquote(Controlled), unquote(mixin))),
|
||||
# Inserts the object into selected feeds.
|
||||
feed_publishes: quote(do: has_many(:feed_publishes, unquote(FeedPublish), unquote(mixin))),
|
||||
|
||||
# Information that this object has some files
|
||||
files: quote(do: has_many(:files, unquote(Files), unquote(mixin))),
|
||||
# The actual files
|
||||
media:
|
||||
quote(
|
||||
do:
|
||||
many_to_many(:media, unquote(Media),
|
||||
join_through: unquote(Files),
|
||||
unique: true,
|
||||
join_keys: [id: :id, media_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
),
|
||||
|
||||
# Information that this object tagged other objects.
|
||||
tagged: quote(do: has_many(:tagged, unquote(Tagged), unquote(mixin))),
|
||||
# The actual tags
|
||||
tags:
|
||||
quote(
|
||||
do:
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
unique: true,
|
||||
join_keys: [id: :id, tag_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
),
|
||||
|
||||
### Regular has_many associations
|
||||
|
||||
# The objects which reply to this object.
|
||||
direct_replies:
|
||||
quote(do: has_many(:direct_replies, unquote(Replied), foreign_key: :reply_to_id)),
|
||||
# A recursive view of caretakers of caretakers of... used during deletion.
|
||||
care_closure: quote(do: has_many(:care_closure, unquote(CareClosure), foreign_key: :branch_id)),
|
||||
# Retrieves activities where we are the object. e.g. if we are a
|
||||
# post or a user, this could turn up activities from likes or follows.
|
||||
activities:
|
||||
quote(do: has_many(:activities, unquote(Activity), foreign_key: :object_id, references: :id)),
|
||||
|
||||
### Stuff I'm not sure how to categorise yet
|
||||
|
||||
# Used currently only for requesting to follow a user, but more general
|
||||
request: quote(do: has_one(:request, unquote(Request), unquote(mixin)))
|
||||
}
|
||||
|
||||
# retrieves a list of quoted forms suitable for use with unquote_splicing
|
||||
common = fn names ->
|
||||
for name <- List.wrap(names) do
|
||||
with nil <- common_assocs[name],
|
||||
do:
|
||||
raise(RuntimeError, message: "Expected a common association name, got #{inspect(name)}")
|
||||
end
|
||||
end
|
||||
|
||||
edge = common.([:controlled, :activities, :request, :created])
|
||||
|
||||
edges =
|
||||
common.([:controlled, :activities, :request, :created, :caretaker, :activity, :feed_publishes])
|
||||
|
||||
# first up, pointers could have all the mixins we're using. TODO
|
||||
|
||||
pointer_mixins =
|
||||
common.([
|
||||
:activity,
|
||||
:actor,
|
||||
:caretaker,
|
||||
:character,
|
||||
:created,
|
||||
:edge,
|
||||
:named,
|
||||
:peered,
|
||||
:post_content,
|
||||
:profile,
|
||||
:replied,
|
||||
:stereotyped
|
||||
])
|
||||
|
||||
config :pointers, Pointer,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
field(:dummy, :any, virtual: true)
|
||||
# pointables
|
||||
has_one(:circle, unquote(Circle), foreign_key: :id)
|
||||
has_one(:permitted, unquote(Permitted), foreign_key: :object_id)
|
||||
has_one(:user, unquote(User), foreign_key: :id)
|
||||
has_one(:post, unquote(Post), foreign_key: :id)
|
||||
has_one(:message, unquote(Message), foreign_key: :id)
|
||||
has_one(:category, unquote(Category), foreign_key: :id)
|
||||
has_one(:geolocation, unquote(Geolocation), foreign_key: :id)
|
||||
# mixins
|
||||
unquote_splicing(pointer_mixins)
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media]))
|
||||
# has_many
|
||||
unquote_splicing(common.([:activities, :care_closure, :direct_replies, :feed_publishes]))
|
||||
|
||||
## special things
|
||||
# these should go away in future and they should be populated by a single query.
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :pointers, Table, []
|
||||
|
||||
# now let's weave everything else together for convenience
|
||||
# bonfire_data_access_control
|
||||
|
||||
config :bonfire_data_access_control, Acl,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
(unquote_splicing(common.([:caretaker, :named, :stereotyped])))
|
||||
|
||||
# multimixins
|
||||
# unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Circle,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:caretaker, :named, :stereotyped]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Controlled, []
|
||||
|
||||
config :bonfire_data_access_control, Encircle,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:peer, unquote(Peer), foreign_key: :id, references: :subject_id)
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Grant,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
(unquote_splicing(common.([:caretaker])))
|
||||
|
||||
# multimixins
|
||||
# unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Verb, []
|
||||
|
||||
config :bonfire_boundaries, Stereotyped,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
(unquote_splicing(common.([:named])))
|
||||
end)
|
||||
|
||||
# bonfire_data_activity_pub
|
||||
|
||||
config :bonfire_data_activity_pub, Actor,
|
||||
code:
|
||||
(quote do
|
||||
# hacks
|
||||
belongs_to(:character, unquote(Character), foreign_key: :id, define_field: false)
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
# mixins
|
||||
unquote_splicing(common.([:peered]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_activity_pub, Peer, []
|
||||
config :bonfire_data_activity_pub, Peered, []
|
||||
|
||||
# bonfire_data_identity
|
||||
|
||||
config :bonfire_data_identity, Account,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:credential, unquote(Credential), foreign_key: :id)
|
||||
has_one(:email, unquote(Email), foreign_key: :id)
|
||||
has_one(:settings, unquote(Settings), foreign_key: :id)
|
||||
|
||||
many_to_many(:users, unquote(User),
|
||||
join_through: Accounted,
|
||||
join_keys: [account_id: :id, id: :id]
|
||||
)
|
||||
|
||||
# optional
|
||||
many_to_many(:shared_users, unquote(User),
|
||||
join_through: "bonfire_data_shared_user_accounts",
|
||||
join_keys: [account_id: :id, shared_user_id: :id]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Accounted,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Caretaker,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:user, unquote(User), foreign_key: :id, references: :caretaker_id)
|
||||
# mixins
|
||||
unquote_splicing(common.([:character, :profile]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Character,
|
||||
code:
|
||||
(quote do
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
# mixins
|
||||
unquote_splicing(common.([:actor, :peered, :profile]))
|
||||
has_one(:user, unquote(User), unquote(mixin))
|
||||
has_one(:feed, unquote(Feed), unquote(mixin))
|
||||
has_many(:followers, unquote(Follow), foreign_key: :following_id, references: :id)
|
||||
has_many(:followed, unquote(Follow), foreign_key: :follower_id, references: :id)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Credential,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:account, unquote(Account), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Email,
|
||||
must_confirm: true,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:account, unquote(Account), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Self, []
|
||||
|
||||
config :bonfire_data_identity, User,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
# mixins
|
||||
has_one(:accounted, unquote(Accounted), foreign_key: :id)
|
||||
has_one(:instance_admin, unquote(InstanceAdmin), foreign_key: :id, on_replace: :update)
|
||||
has_one(:self, unquote(Self), foreign_key: :id)
|
||||
has_one(:shared_user, unquote(Bonfire.Data.SharedUser), foreign_key: :id)
|
||||
has_one(:settings, unquote(Settings), foreign_key: :id)
|
||||
unquote_splicing(common.([:actor, :character, :created, :peered, :profile]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
# manies
|
||||
has_many(:encircles, unquote(Encircle), foreign_key: :subject_id)
|
||||
# todo: stop through
|
||||
has_many(:creations, through: [:created, :pointer])
|
||||
# todo: stop through
|
||||
has_many(:posts, through: [:created, :post])
|
||||
|
||||
has_many(:followers, unquote(Edge),
|
||||
foreign_key: :object_id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:followed, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:user_activities, unquote(Activity), foreign_key: :subject_id, references: :id)
|
||||
|
||||
has_many(:boost_activities, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_many(:like_activities, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
many_to_many(:caretaker_accounts, unquote(Account),
|
||||
join_through: "bonfire_data_shared_user_accounts",
|
||||
join_keys: [shared_user_id: :id, account_id: :id]
|
||||
)
|
||||
|
||||
# has_many :account, through: [:accounted, :account] # this is private info, do not expose
|
||||
# has_one :geolocation, Bonfire.Geolocate.Geolocation # enable if using Geolocate extension
|
||||
end)
|
||||
|
||||
### bonfire_data_social
|
||||
|
||||
config :bonfire_data_social, Activity,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
has_many(:feed_publishes, unquote(FeedPublish), unquote(mixin))
|
||||
has_one(:seen, unquote(Edge), foreign_key: :id, references: :id)
|
||||
# ugly workaround needed for certain queries (TODO: check if still needed)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :id, references: :id)
|
||||
# mixins linked to the object rather than the activity:
|
||||
has_one(:created, unquote(Created), foreign_key: :id, references: :object_id)
|
||||
has_one(:replied, unquote(Replied), foreign_key: :id, references: :object_id)
|
||||
field(:path, EctoMaterializedPath.ULIDs, virtual: true)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:controlled, unquote(Controlled), foreign_key: :id, references: :object_id)
|
||||
has_many(:tagged, unquote(Tagged), foreign_key: :id, references: :object_id)
|
||||
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
unique: true,
|
||||
join_keys: [id: :object_id, tag_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
|
||||
has_many(:files, unquote(Files), foreign_key: :id, references: :object_id)
|
||||
|
||||
many_to_many(:media, unquote(Media),
|
||||
join_through: unquote(Files),
|
||||
unique: true,
|
||||
join_keys: [id: :object_id, media_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, APActivity,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(common.([:activity, :caretaker])))
|
||||
end)
|
||||
|
||||
config :bonfire_data_edges, Edge,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edge))
|
||||
|
||||
# TODO: requires composite foreign keys:
|
||||
# has_one :activity, unquote(Activity),
|
||||
# foreign_key: [:table_id, :object_id], references: [:table_id, :object_id]
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Feed,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
(unquote_splicing(common.([:activity, :caretaker])))
|
||||
|
||||
# belongs_to :character, unquote(Character), foreign_key: :id, define_field: false
|
||||
# belongs_to :user, unquote(User), foreign_key: :id, define_field: false
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, FeedPublish,
|
||||
code:
|
||||
(quote do
|
||||
field(:dummy, :any, virtual: true)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :object_id, references: :id)
|
||||
|
||||
# belongs_to :character, unquote(Character), foreign_key: :id, define_field: false
|
||||
# belongs_to :user, unquote(User), foreign_key: :id, define_field: false
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Follow,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
# belongs_to: [follower_character: {Character, foreign_key: :follower_id, define_field: false}],
|
||||
# belongs_to: [follower_profile: {Profile, foreign_key: :follower_id, define_field: false}],
|
||||
# belongs_to: [followed_character: {Character, foreign_key: :followed_id, define_field: false}],
|
||||
# belongs_to: [followed_profile: {Profile, foreign_key: :followed_id, define_field: false}]
|
||||
|
||||
config :bonfire_data_social, Block,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Boost,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
# has_one: [activity: {Activity, foreign_key: :object_id, references: :boosted_id}] # requires an ON clause
|
||||
|
||||
config :bonfire_data_social, Like,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
# has_one: [activity: {Activity, foreign_key: :object_id, references: :liked_id}] # requires an ON clause
|
||||
|
||||
config :bonfire_data_social, Flag,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Request,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Bookmark,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Message,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([:activity, :caretaker, :created, :peered, :post_content, :replied])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :feed_publishes, :tagged, :tags, :files, :media]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
# special
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Mention, []
|
||||
config :bonfire_data_social, Named, []
|
||||
|
||||
config :bonfire_data_social, Post,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([:activities, :activity, :caretaker, :created, :peered, :post_content, :replied])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
# special
|
||||
has_one(:permitted, unquote(Permitted), foreign_key: :object_id)
|
||||
# has_one: [creator_user: {[through: [:created, :creator_user]]}],
|
||||
# has_one: [creator_character: {[through: [:created, :creator_character]]}],
|
||||
# has_one: [creator_profile: {[through: [:created, :creator_profile]]}],
|
||||
# has_one :activity, unquote(Activity), foreign_key: :object_id, references: :id # requires an ON clause
|
||||
# has_one: [reply_to: {[through: [:replied, :reply_to]]}],
|
||||
# has_one: [reply_to_post: {[through: [:replied, :reply_to_post]]}],
|
||||
# has_one: [reply_to_post_content: {[through: [:replied, :reply_to_post_content]]}],
|
||||
# has_one: [reply_to_creator_character: {[through: [:replied, :reply_to_creator_character]]}],
|
||||
# has_one: [reply_to_creator_profile: {[through: [:replied, :reply_to_creator_profile]]}],
|
||||
# has_one: [thread_post: {[through: [:replied, :thread_post]]}],
|
||||
# has_one: [thread_post_content: {[through: [:replied, :thread_post_content]]}],
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, PostContent,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:created]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
# virtuals for changesets
|
||||
field(:hashtags, {:array, :any}, virtual: true)
|
||||
field(:mentions, {:array, :any}, virtual: true)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Replied,
|
||||
code:
|
||||
(quote do
|
||||
# multimixins - shouldn't be here really
|
||||
unquote_splicing(common.([:controlled]))
|
||||
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
belongs_to(:post, unquote(Post), foreign_key: :id, define_field: false)
|
||||
belongs_to(:post_content, unquote(PostContent), foreign_key: :id, define_field: false)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :object_id, references: :id)
|
||||
# used in changesets
|
||||
field(:replying_to, :map, virtual: true)
|
||||
has_one(:reply_to_post, unquote(Post), foreign_key: :id, references: :reply_to_id)
|
||||
|
||||
has_one(:reply_to_post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
references: :reply_to_id
|
||||
)
|
||||
|
||||
has_one(:reply_to_created, unquote(Created), foreign_key: :id, references: :reply_to_id)
|
||||
# has_one :reply_to_creator_user, through: [:reply_to_created, :creator_user]
|
||||
# has_one :reply_to_creator_character, through: [:reply_to_created, :creator_character]
|
||||
# has_one :reply_to_creator_profile, through: [:reply_to_created, :creator_profile]
|
||||
has_many(:direct_replies, unquote(Replied), foreign_key: :reply_to_id, references: :id)
|
||||
has_many(:thread_replies, unquote(Replied), foreign_key: :thread_id, references: :id)
|
||||
has_one(:thread_post, unquote(Post), foreign_key: :id, references: :thread_id)
|
||||
|
||||
has_one(:thread_post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
references: :thread_id
|
||||
)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Created,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:creator_user, unquote(User), foreign_key: :creator_id, define_field: false)
|
||||
|
||||
belongs_to(:creator_character, unquote(Character),
|
||||
foreign_key: :creator_id,
|
||||
define_field: false
|
||||
)
|
||||
|
||||
belongs_to(:creator_profile, unquote(Profile),
|
||||
foreign_key: :creator_id,
|
||||
define_field: false
|
||||
)
|
||||
|
||||
# mixins - shouldn't be here really
|
||||
unquote_splicing(common.([:peered]))
|
||||
# huh?
|
||||
has_one(:post, unquote(Post), unquote(mixin))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Profile,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
# multimixins - shouldn't be here really
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
######### other extensions
|
||||
|
||||
config :bonfire_files, Media,
|
||||
code:
|
||||
(quote do
|
||||
field(:url, :string, virtual: true)
|
||||
# multimixins - shouldn't be here really
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_classify, Category,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
# TODO :caretaker
|
||||
unquote_splicing(common.([:activity, :created, :actor, :peered, :profile, :character]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :feed_publishes]))
|
||||
|
||||
# add references of tagged objects to any Category
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
unique: true,
|
||||
join_keys: [tag_id: :id, id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_geolocate, Bonfire.Geolocate.Geolocation,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([:activity, :caretaker, :created, :actor, :peered, :profile, :character])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.EconomicEvent,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
# TODO :caretaker
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.EconomicResource,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Knowledge.ResourceSpecification,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Process,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Knowledge.ProcessSpecification,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Planning.Intent,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Planning.Commitment,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Proposal,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows_observe, ValueFlows.Observe.Observation,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
|
@ -1,22 +0,0 @@
|
|||
import Config
|
||||
|
||||
alias Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
actor_types = ["Person", "Group", "Application", "Service", "Organization"]
|
||||
|
||||
config :bonfire,
|
||||
federation_search_path: [
|
||||
:bonfire_common,
|
||||
:bonfire_me,
|
||||
:bonfire_social,
|
||||
:bonfire_valueflows
|
||||
],
|
||||
# enable/disable logging of federation logic
|
||||
log_federation: true,
|
||||
federation_fallback_module: Bonfire.Social.APActivities
|
||||
|
||||
config :bonfire, actor_AP_types: actor_types
|
||||
|
||||
# config :bonfire, Bonfire.Instance,
|
||||
# hostname: hostname,
|
||||
# description: desc
|
|
@ -1,56 +0,0 @@
|
|||
import Config
|
||||
|
||||
# where do you want to store files? supports local storage, s3-compatible services, and more
|
||||
# see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider
|
||||
config :waffle,
|
||||
storage: Waffle.Storage.Local,
|
||||
# or {:system, "ASSET_HOST"}
|
||||
asset_host: "/"
|
||||
|
||||
image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"]
|
||||
|
||||
all_allowed_media_types =
|
||||
image_media_types ++
|
||||
[
|
||||
"text/plain",
|
||||
# doc
|
||||
"text/csv",
|
||||
"application/pdf",
|
||||
"application/rtf",
|
||||
"application/msword",
|
||||
"application/vnd.ms-excel",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"application/vnd.oasis.opendocument.presentation",
|
||||
"application/vnd.oasis.opendocument.spreadsheet",
|
||||
"application/vnd.oasis.opendocument.text",
|
||||
"application/epub+zip",
|
||||
# archives
|
||||
"application/x-tar",
|
||||
"application/x-bzip",
|
||||
"application/x-bzip2",
|
||||
"application/gzip",
|
||||
"application/zip",
|
||||
"application/rar",
|
||||
"application/x-7z-compressed",
|
||||
# audio
|
||||
"audio/mpeg",
|
||||
"audio/ogg",
|
||||
"audio/wav",
|
||||
"audio/webm",
|
||||
"audio/opus",
|
||||
# video
|
||||
"video/mp4",
|
||||
"video/mpeg",
|
||||
"video/ogg",
|
||||
"video/webm"
|
||||
]
|
||||
|
||||
config :bonfire_files, image_media_types: image_media_types
|
||||
config :bonfire_files, all_allowed_media_types: all_allowed_media_types
|
||||
|
||||
config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types
|
||||
config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types
|
||||
|
||||
config :bonfire_files, Bonfire.Files.DocumentUploader,
|
||||
allowed_media_types: all_allowed_media_types
|
|
@ -1,6 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_me,
|
||||
validate_name_min: 1,
|
||||
# needed for taxonomy
|
||||
validate_name_max: 250
|
|
@ -1,4 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_geolocate,
|
||||
templates_path: "lib"
|
|
@ -1,8 +0,0 @@
|
|||
import Config
|
||||
|
||||
# config :bonfire, :hooks,
|
||||
# %{
|
||||
# {Bonfire.Social.Posts, :publish} => %{
|
||||
# after: {IO, :inspect}
|
||||
# }
|
||||
# }
|
|
@ -1,10 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_mailer,
|
||||
check_mx: true,
|
||||
check_format: true
|
||||
|
||||
config :bonfire, Bonfire.Mailer,
|
||||
# what service you want to use to send emails, from these: https://github.com/thoughtbot/bamboo#available-adapters
|
||||
# we recommend leaving LocalAdapter (which is just a fallback which won't actually send emails) and setting the actual adapter in runtime.exs
|
||||
adapter: Bamboo.LocalAdapter
|
|
@ -1,7 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_quantify,
|
||||
templates_path: "lib"
|
||||
|
||||
# specify what types a unit can have as context
|
||||
config :bonfire_quantify, Bonfire.Quantify.Units, valid_contexts: [Bonfire.Quantify.Units]
|
|
@ -1,14 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_search,
|
||||
disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"),
|
||||
adapter: Bonfire.Search.Meili,
|
||||
# protocol, hostname and port
|
||||
instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"),
|
||||
# secret key
|
||||
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me")
|
||||
|
||||
# for use by API client
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
config :phoenix, :format_encoders, json: Jason
|
||||
config :phoenix, :json_library, Jason
|
|
@ -1,4 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_tag,
|
||||
templates_path: "lib"
|
|
@ -1,44 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire, :ui,
|
||||
theme: [
|
||||
instance_name: "HAHA Academy",
|
||||
instance_icon: "/images/bonfire-icon.png",
|
||||
instance_image: "https://haha.academy/images/wheel.png",
|
||||
instance_description: "Community roadmaps for learning every branch of human knowledge"
|
||||
],
|
||||
rich_text_editor: Bonfire.Editor.Quill,
|
||||
smart_input: [
|
||||
post: true,
|
||||
cw: true,
|
||||
summary: true
|
||||
],
|
||||
profile: [
|
||||
sections: [
|
||||
timeline: Bonfire.UI.Social.ProfileTimelineLive,
|
||||
# private: Bonfire.UI.Social.MessageThreadsLive,
|
||||
posts: Bonfire.UI.Social.ProfilePostsLive,
|
||||
boosts: Bonfire.UI.Social.ProfileBoostsLive,
|
||||
followers: Bonfire.UI.Social.ProfileFollowsLive,
|
||||
followed: Bonfire.UI.Social.ProfileFollowsLive
|
||||
],
|
||||
navigation: [
|
||||
timeline: "timeline",
|
||||
posts: "posts",
|
||||
boosts: "boosts"
|
||||
# private: "private",
|
||||
],
|
||||
widgets: []
|
||||
],
|
||||
smart_input_activities: [
|
||||
# offer: "Publish an offer",
|
||||
# need: "Publish a need",
|
||||
# transfer_resource: "Transfer a resource",
|
||||
# produce_resource: "Add a resource",
|
||||
# intent: "Indicate an itent",
|
||||
# economic_event: "Record an economic event",
|
||||
# process: "Define a process"
|
||||
],
|
||||
smart_input_components: [
|
||||
post: Bonfire.UI.Social.WritePostContentLive
|
||||
]
|
|
@ -1,88 +0,0 @@
|
|||
import Config
|
||||
|
||||
default_flavour = "classic"
|
||||
flavour = System.get_env("FLAVOUR", default_flavour)
|
||||
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
|
||||
|
||||
#### Basic configuration
|
||||
|
||||
# You probably won't want to touch these. You might override some in
|
||||
# other config files.
|
||||
|
||||
config :bonfire,
|
||||
otp_app: :bonfire,
|
||||
env: config_env(),
|
||||
flavour: flavour,
|
||||
flavour_path: flavour_path,
|
||||
app_name: System.get_env("APP_NAME", "Bonfire"),
|
||||
repo_module: Bonfire.Common.Repo,
|
||||
web_module: Bonfire.UI.Common.Web,
|
||||
endpoint_module: Bonfire.Web.Endpoint,
|
||||
mailer_module: Bonfire.Mailer,
|
||||
default_web_namespace: Bonfire.UI.Common,
|
||||
default_layout_module: Bonfire.UI.Common.LayoutView,
|
||||
graphql_schema_module: Bonfire.API.GraphQL.Schema,
|
||||
user_schema: Bonfire.Data.Identity.User,
|
||||
org_schema: Bonfire.Data.Identity.User,
|
||||
home_page: Bonfire.Web.HomeLive,
|
||||
localisation_path: "priv/localisation",
|
||||
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
|
||||
signing_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
|
||||
encryption_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs"
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
http: [
|
||||
# this gets overridden in runtime.exs
|
||||
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
|
||||
transport_options: [socket_opts: [:inet6]]
|
||||
],
|
||||
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false],
|
||||
pubsub_server: Bonfire.PubSub
|
||||
|
||||
config :phoenix, :json_library, Jason
|
||||
config :phoenix_gon, :json_library, Jason
|
||||
|
||||
config :bonfire, :ecto_repos, [Bonfire.Common.Repo]
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
types: Bonfire.Geolocate.PostgresTypes,
|
||||
priv: flavour_path <> "/repo"
|
||||
|
||||
# ecto query filtering
|
||||
# config :query_elf, :id_types, [:id, :binary_id, Pointers.ULID]
|
||||
|
||||
config :logger, :console,
|
||||
format: "$time $metadata[$level] $message\n",
|
||||
metadata: [:request_id]
|
||||
|
||||
config :bonfire, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
plugins: [Oban.Plugins.Pruner],
|
||||
queues: [
|
||||
federator_incoming: 50,
|
||||
federator_outgoing: 50
|
||||
]
|
||||
|
||||
config :mime, :types, %{
|
||||
"application/json" => ["json"],
|
||||
"application/activity+json" => ["activity+json"],
|
||||
"application/ld+json" => ["ld+json"],
|
||||
"application/jrd+json" => ["jrd+json"]
|
||||
}
|
||||
|
||||
config :sentry,
|
||||
dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
|
||||
environment_name: Mix.env(),
|
||||
included_environments: [:prod]
|
||||
|
||||
# include config for all used Bonfire extensions
|
||||
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
|
||||
# IO.inspect(include_config: config)
|
||||
import_config config
|
||||
end
|
||||
|
||||
import_config "activity_pub.exs"
|
||||
|
||||
# finally, append/override config based on env, which will override any config set above (including from imported files)
|
||||
import_config "#{config_env()}.exs"
|
|
@ -1,3 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :phoenix, :json_library, Jason
|
3
flavours/haha/config/deps.flavour.git
Normal file
3
flavours/haha/config/deps.flavour.git
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
bonfire_classify = "https://github.com/bonfire-networks/bonfire_classify#main"
|
||||
bonfire_taxonomy_seeder = "https://github.com/bonfire-networks/bonfire_taxonomy_seeder#main"
|
2
flavours/haha/config/deps.flavour.hex
Normal file
2
flavours/haha/config/deps.flavour.hex
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
phil_columns = "~> 3.1" # for inserting seed data in the DB
|
|
@ -1,47 +0,0 @@
|
|||
activity_pub = "https://github.com/bonfire-networks/activity_pub#develop"
|
||||
bonfire_common = "https://github.com/bonfire-networks/bonfire_common#main"
|
||||
bonfire_data_access_control = "https://github.com/bonfire-networks/bonfire_data_access_control#main"
|
||||
bonfire_data_activity_pub = "https://github.com/bonfire-networks/bonfire_data_activity_pub#main"
|
||||
bonfire_data_identity = "https://github.com/bonfire-networks/bonfire_data_identity#main"
|
||||
bonfire_data_social = "https://github.com/bonfire-networks/bonfire_data_social#main"
|
||||
bonfire_me = "https://github.com/bonfire-networks/bonfire_me#main"
|
||||
bonfire_social = "https://github.com/bonfire-networks/bonfire_social#main"
|
||||
bonfire_mailer = "https://github.com/bonfire-networks/bonfire_mailer#main"
|
||||
# bonfire_web_phoenix = "https://github.com/bonfire-networks/bonfire_web_phoenix#main"
|
||||
pointers = "https://github.com/bonfire-networks/pointers#main"
|
||||
pointers_ulid = "https://github.com/bonfire-networks/pointers_ulid#main"
|
||||
nodeinfo = "https://github.com/bonfire-networks/nodeinfo#main"
|
||||
# surface = "https://github.com/bonfire-networks/surface"
|
||||
bonfire_ui_common = "https://github.com/bonfire-networks/bonfire_ui_common#main"
|
||||
bonfire_ui_social = "https://github.com/bonfire-networks/bonfire_ui_social#main"
|
||||
bonfire_ui_me = "https://github.com/bonfire-networks/bonfire_ui_me#main"
|
||||
# bonfire_quantify = "https://github.com/bonfire-networks/bonfire_quantify#main"
|
||||
# bonfire_geolocate = "https://github.com/bonfire-networks/bonfire_geolocate#main"
|
||||
# bonfire_valueflows = "https://github.com/bonfire-networks/bonfire_valueflows#main"
|
||||
# bonfire_api_graphql = "https://github.com/bonfire-networks/bonfire_api_graphql#main"
|
||||
# bonfire_ui_valueflows = "https://github.com/bonfire-networks/bonfire_ui_valueflows#main"
|
||||
# bonfire_ui_reflow = "https://github.com/bonfire-networks/bonfire_ui_reflow#main"
|
||||
# bonfire_ui_coordination = "https://github.com/bonfire-networks/bonfire_ui_coordination#main"
|
||||
# bonfire_breadpub = "https://github.com/bonfire-networks/bonfire_breadpub#main"
|
||||
# bonfire_recyclapp = "https://github.com/bonfire-networks/bonfire_recyclapp#main"
|
||||
# bonfire_website = "https://github.com/bonfire-networks/bonfire_website#main"
|
||||
bonfire_tag = "https://github.com/bonfire-networks/bonfire_tag#main"
|
||||
bonfire_classify = "https://github.com/bonfire-networks/bonfire_classify#main"
|
||||
bonfire_taxonomy_seeder = "https://github.com/bonfire-networks/bonfire_taxonomy_seeder#main"
|
||||
bonfire_search = "https://github.com/bonfire-networks/bonfire_search#main"
|
||||
# bonfire_data_shared_user = "https://github.com/bonfire-networks/bonfire_data_shared_user#main"
|
||||
# bonfire_valueflows_observe = "https://github.com/bonfire-networks/bonfire_valueflows_observe"
|
||||
# absinthe_client = "https://github.com/mayel/absinthe_client.git"
|
||||
flexto = "https://github.com/bonfire-networks/flexto#main"
|
||||
bonfire_federate_activitypub = "https://github.com/bonfire-networks/bonfire_federate_activitypub#main"
|
||||
bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#main"
|
||||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
emote = "https://github.com/bonfire-networks/emote"
|
||||
paginator = "https://github.com/bonfire-networks/paginator"
|
||||
bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort"
|
||||
# surface_catalogue = "https://github.com/surface-ui/surface_catalogue" # Testing a UI component library
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
|
@ -1,29 +0,0 @@
|
|||
earmark = "~> 1.4.20" # handle markdown
|
||||
earmark_parser = "~> 1.4.25" # parse markdown
|
||||
# web
|
||||
phoenix_live_dashboard = "~> 0.7.0"
|
||||
plug_cowboy = "~> 2.5"
|
||||
gettext = "~> 0.20"
|
||||
jason = "~> 1.0"
|
||||
# poison = "~> 4.0"
|
||||
# db
|
||||
ecto_sql = "~> 3.8"
|
||||
flexto = "~> 0.2.2"
|
||||
postgrex = ">= 0.0.0"
|
||||
pointers_ulid = "~> 0.2.2"
|
||||
pointers = "~> 0.5.1"
|
||||
# misc
|
||||
recase = "~> 0.7" # string recasing
|
||||
faker = "~> 0.16" # fake data generation
|
||||
telemetry = "~> 1.0"
|
||||
telemetry_metrics = "~> 0.6"
|
||||
telemetry_poller = "~> 1.0"
|
||||
geo_postgis = "~> 3.1"
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
# bonfire_data_identity = "~> 0.1"
|
||||
# bonfire_data_social = "~> 0.1"
|
||||
ecto_psql_extras = "~> 0.6"
|
||||
# surface_catalogue = "~> 0.1.0" # Testing a UI component library
|
||||
phil_columns = "~> 3.1" # for inserting seed data in the DB
|
|
@ -1,73 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
database: System.get_env("POSTGRES_DB", "bonfire_dev"),
|
||||
# show_sensitive_data_on_connection_error: true,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
|
||||
|
||||
path_dep_dirs =
|
||||
Mess.deps([path: "deps.path"], [])
|
||||
|> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib"))
|
||||
|
||||
config :phoenix_live_reload,
|
||||
# watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
|
||||
dirs: path_dep_dirs ++ ["lib/"]
|
||||
|
||||
# to include cloned code in patterns
|
||||
path_dep_patterns = Enum.map(path_dep_dirs, &(String.slice(&1, 2..1000) <> ".*ex"))
|
||||
# Surface views
|
||||
path_dep_patterns =
|
||||
(path_dep_patterns ++ path_dep_dirs) |> Enum.map(&(String.slice(&1, 2..1000) <> ".*sface"))
|
||||
|
||||
# Watch static and templates for browser reloading.
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server: true,
|
||||
debug_errors: true,
|
||||
check_origin: false,
|
||||
code_reloader: true,
|
||||
watchers: [
|
||||
yarn: [
|
||||
"watch.js",
|
||||
cd: Path.expand("assets", File.cwd!())
|
||||
],
|
||||
yarn: [
|
||||
"watch.css",
|
||||
cd: Path.expand("assets", File.cwd!())
|
||||
]
|
||||
|
||||
# yarn: [
|
||||
# "watch.assets",
|
||||
# cd: Path.expand("assets", File.cwd!())
|
||||
# ]
|
||||
],
|
||||
live_reload: [
|
||||
patterns:
|
||||
[
|
||||
# ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||
# ~r"^priv/gettext/.*(po)$",
|
||||
# ~r"^web/(live|views)/.*ex$",
|
||||
# ~r"^lib/.*_live\.ex$",
|
||||
# ~r".*leex$",
|
||||
# defp elixirc_paths(:dev), do: ["lib"] ++ catalogues()
|
||||
|
||||
~r"lib/.*ex$",
|
||||
~r".*sface$",
|
||||
~r"priv/catalogue/.*(ex)$"
|
||||
] ++ path_dep_patterns
|
||||
]
|
||||
|
||||
config :logger,
|
||||
level: :debug,
|
||||
truncate: :infinity
|
||||
|
||||
config :logger, :console,
|
||||
# Do not include metadata or timestamps
|
||||
format: "[$level] $message\n"
|
||||
|
||||
config :phoenix, :stacktrace_depth, 30
|
||||
|
||||
config :phoenix, :plug_init_mode, :runtime
|
||||
|
||||
config :exsync,
|
||||
src_monitor: true,
|
||||
extra_extensions: [".leex", ".heex", ".js", ".css", ".sface"]
|
9
flavours/haha/config/flavour_haha.exs
Normal file
9
flavours/haha/config/flavour_haha.exs
Normal file
|
@ -0,0 +1,9 @@
|
|||
import Config
|
||||
|
||||
config :bonfire, :ui,
|
||||
theme: [
|
||||
instance_name: "HAHA Academy",
|
||||
instance_icon: "/images/bonfire-icon.png",
|
||||
instance_image: "https://haha.academy/images/wheel.png",
|
||||
instance_description: "Community roadmaps for learning every branch of human knowledge"
|
||||
]
|
|
@ -1,20 +0,0 @@
|
|||
import Config
|
||||
|
||||
# We include the path to a cache manifest
|
||||
# containing the digested version of static files. This
|
||||
# manifest is generated by the `mix phx.digest` task,
|
||||
# which you should run after static files are built and
|
||||
# before starting your production server.
|
||||
config :bonfire, Bonfire.Web.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
|
||||
config :logger,
|
||||
backends: [:console, Sentry.LoggerBackend]
|
||||
|
||||
# Do not print debug messages in production
|
||||
config :logger, level: :info
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint, server: true
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# in releases migrations are not in a flavour-specific directory
|
||||
priv: "priv/repo"
|
|
@ -1,110 +0,0 @@
|
|||
# In this file, we load production configuration and secrets
|
||||
# from environment variables. You can also hardcode secrets,
|
||||
# although such is generally not recommended and you have to
|
||||
# remember to add this file to your .gitignore.
|
||||
import Config
|
||||
|
||||
host = System.get_env("HOSTNAME", "localhost")
|
||||
server_port = String.to_integer(System.get_env("SERVER_PORT", "4000"))
|
||||
public_port = String.to_integer(System.get_env("PUBLIC_PORT", "4000"))
|
||||
|
||||
## load runtime configs directly via extension-provided modules
|
||||
Bonfire.Common.Config.LoadExtensionsConfig.load_configs()
|
||||
##
|
||||
|
||||
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") ||
|
||||
raise """
|
||||
Environment variables for database are missing.
|
||||
For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE
|
||||
You can also set POSTGRES_PASSWORD (required),
|
||||
and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost)
|
||||
"""
|
||||
|
||||
if System.get_env("DATABASE_URL") do
|
||||
config :bonfire, Bonfire.Common.Repo, url: System.get_env("DATABASE_URL")
|
||||
else
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# ssl: true,
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost")
|
||||
end
|
||||
|
||||
secret_key_base =
|
||||
System.get_env("SECRET_KEY_BASE") || System.get_env("CI") ||
|
||||
raise """
|
||||
environment variable SECRET_KEY_BASE is missing.
|
||||
You can generate one by calling: mix phx.gen.secret
|
||||
"""
|
||||
|
||||
signing_salt =
|
||||
System.get_env("SIGNING_SALT") || System.get_env("CI") ||
|
||||
raise """
|
||||
environment variable SIGNING_SALT is missing.
|
||||
"""
|
||||
|
||||
encryption_salt =
|
||||
System.get_env("ENCRYPTION_SALT") || System.get_env("CI") ||
|
||||
raise """
|
||||
environment variable ENCRYPTION_SALT is missing.
|
||||
"""
|
||||
|
||||
config :bonfire,
|
||||
host: host,
|
||||
app_name: System.get_env("APP_NAME", "Bonfire"),
|
||||
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
|
||||
github_token: System.get_env("GITHUB_TOKEN"),
|
||||
show_debug_errors_in_dev: System.get_env("SHOW_DEBUG_IN_DEV"),
|
||||
encryption_salt: encryption_salt,
|
||||
signing_salt: signing_salt
|
||||
|
||||
start_server? =
|
||||
if config_env() == :test,
|
||||
do: System.get_env("START_SERVER", "true"),
|
||||
else: System.get_env("START_SERVER", "true")
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server: String.to_existing_atom(start_server?),
|
||||
url: [
|
||||
host: host,
|
||||
port: public_port
|
||||
],
|
||||
http: [
|
||||
port: server_port
|
||||
],
|
||||
secret_key_base: secret_key_base,
|
||||
live_view: [signing_salt: signing_salt]
|
||||
|
||||
if System.get_env("SENTRY_DSN") do
|
||||
IO.puts("Note: errors will be reported to Sentry.")
|
||||
|
||||
config :sentry,
|
||||
dsn: System.get_env("SENTRY_DSN")
|
||||
|
||||
if System.get_env("SENTRY_NAME") do
|
||||
config :sentry, server_name: System.get_env("SENTRY_NAME")
|
||||
end
|
||||
end
|
||||
|
||||
# start prod-only config
|
||||
if config_env() == :prod do
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
# ssl: true,
|
||||
database: System.get_env("POSTGRES_DB", "bonfire"),
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
|
||||
# Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead #
|
||||
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false"))
|
||||
end
|
||||
|
||||
# prod only config
|
||||
|
||||
# start prod and dev only config
|
||||
if config_env() != :test do
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100"))
|
||||
end
|
||||
|
||||
## bonfire_livebook
|
||||
if Code.ensure_loaded?(Livebook) do
|
||||
Livebook.config_runtime()
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
# make sure you change everything to your own secrets!
|
||||
# and do not check this into git or any public host
|
||||
|
||||
# for sessions/cookies, you can generate strings for these by running: just secrets
|
||||
SECRET_KEY_BASE="you-should-put-a-secure-string-here"
|
||||
SIGNING_SALT="you-should-put-a-different-secure-string-here"
|
||||
ENCRYPTION_SALT="you-should-put-yet-another-secure-string-here"
|
||||
|
||||
# sentry client key
|
||||
SENTRY_DSN=put-your-sentry-dsn-here
|
||||
|
||||
# database access
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_DB=bonfire_db
|
||||
POSTGRES_PASSWORD=put_a_secure_db_pw_here
|
||||
|
||||
# signup to mailgun.com and edit with your domain and API key
|
||||
MAIL_DOMAIN=mailg.example.com
|
||||
MAIL_KEY=123
|
||||
MAIL_FROM=bonfire@example.com
|
||||
|
||||
# password for the search index
|
||||
MEILI_MASTER_KEY=key-to-protect-search-indexing-here
|
||||
|
||||
# password for the default admin user if you run the seeds
|
||||
SEEDS_USER=root
|
||||
SEEDS_PW=password
|
||||
|
||||
# backend stuff
|
||||
ERLANG_COOKIE=bonfire_cookie
|
||||
|
||||
# Bonfire extensions configs
|
||||
WEB_PUSH_SUBJECT=mailto:administrator@mydomain.net
|
||||
WEB_PUSH_PUBLIC_KEY=xyz
|
||||
WEB_PUSH_PRIVATE_KEY=abc
|
||||
GEOLOCATE_OPENCAGEDATA=
|
||||
GITHUB_TOKEN=xyz
|
|
@ -1,28 +0,0 @@
|
|||
FLAVOUR=haha
|
||||
# server domain name:
|
||||
HOSTNAME=localhost
|
||||
# server port:
|
||||
SERVER_PORT=4000
|
||||
# port your visitors will access (typically 80 or 443, will be different than SERVER_PORT only if using a reverse proxy)
|
||||
PUBLIC_PORT=4000
|
||||
# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets section
|
||||
MAIL_BACKEND=none
|
||||
# hostname and port of meili search index
|
||||
SEARCH_MEILI_INSTANCE=http://localhost:7700
|
||||
# require an email address to be invited before being able to sign up
|
||||
INVITE_ONLY=true
|
||||
# a name and tagline for your instance
|
||||
INSTANCE_DESCRIPTION="An instance of Bonfire, a federated app ecosystem for open and cooperative networks"
|
||||
# uncomment in order to NOT automatically change the database schema when you upgrade the app
|
||||
# DISABLE_DB_AUTOMIGRATION=true
|
||||
# max file upload size (default is 20 meg)
|
||||
UPLOAD_LIMIT=20000000
|
||||
# ====================================
|
||||
# You should not have to edit any of the following ones:
|
||||
POSTGRES_HOST=localhost
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US.UTF-8
|
||||
REPLACE_OS_VARS=true
|
||||
LIVEVIEW_ENABLED=true
|
||||
|
||||
ACME_AGREE=true
|
|
@ -1,49 +0,0 @@
|
|||
import Config
|
||||
|
||||
## Import or set test configs for extensions
|
||||
|
||||
import_config "activity_pub_test.exs"
|
||||
|
||||
config :bonfire, Bonfire.Mailer, adapter: Bamboo.TestAdapter
|
||||
|
||||
config :bonfire_search,
|
||||
disabled: true,
|
||||
disable_indexing: true
|
||||
|
||||
## Other general test config
|
||||
|
||||
config :logger, level: :warn
|
||||
# config :logger, level: :notice
|
||||
|
||||
# Configure your database
|
||||
db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 60,
|
||||
# show_sensitive_data_on_connection_error: true,
|
||||
database: db,
|
||||
slow_query_ms: 500
|
||||
|
||||
# We don't run a server during test. If one is required,
|
||||
# you can enable the server option below.
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
http: [port: 4000],
|
||||
server: false
|
||||
|
||||
config :pbkdf2_elixir, :rounds, 1
|
||||
|
||||
config :mix_test_interactive,
|
||||
clear: true
|
||||
|
||||
config :paginator, ecto_repos: [Bonfire.Common.Repo]
|
||||
|
||||
config :paginator, Paginator.Repo,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("POSTGRES_HOST", "localhost"),
|
||||
database: db
|
|
@ -1,44 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
config :activity_pub, :env, Mix.env()
|
||||
|
||||
config :nodeinfo, :adapter, Bonfire.Federate.ActivityPub.NodeinfoAdapter
|
||||
|
||||
config :activity_pub, :mrf_simple,
|
||||
media_removal: [],
|
||||
media_nsfw: [],
|
||||
report_removal: [],
|
||||
accept: [],
|
||||
avatar_removal: [],
|
||||
banner_removal: []
|
||||
|
||||
config :activity_pub, :instance,
|
||||
hostname: "localhost",
|
||||
federation_publisher_modules: [ActivityPubWeb.Publisher],
|
||||
federation_reachability_timeout_days: 7,
|
||||
federating: true,
|
||||
rewrite_policy: [Bonfire.Federate.ActivityPub.BoundariesMRF],
|
||||
handle_unknown_activities: true
|
||||
|
||||
config :activity_pub, :http,
|
||||
proxy_url: nil,
|
||||
send_user_agent: true,
|
||||
adapter: [
|
||||
ssl_options: [
|
||||
# Workaround for remote server certificate chain issues
|
||||
partial_chain: &:hackney_connect.partial_chain/1,
|
||||
# We don't support TLS v1.3 yet
|
||||
versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
|
||||
]
|
||||
]
|
||||
|
||||
config :activity_pub, ActivityPubWeb.Endpoint,
|
||||
render_errors: [view: ActivityPubWeb.ErrorView, accepts: ~w(json), layout: false]
|
||||
|
||||
config :activity_pub, :json_contexts, %{
|
||||
"Hashtag" => "as:Hashtag",
|
||||
"ValueFlows" => "https://w3id.org/valueflows#",
|
||||
"om2" => "http://www.ontology-of-units-of-measure.org/resource/om-2/"
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :activity_pub, :repo, Bonfire.Common.Repo
|
||||
config :activity_pub, :endpoint_module, Bonfire.Web.Endpoint
|
||||
|
||||
config :activity_pub, :adapter, Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
config :activity_pub, ecto_repos: [Bonfire.Common.Repo]
|
||||
|
||||
config :activity_pub, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
queues: false
|
||||
|
||||
config :activity_pub, :instance,
|
||||
# (if System.get_env("TEST_INSTANCE")=="yes", do: true, else: false)
|
||||
federating: false
|
||||
|
||||
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
|
||||
|
||||
config :tesla, adapter: Tesla.Mock
|
||||
|
||||
# Print only warnings and errors during test
|
||||
config :logger, level: :warn
|
||||
|
||||
config :activity_pub, ActivityPubWeb.Endpoint,
|
||||
http: [port: 4000],
|
||||
server: false
|
|
@ -1,9 +0,0 @@
|
|||
import Config
|
||||
|
||||
schema = Bonfire.API.GraphQL.Schema
|
||||
|
||||
config :bonfire_api_graphql,
|
||||
graphql_schema_module: schema
|
||||
|
||||
config :absinthe,
|
||||
schema: schema
|
|
@ -1,4 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_classify,
|
||||
templates_path: "lib"
|
|
@ -1,20 +0,0 @@
|
|||
import Config
|
||||
|
||||
default_locale = "en"
|
||||
|
||||
config :bonfire_common,
|
||||
otp_app: :bonfire
|
||||
|
||||
# internationalisation
|
||||
config :bonfire_common, Bonfire.Common.Localise.Cldr,
|
||||
default_locale: default_locale,
|
||||
# locales that will be made available on top of those for which gettext localisation files are available
|
||||
locales: ["fr", "en", "es"],
|
||||
providers: [Cldr.Language],
|
||||
gettext: Bonfire.Common.Localise.Gettext,
|
||||
data_dir: "./priv/cldr",
|
||||
add_fallback_locales: true,
|
||||
# precompile_number_formats: ["¤¤#,##0.##"],
|
||||
# precompile_transliterations: [{:latn, :arab}, {:thai, :latn}]
|
||||
# force_locale_download: false,
|
||||
generate_docs: true
|
|
@ -1,960 +0,0 @@
|
|||
import Config
|
||||
|
||||
#### Base configuration
|
||||
|
||||
verbs = [
|
||||
"Boost",
|
||||
"Create",
|
||||
"Delete",
|
||||
"Edit",
|
||||
"Flag",
|
||||
"Follow",
|
||||
"Like",
|
||||
"Mention",
|
||||
"Message",
|
||||
"Read",
|
||||
"Reply",
|
||||
"Request",
|
||||
"See",
|
||||
"Tag"
|
||||
]
|
||||
|
||||
# Choose password hashing backend
|
||||
# Note that this corresponds with our dependencies in mix.exs
|
||||
hasher = if config_env() in [:dev, :test], do: Pbkdf2, else: Argon2
|
||||
|
||||
config :bonfire_data_identity, Bonfire.Data.Identity.Credential, hasher_module: hasher
|
||||
|
||||
#### Sentinel Data Services
|
||||
|
||||
# Search these apps/extensions for Pointable ecto schema definitions to index
|
||||
pointable_schema_extensions = [
|
||||
:bonfire,
|
||||
:bonfire_data_access_control,
|
||||
:bonfire_data_activity_pub,
|
||||
:bonfire_data_identity,
|
||||
:bonfire_data_social,
|
||||
:bonfire_data_edges,
|
||||
:bonfire_tag,
|
||||
:bonfire_classify,
|
||||
:bonfire_data_shared_users,
|
||||
:bonfire_files,
|
||||
:bonfire_quantify,
|
||||
:bonfire_geolocate,
|
||||
:bonfire_valueflows,
|
||||
:bonfire_valueflows_observe
|
||||
]
|
||||
|
||||
config :pointers, :search_path, pointable_schema_extensions
|
||||
|
||||
# Search these apps/extensions for context or queries modules to index (i.e. they contain modules with a query_module/0 or context_modules/0 function)
|
||||
context_and_queries_extensions =
|
||||
pointable_schema_extensions ++
|
||||
[
|
||||
:bonfire_common,
|
||||
:bonfire_me,
|
||||
:bonfire_social
|
||||
]
|
||||
|
||||
extensions_with_config =
|
||||
context_and_queries_extensions ++
|
||||
[
|
||||
:bonfire_boundaries,
|
||||
:bonfire_federate_activitypub,
|
||||
:bonfire_search,
|
||||
:bonfire_mailer,
|
||||
:bonfire_geolocate
|
||||
]
|
||||
|
||||
config :bonfire, :verb_names, verbs
|
||||
config :bonfire, :context_modules_search_path, context_and_queries_extensions
|
||||
config :bonfire, :query_modules_search_path, context_and_queries_extensions
|
||||
config :bonfire, :config_modules_search_path, extensions_with_config
|
||||
|
||||
# Search these apps/extensions for Verbs to index (i.e. they contain modules with a declare_verbs/0 function)
|
||||
config :bonfire_data_access_control,
|
||||
search_path: [
|
||||
# :bonfire_me,
|
||||
:bonfire_boundaries
|
||||
|
||||
# :bonfire_social,
|
||||
# :bonfire,
|
||||
]
|
||||
|
||||
#### Alias modules for readability
|
||||
alias Pointers.Pointer
|
||||
alias Pointers.Table
|
||||
|
||||
alias Bonfire.Data.AccessControl.Acl
|
||||
alias Bonfire.Data.AccessControl.Circle
|
||||
alias Bonfire.Data.AccessControl.Encircle
|
||||
alias Bonfire.Data.AccessControl.Controlled
|
||||
alias Bonfire.Data.AccessControl.InstanceAdmin
|
||||
alias Bonfire.Data.AccessControl.Grant
|
||||
alias Bonfire.Data.AccessControl.Verb
|
||||
|
||||
alias Bonfire.Data.ActivityPub.Actor
|
||||
alias Bonfire.Data.ActivityPub.Peer
|
||||
alias Bonfire.Data.ActivityPub.Peered
|
||||
|
||||
alias Bonfire.Boundaries.Permitted
|
||||
alias Bonfire.Boundaries.Stereotyped
|
||||
|
||||
alias Bonfire.Data.Edges.Edge
|
||||
alias Bonfire.Data.Edges.EdgeTotal
|
||||
|
||||
alias Bonfire.Data.Identity.Account
|
||||
alias Bonfire.Data.Identity.Accounted
|
||||
alias Bonfire.Data.Identity.AuthSecondFactor
|
||||
alias Bonfire.Data.Identity.Caretaker
|
||||
alias Bonfire.Data.Identity.CareClosure
|
||||
alias Bonfire.Data.Identity.Character
|
||||
alias Bonfire.Data.Identity.Credential
|
||||
alias Bonfire.Data.Identity.Email
|
||||
alias Bonfire.Data.Identity.ExtraInfo
|
||||
alias Bonfire.Data.Identity.Named
|
||||
alias Bonfire.Data.Identity.Self
|
||||
alias Bonfire.Data.Identity.Settings
|
||||
alias Bonfire.Data.Identity.User
|
||||
|
||||
alias Bonfire.Data.Social.Activity
|
||||
alias Bonfire.Data.Social.APActivity
|
||||
alias Bonfire.Data.Social.Article
|
||||
alias Bonfire.Data.Social.Block
|
||||
alias Bonfire.Data.Social.Bookmark
|
||||
alias Bonfire.Data.Social.Boost
|
||||
alias Bonfire.Data.Social.Created
|
||||
alias Bonfire.Data.Social.Feed
|
||||
alias Bonfire.Data.Social.FeedPublish
|
||||
alias Bonfire.Data.Social.Flag
|
||||
alias Bonfire.Data.Social.Follow
|
||||
alias Bonfire.Data.Social.Like
|
||||
alias Bonfire.Data.Social.Mention
|
||||
alias Bonfire.Data.Social.Message
|
||||
alias Bonfire.Data.Social.Post
|
||||
alias Bonfire.Data.Social.PostContent
|
||||
alias Bonfire.Data.Social.Profile
|
||||
alias Bonfire.Data.Social.Replied
|
||||
alias Bonfire.Data.Social.Request
|
||||
|
||||
alias Bonfire.Classify.Category
|
||||
alias Bonfire.Geolocate.Geolocation
|
||||
alias Bonfire.Files
|
||||
alias Bonfire.Files.Media
|
||||
alias Bonfire.Tag
|
||||
alias Bonfire.Tag.Tagged
|
||||
|
||||
#### Flexto Stitching
|
||||
|
||||
## WARNING: This is the flaky magic bit. We use configuration to
|
||||
## compile extra stuff into modules. If you add new fields or
|
||||
## relations to ecto models in a dependency, you must recompile that
|
||||
## dependency for it to show up! You will probably find you need to
|
||||
## `rm -Rf _build/*/lib/bonfire_data_*` a lot.
|
||||
|
||||
mixin = [foreign_key: :id, references: :id]
|
||||
|
||||
common_assocs = %{
|
||||
### Mixins
|
||||
|
||||
# A summary of an object that can appear in a feed.
|
||||
activity: quote(do: has_one(:activity, unquote(Activity), unquote(mixin))),
|
||||
# ActivityPub actor information
|
||||
actor: quote(do: has_one(:actor, unquote(Actor), unquote(mixin))),
|
||||
# Indicates the entity responsible for an activity. Sort of like creator, but transferrable. Used
|
||||
# during deletion - when the caretaker is deleted, all their stuff will be too.
|
||||
caretaker: quote(do: has_one(:caretaker, unquote(Caretaker), unquote(mixin))),
|
||||
# A Character has a unique username and some feeds.
|
||||
character: quote(do: has_one(:character, unquote(Character), unquote(mixin))),
|
||||
# Indicates the creator of an object
|
||||
created: quote(do: has_one(:created, unquote(Created), unquote(mixin))),
|
||||
# Used for non-textual interactions such as likes and follows to indicate the other object.
|
||||
edge: quote(do: has_one(:edge, unquote(Edge), unquote(mixin))),
|
||||
# Adds a name that can appear in the user interface for an object. e.g. for an ACL.
|
||||
named: quote(do: has_one(:named, unquote(Named), unquote(mixin))),
|
||||
# Adds extra info that can appear in the user interface for an object. e.g. a summary or JSON-encoded data.
|
||||
extra_info: quote(do: has_one(:extra_info, unquote(ExtraInfo), unquote(mixin))),
|
||||
# Information about the remote instance the object is from, if it is not local.
|
||||
peered: quote(do: has_one(:peered, unquote(Peered), unquote(mixin))),
|
||||
# Information about the content of posts, e.g. a scrubbed html body
|
||||
post_content: quote(do: has_one(:post_content, unquote(PostContent), unquote(mixin))),
|
||||
# Information about a user or other object that they wish to make available
|
||||
profile: quote(do: has_one(:profile, unquote(Profile), unquote(mixin))),
|
||||
# Threading information, for threaded discussions.
|
||||
replied: quote(do: has_one(:replied, unquote(Replied), unquote(mixin))),
|
||||
# Information that allows the system to identify special system-managed ACLS.
|
||||
stereotyped: quote(do: has_one(:stereotyped, unquote(Stereotyped), unquote(mixin))),
|
||||
|
||||
### Multimixins
|
||||
|
||||
# Links to access control information for this object.
|
||||
controlled: quote(do: has_many(:controlled, unquote(Controlled), unquote(mixin))),
|
||||
# Inserts the object into selected feeds.
|
||||
feed_publishes: quote(do: has_many(:feed_publishes, unquote(FeedPublish), unquote(mixin))),
|
||||
|
||||
# Information that this object has some files
|
||||
files: quote(do: has_many(:files, unquote(Files), unquote(mixin))),
|
||||
# The actual files
|
||||
media:
|
||||
quote(
|
||||
do:
|
||||
many_to_many(:media, unquote(Media),
|
||||
join_through: unquote(Files),
|
||||
unique: true,
|
||||
join_keys: [id: :id, media_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
),
|
||||
|
||||
# Information that this object tagged other objects.
|
||||
tagged: quote(do: has_many(:tagged, unquote(Tagged), unquote(mixin))),
|
||||
# The actual tags
|
||||
tags:
|
||||
quote(
|
||||
do:
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
unique: true,
|
||||
join_keys: [id: :id, tag_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
),
|
||||
|
||||
### Regular has_many associations
|
||||
|
||||
# The objects which reply to this object.
|
||||
direct_replies:
|
||||
quote(do: has_many(:direct_replies, unquote(Replied), foreign_key: :reply_to_id)),
|
||||
# A recursive view of caretakers of caretakers of... used during deletion.
|
||||
care_closure: quote(do: has_many(:care_closure, unquote(CareClosure), foreign_key: :branch_id)),
|
||||
# Retrieves activities where we are the object. e.g. if we are a
|
||||
# post or a user, this could turn up activities from likes or follows.
|
||||
activities:
|
||||
quote(do: has_many(:activities, unquote(Activity), foreign_key: :object_id, references: :id)),
|
||||
|
||||
### Stuff I'm not sure how to categorise yet
|
||||
|
||||
# Used currently only for requesting to follow a user, but more general
|
||||
request: quote(do: has_one(:request, unquote(Request), unquote(mixin)))
|
||||
}
|
||||
|
||||
# retrieves a list of quoted forms suitable for use with unquote_splicing
|
||||
common = fn names ->
|
||||
for name <- List.wrap(names) do
|
||||
with nil <- common_assocs[name],
|
||||
do:
|
||||
raise(RuntimeError, message: "Expected a common association name, got #{inspect(name)}")
|
||||
end
|
||||
end
|
||||
|
||||
edge = common.([:controlled, :activities, :request, :created])
|
||||
|
||||
edges =
|
||||
common.([:controlled, :activities, :request, :created, :caretaker, :activity, :feed_publishes])
|
||||
|
||||
# first up, pointers could have all the mixins we're using. TODO
|
||||
|
||||
pointer_mixins =
|
||||
common.([
|
||||
:activity,
|
||||
:actor,
|
||||
:caretaker,
|
||||
:character,
|
||||
:created,
|
||||
:edge,
|
||||
:named,
|
||||
:extra_info,
|
||||
:peered,
|
||||
:post_content,
|
||||
:profile,
|
||||
:replied,
|
||||
:stereotyped
|
||||
])
|
||||
|
||||
config :pointers, Pointer,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
field(:dummy, :any, virtual: true)
|
||||
# pointables
|
||||
has_one(:circle, unquote(Circle), foreign_key: :id)
|
||||
|
||||
many_to_many(:encircle_subjects, Pointer,
|
||||
join_through: Encircle,
|
||||
join_keys: [circle_id: :id, subject_id: :id]
|
||||
)
|
||||
|
||||
has_one(:permitted, unquote(Permitted), foreign_key: :object_id)
|
||||
has_one(:user, unquote(User), foreign_key: :id)
|
||||
has_one(:post, unquote(Post), foreign_key: :id)
|
||||
has_one(:message, unquote(Message), foreign_key: :id)
|
||||
has_one(:category, unquote(Category), foreign_key: :id)
|
||||
has_one(:geolocation, unquote(Geolocation), foreign_key: :id)
|
||||
# mixins
|
||||
unquote_splicing(pointer_mixins)
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media]))
|
||||
# has_many
|
||||
unquote_splicing(common.([:activities, :care_closure, :direct_replies, :feed_publishes]))
|
||||
|
||||
## special things
|
||||
# these should go away in future and they should be populated by a single query.
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :pointers, Table, []
|
||||
|
||||
# now let's weave everything else together for convenience
|
||||
# bonfire_data_access_control
|
||||
|
||||
config :bonfire_data_access_control, Acl,
|
||||
code:
|
||||
(quote do
|
||||
field(:grants_count, :integer, virtual: true)
|
||||
field(:controlled_count, :integer, virtual: true)
|
||||
# mixins
|
||||
unquote_splicing(common.([:caretaker, :named, :extra_info, :stereotyped]))
|
||||
|
||||
# multimixins
|
||||
# unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Circle,
|
||||
code:
|
||||
(quote do
|
||||
field(:encircles_count, :integer, virtual: true)
|
||||
# mixins
|
||||
unquote_splicing(common.([:caretaker, :named, :extra_info, :stereotyped]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Controlled, []
|
||||
|
||||
config :bonfire_data_access_control, Encircle,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:peer, unquote(Peer), foreign_key: :id, references: :subject_id)
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Grant,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
(unquote_splicing(common.([:caretaker])))
|
||||
|
||||
# multimixins
|
||||
# unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_access_control, Verb, []
|
||||
|
||||
config :bonfire_boundaries, Stereotyped,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:named, unquote(Named), foreign_key: :id, references: :stereotype_id)
|
||||
end)
|
||||
|
||||
# bonfire_data_activity_pub
|
||||
|
||||
config :bonfire_data_activity_pub, Actor,
|
||||
code:
|
||||
(quote do
|
||||
# hacks
|
||||
belongs_to(:character, unquote(Character), foreign_key: :id, define_field: false)
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
# mixins
|
||||
unquote_splicing(common.([:peered]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_activity_pub, Peer, []
|
||||
config :bonfire_data_activity_pub, Peered, []
|
||||
|
||||
# bonfire_data_identity
|
||||
|
||||
config :bonfire_data_identity, Account,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:credential, unquote(Credential), foreign_key: :id)
|
||||
has_one(:email, unquote(Email), foreign_key: :id)
|
||||
has_one(:auth_second_factor, unquote(AuthSecondFactor), foreign_key: :id)
|
||||
has_one(:settings, unquote(Settings), foreign_key: :id)
|
||||
|
||||
many_to_many(:users, unquote(User),
|
||||
join_through: Accounted,
|
||||
join_keys: [account_id: :id, id: :id]
|
||||
)
|
||||
|
||||
# optional
|
||||
many_to_many(:shared_users, unquote(User),
|
||||
join_through: "bonfire_data_shared_user_accounts",
|
||||
join_keys: [account_id: :id, shared_user_id: :id]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Accounted,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Caretaker,
|
||||
code:
|
||||
(quote do
|
||||
has_one(:user, unquote(User), foreign_key: :id, references: :caretaker_id)
|
||||
# mixins
|
||||
unquote_splicing(common.([:character, :profile]))
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Character,
|
||||
code:
|
||||
(quote do
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
# mixins
|
||||
unquote_splicing(common.([:actor, :peered, :profile]))
|
||||
has_one(:user, unquote(User), unquote(mixin))
|
||||
has_one(:feed, unquote(Feed), unquote(mixin))
|
||||
has_many(:followers, unquote(Follow), foreign_key: :following_id, references: :id)
|
||||
has_many(:followed, unquote(Follow), foreign_key: :follower_id, references: :id)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Credential,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:account, unquote(Account), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Email,
|
||||
must_confirm: true,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:account, unquote(Account), foreign_key: :id, define_field: false)
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Self, []
|
||||
|
||||
config :bonfire_data_identity, User,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
# mixins
|
||||
has_one(:accounted, unquote(Accounted), foreign_key: :id)
|
||||
has_one(:instance_admin, unquote(InstanceAdmin), foreign_key: :id, on_replace: :update)
|
||||
has_one(:self, unquote(Self), foreign_key: :id)
|
||||
has_one(:shared_user, unquote(Bonfire.Data.SharedUser), foreign_key: :id)
|
||||
has_one(:settings, unquote(Settings), foreign_key: :id)
|
||||
unquote_splicing(common.([:actor, :character, :created, :peered, :profile]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
# manies
|
||||
has_many(:encircles, unquote(Encircle), foreign_key: :subject_id)
|
||||
# todo: stop through
|
||||
has_many(:creations, through: [:created, :pointer])
|
||||
# todo: stop through
|
||||
has_many(:posts, through: [:created, :post])
|
||||
|
||||
has_many(:followers, unquote(Edge),
|
||||
foreign_key: :object_id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:followed, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
references: :id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:user_activities, unquote(Activity), foreign_key: :subject_id, references: :id)
|
||||
|
||||
has_many(:boost_activities, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_many(:like_activities, unquote(Edge),
|
||||
foreign_key: :subject_id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
many_to_many(:caretaker_accounts, unquote(Account),
|
||||
join_through: "bonfire_data_shared_user_accounts",
|
||||
join_keys: [shared_user_id: :id, account_id: :id]
|
||||
)
|
||||
|
||||
# has_many :account, through: [:accounted, :account] # this is private info, do not expose
|
||||
# has_one :geolocation, Bonfire.Geolocate.Geolocation # enable if using Geolocate extension
|
||||
end)
|
||||
|
||||
config :bonfire_data_identity, Named, []
|
||||
config :bonfire_data_identity, ExtraInfo, []
|
||||
|
||||
### bonfire_data_social
|
||||
|
||||
config :bonfire_data_social, Activity,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
@follow_ulid "70110WTHE1EADER1EADER1EADE"
|
||||
has_many(:feed_publishes, unquote(FeedPublish), unquote(mixin))
|
||||
has_one(:seen, unquote(Edge), foreign_key: :object_id, references: :id)
|
||||
# ugly workaround needed for certain queries (TODO: check if still needed)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :id, references: :id)
|
||||
# mixins linked to the object rather than the activity:
|
||||
has_one(:created, unquote(Created), foreign_key: :id, references: :object_id)
|
||||
has_one(:replied, unquote(Replied), foreign_key: :id, references: :object_id)
|
||||
field(:path, EctoMaterializedPath.ULIDs, virtual: true)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
|
||||
has_one(:follow_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :object_id,
|
||||
where: [table_id: @follow_ulid]
|
||||
)
|
||||
|
||||
has_many(:controlled, unquote(Controlled), foreign_key: :id, references: :object_id)
|
||||
has_many(:tagged, unquote(Tagged), foreign_key: :id, references: :object_id)
|
||||
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
unique: true,
|
||||
join_keys: [id: :object_id, tag_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
|
||||
has_many(:files, unquote(Files), foreign_key: :id, references: :object_id)
|
||||
|
||||
many_to_many(:media, unquote(Media),
|
||||
join_through: unquote(Files),
|
||||
unique: true,
|
||||
join_keys: [id: :object_id, media_id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, APActivity,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(common.([:activity, :caretaker, :controlled])))
|
||||
end)
|
||||
|
||||
config :bonfire_data_edges, Edge,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edge))
|
||||
|
||||
# TODO: requires composite foreign keys:
|
||||
# has_one :activity, unquote(Activity),
|
||||
# foreign_key: [:table_id, :object_id], references: [:table_id, :object_id]
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Feed,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
(unquote_splicing(common.([:activity, :caretaker])))
|
||||
|
||||
# belongs_to :character, unquote(Character), foreign_key: :id, define_field: false
|
||||
# belongs_to :user, unquote(User), foreign_key: :id, define_field: false
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, FeedPublish,
|
||||
code:
|
||||
(quote do
|
||||
field(:dummy, :any, virtual: true)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :object_id, references: :id)
|
||||
|
||||
# belongs_to :character, unquote(Character), foreign_key: :id, define_field: false
|
||||
# belongs_to :user, unquote(User), foreign_key: :id, define_field: false
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Follow,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
# belongs_to: [follower_character: {Character, foreign_key: :follower_id, define_field: false}],
|
||||
# belongs_to: [follower_profile: {Profile, foreign_key: :follower_id, define_field: false}],
|
||||
# belongs_to: [followed_character: {Character, foreign_key: :followed_id, define_field: false}],
|
||||
# belongs_to: [followed_profile: {Profile, foreign_key: :followed_id, define_field: false}]
|
||||
|
||||
config :bonfire_data_social, Block,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Boost,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
# has_one: [activity: {Activity, foreign_key: :object_id, references: :boosted_id}] # requires an ON clause
|
||||
|
||||
config :bonfire_data_social, Like,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
# has_one: [activity: {Activity, foreign_key: :object_id, references: :liked_id}] # requires an ON clause
|
||||
|
||||
config :bonfire_data_social, Flag,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Request,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Bookmark,
|
||||
code:
|
||||
(quote do
|
||||
(unquote_splicing(edges))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Message,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([:activity, :caretaker, :created, :peered, :post_content, :replied])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :feed_publishes, :tagged, :tags, :files, :media]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
# special
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Mention, []
|
||||
|
||||
config :bonfire_data_social, Post,
|
||||
code:
|
||||
(quote do
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([:activities, :activity, :caretaker, :created, :peered, :post_content, :replied])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :files, :media, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
# special
|
||||
has_one(:permitted, unquote(Permitted), foreign_key: :object_id)
|
||||
# has_one: [creator_user: {[through: [:created, :creator_user]]}],
|
||||
# has_one: [creator_character: {[through: [:created, :creator_character]]}],
|
||||
# has_one: [creator_profile: {[through: [:created, :creator_profile]]}],
|
||||
# has_one :activity, unquote(Activity), foreign_key: :object_id, references: :id # requires an ON clause
|
||||
# has_one: [reply_to: {[through: [:replied, :reply_to]]}],
|
||||
# has_one: [reply_to_post: {[through: [:replied, :reply_to_post]]}],
|
||||
# has_one: [reply_to_post_content: {[through: [:replied, :reply_to_post_content]]}],
|
||||
# has_one: [reply_to_creator_character: {[through: [:replied, :reply_to_creator_character]]}],
|
||||
# has_one: [reply_to_creator_profile: {[through: [:replied, :reply_to_creator_profile]]}],
|
||||
# has_one: [thread_post: {[through: [:replied, :thread_post]]}],
|
||||
# has_one: [thread_post_content: {[through: [:replied, :thread_post_content]]}],
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
references: :id,
|
||||
foreign_key: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, PostContent,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:created]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled]))
|
||||
# virtuals for changesets
|
||||
field(:hashtags, {:array, :any}, virtual: true)
|
||||
field(:mentions, {:array, :any}, virtual: true)
|
||||
field(:urls, {:array, :any}, virtual: true)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Replied,
|
||||
code:
|
||||
(quote do
|
||||
# multimixins - shouldn't be here really
|
||||
unquote_splicing(common.([:controlled]))
|
||||
|
||||
@like_ulid "11KES11KET0BE11KEDY0VKN0WS"
|
||||
@boost_ulid "300STANN0VNCERESHARESH0VTS"
|
||||
belongs_to(:post, unquote(Post), foreign_key: :id, define_field: false)
|
||||
belongs_to(:post_content, unquote(PostContent), foreign_key: :id, define_field: false)
|
||||
has_one(:activity, unquote(Activity), foreign_key: :object_id, references: :id)
|
||||
# used in changesets
|
||||
field(:replying_to, :map, virtual: true)
|
||||
has_one(:reply_to_post, unquote(Post), foreign_key: :id, references: :reply_to_id)
|
||||
|
||||
has_one(:reply_to_post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
references: :reply_to_id
|
||||
)
|
||||
|
||||
has_one(:reply_to_created, unquote(Created), foreign_key: :id, references: :reply_to_id)
|
||||
# has_one :reply_to_creator_user, through: [:reply_to_created, :creator_user]
|
||||
# has_one :reply_to_creator_character, through: [:reply_to_created, :creator_character]
|
||||
# has_one :reply_to_creator_profile, through: [:reply_to_created, :creator_profile]
|
||||
has_many(:direct_replies, unquote(Replied), foreign_key: :reply_to_id, references: :id)
|
||||
has_many(:thread_replies, unquote(Replied), foreign_key: :thread_id, references: :id)
|
||||
has_one(:thread_post, unquote(Post), foreign_key: :id, references: :thread_id)
|
||||
|
||||
has_one(:thread_post_content, unquote(PostContent),
|
||||
foreign_key: :id,
|
||||
references: :thread_id
|
||||
)
|
||||
|
||||
has_one(:like_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @like_ulid]
|
||||
)
|
||||
|
||||
has_one(:boost_count, unquote(EdgeTotal),
|
||||
foreign_key: :id,
|
||||
references: :id,
|
||||
where: [table_id: @boost_ulid]
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Created,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:creator_user, unquote(User), foreign_key: :creator_id, define_field: false)
|
||||
|
||||
belongs_to(:creator_character, unquote(Character),
|
||||
foreign_key: :creator_id,
|
||||
define_field: false
|
||||
)
|
||||
|
||||
belongs_to(:creator_profile, unquote(Profile),
|
||||
foreign_key: :creator_id,
|
||||
define_field: false
|
||||
)
|
||||
|
||||
# mixins - shouldn't be here really
|
||||
unquote_splicing(common.([:peered]))
|
||||
# huh?
|
||||
has_one(:post, unquote(Post), unquote(mixin))
|
||||
end)
|
||||
|
||||
config :bonfire_data_social, Profile,
|
||||
code:
|
||||
(quote do
|
||||
belongs_to(:user, unquote(User), foreign_key: :id, define_field: false)
|
||||
# multimixins - shouldn't be here really
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
######### other extensions
|
||||
|
||||
config :bonfire_files, Media,
|
||||
code:
|
||||
(quote do
|
||||
field(:url, :string, virtual: true)
|
||||
# multimixins - shouldn't be here really
|
||||
unquote_splicing(common.([:controlled]))
|
||||
end)
|
||||
|
||||
config :bonfire_classify, Category,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
# TODO :caretaker
|
||||
unquote_splicing(common.([:activity, :created, :actor, :peered, :profile, :character]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :feed_publishes]))
|
||||
|
||||
# add references of tagged objects to any Category
|
||||
many_to_many(:tags, unquote(Pointer),
|
||||
join_through: unquote(Tagged),
|
||||
unique: true,
|
||||
join_keys: [tag_id: :id, id: :id],
|
||||
on_replace: :delete
|
||||
)
|
||||
end)
|
||||
|
||||
config :bonfire_geolocate, Bonfire.Geolocate.Geolocation,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(
|
||||
common.([:activity, :caretaker, :created, :actor, :peered, :profile, :character])
|
||||
)
|
||||
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.EconomicEvent,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
# TODO :caretaker
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.EconomicResource,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Knowledge.ResourceSpecification,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Process,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Knowledge.ProcessSpecification,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Planning.Intent,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Planning.Commitment,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows, ValueFlows.Proposal,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
||||
|
||||
config :bonfire_valueflows_observe, ValueFlows.Observe.Observation,
|
||||
code:
|
||||
(quote do
|
||||
# mixins
|
||||
unquote_splicing(common.([:activity, :caretaker, :peered, :replied]))
|
||||
# multimixins
|
||||
unquote_splicing(common.([:controlled, :tagged, :tags, :feed_publishes]))
|
||||
# has
|
||||
unquote_splicing(common.([:direct_replies]))
|
||||
end)
|
|
@ -1,25 +0,0 @@
|
|||
import Config
|
||||
|
||||
alias Bonfire.Federate.ActivityPub.Adapter
|
||||
|
||||
actor_types = ["Person", "Group", "Application", "Service", "Organization"]
|
||||
|
||||
config :bonfire,
|
||||
federation_search_path: [
|
||||
:bonfire_common,
|
||||
:bonfire_me,
|
||||
:bonfire_social,
|
||||
:bonfire_valueflows,
|
||||
:bonfire_classify,
|
||||
:bonfire_geolocate,
|
||||
:bonfire_quantify
|
||||
],
|
||||
# enable/disable logging of federation logic
|
||||
log_federation: true,
|
||||
federation_fallback_module: Bonfire.Social.APActivities
|
||||
|
||||
config :bonfire, actor_AP_types: actor_types
|
||||
|
||||
# config :bonfire, Bonfire.Instance,
|
||||
# hostname: hostname,
|
||||
# description: desc
|
|
@ -1,56 +0,0 @@
|
|||
import Config
|
||||
|
||||
# where do you want to store files? supports local storage, s3-compatible services, and more
|
||||
# see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider
|
||||
config :waffle,
|
||||
storage: Waffle.Storage.Local,
|
||||
# or {:system, "ASSET_HOST"}
|
||||
asset_host: "/"
|
||||
|
||||
image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"]
|
||||
|
||||
all_allowed_media_types =
|
||||
image_media_types ++
|
||||
[
|
||||
"text/plain",
|
||||
# doc
|
||||
"text/csv",
|
||||
"application/pdf",
|
||||
"application/rtf",
|
||||
"application/msword",
|
||||
"application/vnd.ms-excel",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"application/vnd.oasis.opendocument.presentation",
|
||||
"application/vnd.oasis.opendocument.spreadsheet",
|
||||
"application/vnd.oasis.opendocument.text",
|
||||
"application/epub+zip",
|
||||
# archives
|
||||
"application/x-tar",
|
||||
"application/x-bzip",
|
||||
"application/x-bzip2",
|
||||
"application/gzip",
|
||||
"application/zip",
|
||||
"application/rar",
|
||||
"application/x-7z-compressed",
|
||||
# audio
|
||||
"audio/mpeg",
|
||||
"audio/ogg",
|
||||
"audio/wav",
|
||||
"audio/webm",
|
||||
"audio/opus",
|
||||
# video
|
||||
"video/mp4",
|
||||
"video/mpeg",
|
||||
"video/ogg",
|
||||
"video/webm"
|
||||
]
|
||||
|
||||
config :bonfire_files, image_media_types: image_media_types
|
||||
config :bonfire_files, all_allowed_media_types: all_allowed_media_types
|
||||
|
||||
config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types
|
||||
config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types
|
||||
|
||||
config :bonfire_files, Bonfire.Files.DocumentUploader,
|
||||
allowed_media_types: all_allowed_media_types
|
|
@ -1,6 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_geolocate,
|
||||
templates_path: "lib"
|
||||
|
||||
config :bonfire, :js_config, mapbox_api_key: System.get_env("MAPBOX_API_KEY")
|
|
@ -1,8 +0,0 @@
|
|||
import Config
|
||||
|
||||
# config :bonfire, :hooks,
|
||||
# %{
|
||||
# {Bonfire.Social.Posts, :publish} => %{
|
||||
# after: {IO, :inspect}
|
||||
# }
|
||||
# }
|
|
@ -1,10 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_mailer,
|
||||
check_mx: true,
|
||||
check_format: true
|
||||
|
||||
config :bonfire, Bonfire.Mailer,
|
||||
# what service you want to use to send emails, from these: https://github.com/thoughtbot/bamboo#available-adapters
|
||||
# we recommend leaving LocalAdapter (which is just a fallback which won't actually send emails) and setting the actual adapter in runtime.exs
|
||||
adapter: Bamboo.LocalAdapter
|
|
@ -1,7 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_quantify,
|
||||
templates_path: "lib"
|
||||
|
||||
config :bonfire_quantify, Bonfire.Quantify.Units,
|
||||
valid_contexts: [Bonfire.Quantify.Units, Bonfire.Data.Identity.User]
|
|
@ -1,14 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_search,
|
||||
disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"),
|
||||
adapter: Bonfire.Search.Meili,
|
||||
# protocol, hostname and port
|
||||
instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"),
|
||||
# secret key
|
||||
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me")
|
||||
|
||||
# for use by API client
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
config :phoenix, :format_encoders, json: Jason
|
||||
config :phoenix, :json_library, Jason
|
|
@ -1,4 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_tag,
|
||||
templates_path: "lib"
|
|
@ -1,5 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :bonfire_valueflows,
|
||||
valid_agent_schemas: [Bonfire.Data.Identity.User],
|
||||
preset_boundary: "public"
|
|
@ -1,89 +0,0 @@
|
|||
import Config
|
||||
|
||||
default_flavour = "classic"
|
||||
flavour = System.get_env("FLAVOUR", default_flavour)
|
||||
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
|
||||
|
||||
#### Basic configuration
|
||||
|
||||
# You probably won't want to touch these. You might override some in
|
||||
# other config files.
|
||||
|
||||
config :bonfire,
|
||||
otp_app: :bonfire,
|
||||
env: config_env(),
|
||||
flavour: flavour,
|
||||
flavour_path: flavour_path,
|
||||
app_name: System.get_env("APP_NAME", "Bonfire"),
|
||||
repo_module: Bonfire.Common.Repo,
|
||||
web_module: Bonfire.UI.Common.Web,
|
||||
endpoint_module: Bonfire.Web.Endpoint,
|
||||
mailer_module: Bonfire.Mailer,
|
||||
default_web_namespace: Bonfire.UI.Common,
|
||||
default_layout_module: Bonfire.UI.Common.LayoutView,
|
||||
graphql_schema_module: Bonfire.API.GraphQL.Schema,
|
||||
user_schema: Bonfire.Data.Identity.User,
|
||||
org_schema: Bonfire.Data.Identity.User,
|
||||
home_page: Bonfire.Web.HomeLive,
|
||||
localisation_path: "priv/localisation",
|
||||
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
|
||||
signing_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
|
||||
encryption_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs"
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
http: [
|
||||
# this gets overridden in runtime.exs
|
||||
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
|
||||
transport_options: [socket_opts: [:inet6]]
|
||||
],
|
||||
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false],
|
||||
pubsub_server: Bonfire.PubSub
|
||||
|
||||
config :phoenix, :json_library, Jason
|
||||
config :phoenix_gon, :json_library, Jason
|
||||
|
||||
config :ecto_sparkles, :otp_app, :bonfire
|
||||
config :bonfire, :ecto_repos, [Bonfire.Common.Repo]
|
||||
|
||||
config :bonfire, Bonfire.Common.Repo,
|
||||
types: Bonfire.Geolocate.PostgresTypes,
|
||||
priv: flavour_path <> "/repo"
|
||||
|
||||
# ecto query filtering
|
||||
# config :query_elf, :id_types, [:id, :binary_id, Pointers.ULID]
|
||||
|
||||
config :logger, :console,
|
||||
format: "$time $metadata[$level] $message\n",
|
||||
metadata: [:request_id]
|
||||
|
||||
config :bonfire, Oban,
|
||||
repo: Bonfire.Common.Repo,
|
||||
plugins: [Oban.Plugins.Pruner],
|
||||
queues: [
|
||||
federator_incoming: 50,
|
||||
federator_outgoing: 50
|
||||
]
|
||||
|
||||
config :mime, :types, %{
|
||||
"application/json" => ["json"],
|
||||
"application/activity+json" => ["activity+json"],
|
||||
"application/ld+json" => ["ld+json"],
|
||||
"application/jrd+json" => ["jrd+json"]
|
||||
}
|
||||
|
||||
config :sentry,
|
||||
dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
|
||||
environment_name: Mix.env(),
|
||||
included_environments: [:prod]
|
||||
|
||||
# include config for all used Bonfire extensions
|
||||
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
|
||||
# IO.inspect(include_config: config)
|
||||
import_config config
|
||||
end
|
||||
|
||||
import_config "activity_pub.exs"
|
||||
|
||||
# finally, append/override config based on env, which will override any config set above (including from imported files)
|
||||
import_config "#{config_env()}.exs"
|
|
@ -1,3 +0,0 @@
|
|||
import Config
|
||||
|
||||
config :phoenix, :json_library, Jason
|
2
flavours/reflow/config/deps.flavour.git
Normal file
2
flavours/reflow/config/deps.flavour.git
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
bonfire_ui_reflow = "https://github.com/bonfire-networks/bonfire_ui_reflow#main"
|
2
flavours/reflow/config/deps.flavour.hex
Normal file
2
flavours/reflow/config/deps.flavour.hex
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
absinthe = "~> 1.7.0"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue