Dashboard for THBioLink backend https://github.com/TrekkerStudios/THBioLink
  • Svelte 44.2%
  • TypeScript 41.7%
  • JavaScript 10.7%
  • HTML 3.4%
Find a file
2023-07-29 03:07:48 -04:00
src release 2023-07-29 03:07:48 -04:00
static release 2023-07-29 03:07:48 -04:00
.gitignore release 2023-07-29 03:07:48 -04:00
package.json release 2023-07-29 03:07:48 -04:00
pnpm-lock.yaml release 2023-07-29 03:07:48 -04:00
postcss.config.mjs release 2023-07-29 03:07:48 -04:00
README.md release 2023-07-29 03:07:48 -04:00
svelte.config.js release 2023-07-29 03:07:48 -04:00
tailwind.config.cjs release 2023-07-29 03:07:48 -04:00
tsconfig.json release 2023-07-29 03:07:48 -04:00
vite.config.mjs release 2023-07-29 03:07:48 -04:00

THBL Manager

Version 1.0

by Trekker Holdings, using o7-app



How to get it working

Install

Clone the repo and install:

pnpm install

.env

Once you make an Upstash database, copy the REST URL and token and put them in your environment:

UPSTASH_REDIS_REST_URL = "https://urlfromupsta.sh"
UPSTASH_REDIS_REST_TOKEN = "T0K3N_FR0M_UPST@SH"

...as well as set a login:

LOGIN = username:p@ssw0rd

How to add data

The TRPC callback will look for the keys described in page.server.ts and parse the data into the page expecting an array of JSON objects for each section. Refer to THBioLink for how the JSON objects should be constructed.

const <key_socials> = ['key.socials', await trpcServer.fetchKV.ssr({ table: 'key.socials' }, event)];
await key_socials[1].sort((a, b) => (a.id > b.id) ? 1 : -1);