feat: add site settings management with identity and social links

- Add site_identity and social_links database tables
- Implement GET/PUT /api/settings endpoints (GET public, PUT authenticated)
- Replace hardcoded homepage content with database-driven settings
- Add admin settings UI with identity and social links editing
This commit is contained in:
2026-01-06 22:48:10 -06:00
parent 9ab22ea234
commit 4663b00942
13 changed files with 770 additions and 207 deletions
@@ -0,0 +1,61 @@
{
"db_name": "PostgreSQL",
"query": "\n UPDATE site_identity\n SET display_name = $1, occupation = $2, bio = $3, site_title = $4\n WHERE id = 1\n RETURNING id, display_name, occupation, bio, site_title, created_at, updated_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "display_name",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "occupation",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "bio",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "site_title",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Text",
"Text",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "2ed3555fc0cfe71b8a59c89f6d3fea53458b995f342d623f7ab43824392973c9"
}
@@ -0,0 +1,76 @@
{
"db_name": "PostgreSQL",
"query": "\n UPDATE social_links\n SET platform = $2, label = $3, value = $4, icon = $5, visible = $6, display_order = $7\n WHERE id = $1\n RETURNING id, platform, label, value, icon, visible, display_order, created_at, updated_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "platform",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "label",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "value",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "icon",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "visible",
"type_info": "Bool"
},
{
"ordinal": 6,
"name": "display_order",
"type_info": "Int4"
},
{
"ordinal": 7,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Text",
"Text",
"Text",
"Bool",
"Int4"
]
},
"nullable": [
false,
false,
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "8f08a65d180757f0fcbe65a43e3a2e3fdd95cc1aba80eb40c1042af7301d0fa9"
}
@@ -0,0 +1,68 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT id, platform, label, value, icon, visible, display_order, created_at, updated_at\n FROM social_links\n ORDER BY display_order ASC\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "platform",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "label",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "value",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "icon",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "visible",
"type_info": "Bool"
},
{
"ordinal": 6,
"name": "display_order",
"type_info": "Int4"
},
{
"ordinal": 7,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": []
},
"nullable": [
false,
false,
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "9e55ffc9d9138ea02678ff432db47488da976516f53b53d7a0bd36665b39b628"
}
@@ -0,0 +1,56 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT id, display_name, occupation, bio, site_title, created_at, updated_at\n FROM site_identity\n WHERE id = 1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "display_name",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "occupation",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "bio",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "site_title",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": []
},
"nullable": [
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "f45329eab47a84c6c921f4e78c443835135fa095f16a7a0a9080249c4136fc7d"
}