docs: propose update to README

A handful of things have changed since last year, so the README should
reflect that.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
André Jaenisch 2024-05-10 21:18:23 +02:00
parent e6c46448c9
commit 05158eb10c
No known key found for this signature in database
GPG key ID: 5A668E771F1ED854

View file

@ -31,7 +31,12 @@ It's meant to be deployed in 3 ways:
3. Hosted app served by federated forge servers as their default UI, supporting 3. Hosted app served by federated forge servers as their default UI, supporting
both multi-page mode with pre-rendered pages and regular single-page mode both multi-page mode with pre-rendered pages and regular single-page mode
Status (May 2023): Implementation is in very early initial stages. Status (May 2024): Implementation is in very early initial stages.
You can build Anvil with Tauri to a native app.
Since Progressive Enhancement philosophy is followed the security model of the
web browsers make it hard to have a completely client-side application. We will
look into this in a future point in time again.
Tech stack: Tech stack:
@ -39,10 +44,10 @@ Tech stack:
- TypeScript - TypeScript
- Tailwind - Tailwind
- Skeleton.dev - Skeleton.dev
- Tauri
Soon also: Soon also:
- Tauri
- ActivityPub - ActivityPub
- ForgeFed - ForgeFed
@ -67,16 +72,36 @@ npm run dev -- --open
Quick overview of the structure of the codebase: Quick overview of the structure of the codebase:
This repo was started via `npm create skeleton-app@latest` with the "Welcome"
template.
More components can be added using * `.reuse` - This folder holds configuration for [REUSE](https://reuse.software/)
[`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). * `.vscode` - This folder holds configuration for Visual Studio Code
* `LICENSES` - Used in conjunction with REUSE
* `src` - The source code of the web application (server and client)
* `src-tauri` - Glue code for Tauri to turn it into a native application
* `static` - Static assets (FavIcon)
* `tests` - Mainly Svelte component tests for the client
* `.eslintignore` and `.eslintrc.cjs` - ESLint ignore and configuration files
* `.gitignore` - Files and folders not to be subjected to version control
* `.node-version` - Minimum of supported NodeJS version
* `*.license` - Files to be used in conjunction with REUSE
* `.npmrc` - NPM configuration file
* `.prettierignore` and `.prettierrc` - Prettier ignore and configuration files
* `COPYING` - License of this project under AGPL
* `package-lock.json` and `package.json` - NPM package lockfile for dependencies
and meta information about this project
* `playwright.config.ts` - Playwright End-to-End test configuration
* `postcss.config.cjs` - PostCSS postprocessor configuration file
* `README.md` - This document
* `svelte.config.js` - Svelte configuration file
* `tailwind.config.js` - Tailwind CSS configuration file
* `tsconfig.json` - TypeScript configuration file
* `vite.config.ts` - Vite bundler configuration file
* `vitest.config.ts` - Vitest test runner configuration file
## Building ## Building
We haven't yet installed [adapters](https://kit.svelte.dev/docs/adapters) for We have installed the [Node servers adapters](https://kit.svelte.dev/docs/adapter-node) for
the target environments. Coming soon. the target environment. There is no cloud-native build target at this point.
To create a production version of the app: To create a production version of the app:
@ -90,6 +115,35 @@ To preview the production build:
npm run preview npm run preview
``` ```
## Deployment
There is a [demo instance](https://anvil.demo.jaenis.ch/) available.
Log in with credentials from [fig](https://fig.fr33domlover.site/) to test it
with real data or use any other credentials you like (to see test data).
If you want to run an instance yourself, adapt the
[SystemD service file](https://kit.svelte.dev/docs/adapter-node#socket-activation)
to your setup. For example, running behind a reverse proxy on port 8080
on https://anvil.domain.example/ would look similiar to this:
```
[Service]
Environment=NODE_ENV=production IDLE_TIMEOUT=60 ORIGIN=https://anvil.domain.example PORT=8080
ExecStart=/usr/bin/node /opt/anvil
```
This assumes the repository was cheked out and the
[build artifacts](https://kit.svelte.dev/docs/adapter-node#deploying) reside in
`/opt/anvil`. See
[SvelteKit documentation on environment variables](https://kit.svelte.dev/docs/adapter-node#environment-variables-origin-protocolheader-hostheader-and-port-header)
to learn more.
## Storybook
Find a [component library online](https://anvil.codeberg.page/Anvil/).
This is loosely kept in sync with the main branch because there is a dependency
mismatch between Storybook dependencies and what we want to use.
## Software freedoms (a.k.a license) ## Software freedoms (a.k.a license)
GNU AGPL v3 or later. For the legal detail, see [`COPYING`](COPYING). GNU AGPL v3 or later. For the legal detail, see [`COPYING`](COPYING).