67b09e1233
The tests showed warning on an unknown property. Turns out I was holding it wrong. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de> |
||
---|---|---|
.reuse | ||
.vscode | ||
LICENSES | ||
src | ||
src-tauri | ||
static | ||
tests | ||
.eslintignore | ||
.eslintrc.cjs | ||
.gitignore | ||
.node-version | ||
.node-version.license | ||
.npmrc | ||
.prettierignore | ||
.prettierrc | ||
.prettierrc.license | ||
COPYING | ||
package-lock.json | ||
package-lock.json.license | ||
package.json | ||
package.json.license | ||
playwright.config.ts | ||
postcss.config.cjs | ||
README.md | ||
svelte.config.js | ||
tailwind.config.js | ||
tsconfig.json | ||
tsconfig.json.license | ||
vite.config.ts | ||
vitest.config.ts |
Anvil
/!\ work in progress!
Anvil is a web client app for interacting with federated forges. It's meant to allow you to:
- Create an account of a federated forge
- Browse software projects
- Create and manage your software projects
- Create and manage teams and organizations
- Participate and interact with software projects: Repo, issues, PRs, CI, etc. etc.
It's meant to be deployed in 3 ways:
- Tauri app, packaged with Flatpak, that you can install on your desktop
- Independent fully-client-side hosted app you can access using a web browser and connect to any forge (we will probably host one on Anvil's website for convenient outreach, but anyone can host on their server)
- 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
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:
- SvelteKit
- TypeScript
- Tailwind
- Skeleton.dev
- Tauri
Soon also:
- ActivityPub
- ForgeFed
Developing
Install NodeJS. Recommended method: FNM.
Install dependencies:
npm install
Launch development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Quick overview of the structure of the codebase:
.reuse
- This folder holds configuration for REUSE.vscode
- This folder holds configuration for Visual Studio CodeLICENSES
- Used in conjunction with REUSEsrc
- The source code of the web application (server and client)src-tauri
- Glue code for Tauri to turn it into a native applicationstatic
- 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 filesCOPYING
- License of this project under AGPLpackage-lock.json
andpackage.json
- NPM package lockfile for dependencies and meta information about this projectplaywright.config.ts
- Playwright End-to-End test configurationpostcss.config.cjs
- PostCSS postprocessor configuration fileREADME.md
- This documentsvelte.config.js
- Svelte configuration filetailwind.config.js
- Tailwind CSS configuration filetsconfig.json
- TypeScript configuration filevite.config.ts
- Vite bundler configuration filevitest.config.ts
- Vitest test runner configuration file
Building
We have installed the Node servers adapters for the target environment. There is no cloud-native build target at this point.
To create a production version of the app:
npm run build
To preview the production build:
npm run preview
Deployment
There is a demo instance available. Log in with credentials from fig 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 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 reside in
/opt/anvil
. See
SvelteKit documentation on environment variables
to learn more.
Storybook
Find a component library online. 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)
GNU AGPL v3 or later. For the legal detail, see COPYING
.