diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 581839a..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -Copyright (c) 2025 Witchcraft Systems - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index d9eb2ea..6194e14 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,3 @@ # pds-dash -a frontend dashboard with stats for your ATProto PDS. - -## setup - -### prerequisites - -- [deno](https://deno.com/manual/getting_started/installation) - -### installing - -clone the repo, install dependencies using deno: - -```sh -deno install -``` - -### development server - -local develompent server with hot reloading: - -```sh -deno task dev -``` - -### building - -to build the optimized bundle run: - -```sh -deno task build -``` - -the output will be in the `dist/` directory. - -## deploying - -we use our own CI/CD workflow at [`.forgejo/workflows/deploy.yaml`](.forgejo/workflows/deploy.yaml), but it boils down to building the project bundle and deploying it to a web server. it'll probably make more sense to host it on the same domain as your PDS, but it doesn't affect anything if you host it somewhere else. - -## configuring - -[`config.ts`](config.ts) is the main configuration file, you can find more information in the file itself. - -## theming - -the colors are designated in [`src/app.css`](src/app.css) as variables, go crazy with them - -the rest is done by editing the css files and style tags directly, good luck - -relevant files: - -- [`src/App.svelte`](src/App.svelte) -- [`src/app.css`](src/app.css) -- [`src/lib/AccountComponent.svelte`](src/lib/AccountComponent.svelte) -- [`src/lib/PostComponent.svelte`](src/lib/PostComponent.svelte) - -the favicon is located at [`public/favicon.ico`](public/favicon.ico) - -## license - -MIT +Frontend with stats for your ATProto PDS \ No newline at end of file diff --git a/config.ts b/config.ts index 8d09cf6..fe28a5a 100644 --- a/config.ts +++ b/config.ts @@ -2,36 +2,27 @@ * Configuration module for the PDS Dashboard */ export class Config { - /** - * The base URL of the PDS (Personal Data Server) - * @default "https://pds.witchcraft.systems" - */ - static readonly PDS_URL: string = "https://pds.witchcraft.systems"; + /** + * The base URL of the PDS (Personal Data Server) + * @default "https://pds.witchcraft.systems" + */ + static readonly PDS_URL: string = "https://pds.witchcraft.systems"; - /** - * The base URL of the frontend service for linking to replies/quotes/accounts etc. - * @default "https://deer.social" - */ - static readonly FRONTEND_URL: string = "https://deer.social"; + /** + * The base URL of the frontend service for linking to replies + * @default "https://deer.social" + */ + static readonly FRONTEND_URL: string = "https://deer.social"; - /** - * Maximum number of posts to fetch from the PDS per request - * Should be around 20 for about 10 users on the pds - * The more users you have, the lower the number should be - * since sorting is slow and is done on the frontend - * @default 20 - */ - static readonly MAX_POSTS: number = 20; + /** + * Maximum number of posts to show in the feed (across all users) + * @default 100 + */ + static readonly MAX_POSTS: number = 100; - /** - * Footer text for the dashboard, you probably want to change this - */ - static readonly FOOTER_TEXT: string = - "Astrally projected from witchcraft.systems

Source (github mirror)"; - - /** - * Whether to show the posts that are in the future - * @default false - */ - static readonly SHOW_FUTURE_POSTS: boolean = false; -} + /** + * Footer text for the dashboard + * @default "Astrally projected from witchcraft.systems" + */ + static readonly FOOTER_TEXT: string = "Astrally projected from witchcraft.systems"; +} \ No newline at end of file diff --git a/deno.lock b/deno.lock index 724a5c0..0616852 100644 --- a/deno.lock +++ b/deno.lock @@ -8,7 +8,6 @@ "npm:@tsconfig/svelte@^5.0.4": "5.0.4", "npm:moment@^2.30.1": "2.30.1", "npm:svelte-check@^4.1.5": "4.1.6_svelte@5.28.1__acorn@8.14.1_typescript@5.7.3", - "npm:svelte-infinite-loading@^1.4.0": "1.4.0", "npm:svelte@^5.23.1": "5.28.1_acorn@8.14.1", "npm:typescript@~5.7.2": "5.7.3", "npm:vite@^6.3.1": "6.3.2_picomatch@4.0.2" @@ -416,9 +415,6 @@ "typescript" ] }, - "svelte-infinite-loading@1.4.0": { - "integrity": "sha512-Jo+f/yr/HmZQuIiiKKzAHVFXdAUWHW2RBbrcQTil8JVk1sCm/riy7KTJVzjBgQvHasrFQYKF84zvtc9/Y4lFYg==" - }, "svelte@5.28.1_acorn@8.14.1": { "integrity": "sha512-iOa9WmfNG95lSOSJdMhdjJ4Afok7IRAQYXpbnxhd5EINnXseG0GVa9j6WPght4eX78XfFez45Fi+uRglGKPV/Q==", "dependencies": [ @@ -480,7 +476,6 @@ "npm:@tsconfig/svelte@^5.0.4", "npm:moment@^2.30.1", "npm:svelte-check@^4.1.5", - "npm:svelte-infinite-loading@^1.4.0", "npm:svelte@^5.23.1", "npm:typescript@~5.7.2", "npm:vite@^6.3.1" diff --git a/index.html b/index.html index adcfab3..f71d006 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/package.json b/package.json index 1db6461..9f84465 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "@atcute/bluesky": "^2.0.2", "@atcute/client": "^3.0.1", "@atcute/identity-resolver": "^0.1.2", - "moment": "^2.30.1", - "svelte-infinite-loading": "^1.4.0" + "moment": "^2.30.1" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^5.0.3", diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.svelte b/src/App.svelte index 733320e..95912e2 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,69 +1,47 @@
- {#await accountsPromise} -

Loading...

- {:then accountsData} -
-

ATProto PDS

-

Home to {accountsData.length} accounts

-
- {#each accountsData as accountObject} - - {/each} -
-

{@html Config.FOOTER_TEXT}

+ {#await accountsPromise} +

Loading...

+ {:then accountsData} +
+

ATProto PDS

+

Home to {accountsData.length} accounts

+
+ {#each accountsData as accountObject} + + {/each}
- {:catch error} -

Error: {error.message}

- {/await} +

{@html Config.FOOTER_TEXT}

+
+ {:catch error} +

Error: {error.message}

+ {/await} + {#await postsPromise} +

Loading...

+ {:then postsData}
- {#each posts as postObject} + {#each postsData as postObject} {/each} -
+ {/await}