Migrate backend from PocketBase to Directus

Full cutover: auth, users, collection and friendships now run on Directus
via @directus/sdk, with owner/visibility rules enforced by Directus
permissions.

- middleware: Directus session (directus_auth cookie) with token refresh
- /login is Directus (email normalized to lowercase), new /register page
  (first/last name, username) backed by public registration
- collection, friends and profile pages + all API endpoints ported;
  ownership and addressee-only accept/decline enforced by permissions
- display names use first_name/last_name everywhere (nav, friends, profile)
- PocketBase SDK, POCKETBASE_URL and pb_schema.json removed
- README and compose updated for DIRECTUS_URL
This commit is contained in:
2026-07-28 20:33:46 +02:00
parent a3a69e0eae
commit fc51371dad
37 changed files with 986 additions and 765 deletions
+13 -5
View File
@@ -9,10 +9,10 @@
"version": "0.0.1",
"dependencies": {
"@astrojs/node": "^11.0.2",
"@directus/sdk": "^23.0.0",
"@tailwindcss/vite": "^4.3.3",
"astro": "^7.1.3",
"basecoat-css": "^1.0.2",
"pocketbase": "^0.27.0",
"tailwindcss": "^4.3.3"
},
"engines": {
@@ -492,6 +492,18 @@
"node": ">= 20.12.0"
}
},
"node_modules/@directus/sdk": {
"version": "23.0.0",
"resolved": "https://registry.npmjs.org/@directus/sdk/-/sdk-23.0.0.tgz",
"integrity": "sha512-hoPSj9bhe2dxaq9PXuvqqCHzjy9sUvcik2vi5DA/xKZ7E42O2TgDfNgRjYY8gb0ZOkm3TAUeLuEKf4aJTrUYIw==",
"license": "MIT",
"engines": {
"node": ">=22"
},
"funding": {
"url": "https://github.com/directus/directus?sponsor=1"
}
},
"node_modules/@emnapi/core": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",
@@ -3676,10 +3688,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pocketbase": {
"version": "0.27.0",
"license": "MIT"
},
"node_modules/postcss": {
"version": "8.5.23",
"funding": [