Files
Archivum/backend/internal/graph/schema.graphql
brasse b d93f3bb888 fix+feat: SPA routing, theme system, modern UI, setup wizard improvements
Fixes:
- Go server now serves index.html for all non-asset paths (SPA fallback)
- Null guard on data.documents prevents undefined.length TypeError
- App.vue waits for checkStatus() before rendering AppLayout (race condition)
- PWA manifest no longer references missing icon files
- index.html applies theme class before paint to prevent flash

Features:
- Theme store: dark/light toggle + 6 accent color presets + custom hex picker
- ThemeToggle component in header dropdown
- CSS custom properties for accent color (--accent-400/500/600/700)
- Tailwind accent-* color utilities driven by CSS vars
- SetupWizard: 3-step flow, password confirmation, LDAP test button,
  animated toggle, review step, proper error/success states
- Sidebar: loading skeleton, active page highlight, null-safe document list
- Global .input, .btn-primary, .btn-secondary, .card component classes
- Stub GraphQL responses for setup/login/testLdapConnection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 13:40:42 +02:00

96 lines
2.2 KiB
GraphQL

type Query {
# Returns REQUIRE_SETUP if config is missing.
systemStatus: SystemStatus!
# Fetch a document by its slug path.
document(slug: String!): Document
# List documents under an optional path prefix.
documents(prefix: String): [DocumentMeta!]!
# Commit history for a document.
history(slug: String!): [CommitEntry!]!
# Unified diff between two commits for a document.
diff(slug: String!, fromHash: String!, toHash: String!): String!
# Raw content of a document at a specific commit.
documentAtCommit(slug: String!, hash: String!): String!
}
type Mutation {
# First-run setup.
setup(input: SetupInput!): Boolean!
# Test an LDAP configuration before saving.
testLdapConnection(input: LDAPInput!): LDAPTestResult!
# Authenticate and receive a bearer token.
login(username: String!, password: String!): String!
# Invalidate the current session.
logout: Boolean!
# Save (create or update) a document.
saveDocument(input: SaveDocumentInput!): Document!
# Delete a document.
deleteDocument(slug: String!): Boolean!
}
# ── Types ──────────────────────────────────────────────────────────────────────
enum SystemStatus {
OK
REQUIRE_SETUP
}
type Document {
slug: String!
content: String!
meta: DocumentMeta!
}
type DocumentMeta {
slug: String!
title: String!
updatedAt: String!
}
type LDAPTestResult {
success: Boolean!
message: String!
}
type CommitEntry {
hash: String!
author: String!
email: String!
date: String!
subject: String!
}
# ── Inputs ─────────────────────────────────────────────────────────────────────
input SetupInput {
storagePath: String!
adminUser: String!
adminPass: String!
ldap: LDAPInput
jwtSecret: String!
}
input LDAPInput {
host: String!
port: Int!
baseDN: String!
bindDN: String!
bindPassword: String!
}
input SaveDocumentInput {
slug: String!
content: String!
commitMessage: String!
}