Add Logbuch: project update blog with admin, media and API

Public archive with sidebar navigation, project pages, month archive,
search and entry pages with image blocks. Admin area for brands,
projects, post types, users, api clients, media and the entry editor
with drag and drop images, preview per audience, scheduling and
publish checks. Read and write API with bearer tokens, audience
scoping, idempotent creation, OpenAPI document and editorial guide.
Magic link login with configurable allowed domains, whole app behind
the session gate. 456 tests including design rule checks.
This commit is contained in:
Matthias Giesselmann
2026-07-31 21:33:42 +02:00
commit b90ff252d1
291 changed files with 43671 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import { describe, expect, it } from 'vitest'
import { isSlug, slugify } from '~/domain/slug'
describe('slugify', () => {
it('macht aus einem Namen einen Slug', () => {
expect(slugify('MTA Telematik')).toBe('mta-telematik')
})
it('schreibt Umlaute aus', () => {
expect(slugify('Größe und Öl')).toBe('groesse-und-oel')
})
it('wirft Sonderzeichen weg und lässt keine Bindestriche am Rand', () => {
expect(slugify(' Trakk / Regel-Engine! ')).toBe('trakk-regel-engine')
})
it('liefert eine leere Zeichenkette, wenn nichts Verwertbares übrig bleibt', () => {
expect(slugify('///')).toBe('')
})
})
describe('isSlug', () => {
it('nimmt Kleinbuchstaben, Ziffern und Bindestriche an', () => {
expect(isSlug('mta-360')).toBe(true)
})
it('lehnt Großbuchstaben ab', () => {
expect(isSlug('Trakk')).toBe(false)
})
it('lehnt führende und doppelte Bindestriche ab', () => {
expect(isSlug('-trakk')).toBe(false)
expect(isSlug('trakk--web')).toBe(false)
})
it('lehnt einen zu kurzen Slug ab', () => {
expect(isSlug('a')).toBe(false)
})
})