Add Space metadata model and provisional Forgejo content ADR

Introduce tenant-scoped Space/SpaceMembership with list and detail views.
Document markdown-in-Forgejo as content SoR (ADR-0002). Run migrations on
container start so app.coulomb.social picks up the new tables.
This commit is contained in:
tegwick 2026-08-12 01:30:05 +02:00
parent bb6bc6093a
commit be32432d39
22 changed files with 697 additions and 12 deletions

View file

@ -4,15 +4,20 @@
<h1>Spaces</h1>
<p class="muted">
Co-creation spaces for your tenant.
Content will live as markdown in Forgejo-backed repositories.
Page content will live as markdown in Forgejo-backed repositories.
</p>
{% if spaces %}
<ul class="space-list" style="list-style:none;padding:0;margin:1.5rem 0 0;">
{% for space in spaces %}
<li class="card" style="margin-top:0.75rem;">
<strong>{{ space.title }}</strong>
<span class="muted"> · {{ space.slug }}</span>
<a href="{% url 'spaces:detail' space.slug %}" style="color:inherit;text-decoration:none;">
<strong>{{ space.title }}</strong>
<span class="muted"> · {{ space.slug }}</span>
</a>
{% if space.description %}
<p class="muted" style="margin:0.35rem 0 0;font-size:0.95rem;">{{ space.description }}</p>
{% endif %}
</li>
{% endfor %}
</ul>
@ -20,8 +25,8 @@
<div class="card">
<h2 style="margin-top:0;">No spaces yet</h2>
<p class="muted" style="margin-bottom:0;">
Spaces and Forgejo-backed content land in the next steps
(CSOC-WP-0004-T02+). Use the profile menu for session diagnostics.
Operators can seed a space via Django admin (tenant-matched).
Create-space UI and Forgejo binding land next (T04–T06).
</p>
</div>
{% endif %}

View file

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block title %}{{ space.title }} — {{ site_name }}{% endblock %}
{% block content %}
<p class="muted" style="margin:0 0 0.5rem;">
<a href="{% url 'core:app_home' %}">← Spaces</a>
</p>
<h1>{{ space.title }}</h1>
{% if space.description %}
<p class="muted">{{ space.description }}</p>
{% endif %}
<div class="card">
<h2 style="margin-top:0;">Space metadata</h2>
<dl>
<dt>Slug</dt><dd>{{ space.slug }}</dd>
<dt>Tenant</dt><dd>{{ space.tenant_id }}</dd>
<dt>Content</dt>
<dd>
{% if space.has_content_binding %}
{{ space.forgejo_owner }}/{{ space.forgejo_repo }}
@ {{ space.default_branch }}
· root <code>{{ space.content_root }}</code>
{% else %}
Not bound to a Forgejo repo yet (CSOC-WP-0004-T04).
{% endif %}
</dd>
</dl>
</div>
<div class="card">
<h2 style="margin-top:0;">Pages</h2>
<p class="muted" style="margin-bottom:0;">
Markdown page rendering from Forgejo lands in T04. This view is metadata only.
</p>
</div>
{% endblock %}