Mirror of Vervis, a federated forge server
Find a file
2024-10-21 20:10:56 +03:00
app Stop using Vervis.Import and NoImplicitPrelude, switch to plain regular imports 2019-06-15 08:24:08 +00:00
config Docker: Config volume & State preparation when using docker-compose 2024-10-20 00:27:31 +03:00
embed Move robots.txt and favicon from config/ to new embed/ dir 2022-07-25 17:40:19 +00:00
hook-darcs In darcs post-apply hook, send a Push object to Vervis 2019-10-10 16:41:34 +00:00
hook-git Install darcs post-apply hooks in darcs repos, no-op hook for now 2019-10-07 14:05:52 +00:00
migrations Fix "no people" bug in migration 554 2024-08-06 12:54:21 +03:00
src Docker: Config volume & State preparation when using docker-compose 2024-10-20 00:27:31 +03:00
templates UI, C2S, S2S: Factory: Make allowed types editable 2024-08-07 13:16:25 +03:00
test Bring Yesod scaffolding 2016-02-13 03:35:30 +00:00
th UI, C2S, S2S: Factory: Make allowed types editable 2024-08-07 13:16:25 +03:00
.ghci Bring Yesod scaffolding 2016-02-13 03:35:30 +00:00
.gitignore Docker: Update Dockerfile & Add docker-compose.yml (still tweaking the setup) 2024-10-19 14:30:32 +03:00
API.md Docs: API.md: Info about the specific inbox activity types 2024-07-19 18:08:44 +03:00
AUTHORS.md Update format of AUTHORS file, link to Fedi accounts instead of email 2022-09-01 09:28:38 +00:00
CHANGELOG.md Document the 0.1 release in CHANGELOG 2024-10-21 18:25:53 +03:00
COPYING Releases are under AGPL 3 2018-03-17 18:21:51 +00:00
COPYING.AGPL3 Releases are under AGPL 3 2018-03-17 18:21:51 +00:00
COPYING.CC0 Releases are under AGPL 3 2018-03-17 18:21:51 +00:00
create-db.sql Docker: Update Dockerfile & Add docker-compose.yml (still tweaking the setup) 2024-10-19 14:30:32 +03:00
create-self-cert.sh Docker: Instructions & utils for testing the production image 2024-10-21 14:41:13 +03:00
docker-compose.yml Docker: Instructions & utils for testing the production image 2024-10-21 14:41:13 +03:00
Dockerfile Docker: Tweak UID/GID, from 991 to 981 2024-10-20 17:10:58 +03:00
FEDERATION.md FEDERATION.md: Add some missing double quotes in JSON example 2019-07-26 06:49:45 +00:00
INSTALL.md README: Revise text 2024-10-20 01:55:16 +03:00
nginx.conf Docker: Instructions & utils for testing the production image 2024-10-21 14:41:13 +03:00
prepare-state.sh Docker: Tweak UID/GID, from 991 to 981 2024-10-20 17:10:58 +03:00
README.md README: Tweak deployment instructions 2024-10-21 20:10:56 +03:00
stack.yaml Actor system typed methods + upgrade to LTS-22 + remove darcs dep 2024-08-21 20:17:52 +03:00
update-deps.sh Upgrade to LTS 18 (last LTS with GHC 8) 2024-07-18 13:57:41 +03:00
vervis.cabal vervis.cabal: Codeberg becomes main repo + update version to 0.1 2024-10-21 18:21:15 +03:00

Vervis is a free, open-source federated forge backend server:

  • A platform for hosting and collaboration on software projects
  • A reference implementation of the ForgeFed forge federation protocol, which is an extension of ActivityPub, the protocol that drives the Fediverse
  • A decentralized network in which people on one server can seamlessly collaborate with people from another server, including non-Vervis software that implements ForgeFed
  • Vervis is still in pre-alpha phase and not ready for production use!
  • Provides a temporary static UI, to be replaced by the Anvil frontend client

Navigation

Features

The current focus is the classic core features for collaboration:

  • Repositories
    • Git
    • Darcs
  • Issue tracking
  • Pull requests
  • And of course federation! Including, eventually, with other forge projects working on implementing federation, such as Forgejo and GitLab

SSH Client Config

Vervis comes with its own SSH server, which usually requires some configuration to be set in your SSH client, if you'd like to be able to push and pull repos via SSH.

