arthur/server/urls.py
Olive Vaughn 6a53adb5e0 Projects live at URLs, have owners, and are edited together live
A project is only ever at /p/<id>/<slug>; / is the index of the projects
you own or edit. Every project has an owner, who can name editors;
anyone with the link can view. Every edit saves itself, one request in
flight at a time, as a patch of the leaves that changed, and a websocket
(channels + daphne) carries presence and each committed write to
everyone else in the project. The first write to a leaf wins, and the
loser is told.

Undo is per person: a step undoes only if the leaves it touched still
hold what it left, so it never takes a collaborator's work with it.
Named snapshots replace saving, and restore as an ordinary write.

An empty symbol now survives the leaf round trip with `:nodes {}`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:04:03 -04:00

20 lines
890 B
Python

from django.contrib import admin
from django.urls import include, path
from clips import views
urlpatterns = [
# `/index.html` as well as `/`, because that is the URL the browser suite has
# used since step 5 — shadow-cljs's dev server did no directory-index
# resolution, so the suite learned to ask for the file. Keeping both means
# ARTHUR_URL can stay pointed at the same place and only the port moves.
path("", views.page, name="page"),
path("index.html", views.page),
# A project's own address, with its name as a slug for people to read. The
# same page; the client reads the id out of the path and opens it.
path("p/<uuid:project_id>", views.page),
path("p/<uuid:project_id>/<slug:slug>", views.page),
path("api/", include("clips.urls")),
path("blob/<str:digest>", views.blob, name="blob"),
path("admin/", admin.site.urls),
]