Add the following to your ~/.ssh/config file (or create it if it doesn't exist), replacing the Host with your instance's domain:

Host fig.fr33domlover.site
    KexAlgorithms +diffie-hellman-group1-sha1
    ControlMaster no
    ForwardAgent no
    ForwardX11 no
    Ciphers +aes256-cbc
    MACs +hmac-sha1
    PubkeyAcceptedKeyTypes +ssh-rsa
    HostKeyAlgorithms +ssh-rsa

Cloning repositories works over (unauthenticated) HTTPS and (authenticated) SSH.

HTTPS clone:

$ git clone https://vervis.peers.community/repos/rjQ3E vervis

SSH clone and push:

If your system username and Vervis username are identical:

$ git clone vervis.peers.community:rjQ3E vervis

If usernames are different:

$ git clone luke@vervis.peers.community:rjQ3E vervis

Deployment

Tech stack

  • Haskell programming language
  • Yesod web framework
  • PostgreSQL database for most data
  • Some data in SQLite databases
  • The work-in-progress Anvil frontend uses:
    • Svelte
    • Skeleton
    • Tauri

Requirements

  • PostgreSQL 9.5+

Docker

The repository includes deployment configurations for Docker and docker-compose.

  1. Install Docker
  2. In create-db.sql, update the vervis DB user's password
  3. Create and edit config/settings.yml based on config/settings-sample-prod.yml, remember to set the same DB password here
  4. In docker-compose.yml, update the database superuser password (it's the password for the postgres superuser, not vervis)
  5. Create initial state: ./prepare-state.sh
  6. Ready for launch! docker-compose up -d
sudo apt install docker-compose docker.io
vim create-db.sql
cp config/settings-sample-prod.yml config/settings.yml
vim config/settings.yml
vim docker-compose.yml
./prepare-state.sh
docker-compose up -d

Manual Installation

For manual/custom installation steps, see INSTALL.md.

Development

To prepare a development environment, follow the instructions in INSTALL.md.

Federation & API

See FEDERATION.md & API.md.

Contributing

Vervis is free, open-source software licensed under AGPLv3.

You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository.

Matrix room: #general-forgefed:matrix.batsense.net

Finding your way in the codebase

Folders:

  • app: main functions of the web app, for regular build and for development modes
  • config: Settings the app reads when it launches, some defined by a human and some auto-generated
  • .git: Internal version control data of this repo
  • embed: Files embedded into the app source code at build time (using TH)
  • hook-darcs & hook-git: main functions for VCS hook programs to be inserted into every repo hosted by the app
  • migrations: Helper files for DB migrations: New entities added & model files for migrations involving data manipulation
  • src: Web app Haskell source code, built as a library whose modules are used by the various executables
  • static: Static files (such as CSS and fonts) served by the web app (no such files at the moment)
  • templates: UI page and widget templates (.hamlet for HTML, .cassius for CSS)
  • test: No tests have been written yet
  • th: Domain-specific language snippets, from which code is generated using TH

Files:

  • .gitignore
  • th/routes
  • th/models
  • update-deps.sh
  • bindist.sh

Haskell modules in src:

  • Non-Vervis modules:
    • Modules ending with Local:
    • The rest:
  • Vervis.Data
  • Vervis.Persist
  • Vervis.Fetch
  • Vervis.Serve
  • Vervis.Query
  • Vervis.Web
  • Primary web app support modules:
    • Vervis.Foundation
    • Vervis.Application
    • Vervis.Settings
    • Vervis.Model
    • Vervis.Migration
  • Primary web app logic modules:
    • Vervis.Actor
    • Vervis.Handler
    • Vervis.Client
  • Vervis.Ssh

Testing the production image

When Vervis is built in development mode (the flag is set in stack.yml and can be overriden when running stack build), it works with plain HTTP, but in production mode (e.g. when using the official prebuilt image), it requires HTTPS, a domain, and the standard HTTP(S) ports.

Instructions for testing a production image, assuming we'll use dev.example as the server's domain name:

  1. The usual ./prepare-state.sh and cp config/settings-sample-prod.yml config/settings.yml
  2. On the host system, edit /etc/hosts, adding the line 127.0.0.1 dev.example
  3. In config/settings.yml, set the domain to dev.example
  4. Run ./create-self-cert.sh to generate a self-signed certificate for dev.example
  5. In docker-compose.yml, uncomment the nginx service
  6. In nginx.conf,
    • Update the domain to dev.example
    • Uncomment the self-signed cert paths
  7. docker-compose up

License

AGPLv3+. See COPYING.

Funding

This project is funded through the NGI Zero Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo NGI Zero Entrust Logo