Frontend for Spasm-powered forum
  • TypeScript 55.1%
  • Vue 43.8%
  • JavaScript 0.5%
  • CSS 0.5%
Find a file
2026-04-28 22:38:09 +01:00
assets feat: add federation 2026-04-07 00:34:33 +01:00
components feat: add more git options 2026-04-28 22:38:09 +01:00
composables feat: add federation 2026-04-07 00:34:33 +01:00
helpers feat: add more git options 2026-04-28 22:38:09 +01:00
layouts feat: api url should work without env var 2026-04-03 22:17:10 +01:00
pages feat: add more git options 2026-04-28 22:38:09 +01:00
plugins feat: add dompurify and enable markdown 2023-09-16 01:19:24 +01:00
public feat: add new example favicon 2025-07-31 00:50:12 +01:00
stores feat: add more git options 2026-04-28 22:38:09 +01:00
.dockerignore chore: remove all logos 2026-03-27 00:20:22 +00:00
.env.example feat: add more git options 2026-04-28 22:38:09 +01:00
.gitignore feat: add default home header image and buttons 2026-02-21 00:37:29 +00:00
.npmrc npm: add npmrc 2026-03-08 01:01:14 +00:00
Dockerfile fix: dockerignore 2026-03-26 00:56:17 +00:00
ecosystem-prod.config.js npm: update spasm.js 2026-03-08 01:00:35 +00:00
ecosystem-stage.config.js pm2: add more env vars to config 2025-04-11 01:07:06 +01:00
error.vue feat: add admin page 2025-01-20 16:20:02 +00:00
LICENSE docs: add license 2020-12-01 22:01:22 -05:00
nuxt.config.ts feat: add more git options 2026-04-28 22:38:09 +01:00
package-lock.json npm: update spasm.js 2026-03-20 00:17:27 +00:00
package.json npm: update spasm.js 2026-03-20 00:17:27 +00:00
README.md docs: add mirrors 2026-04-28 01:01:04 +01:00
tailwind.config.js feat: add themes to web admin panel 2026-03-25 00:41:26 +00:00
tsconfig.json feat: add categories for new events 2024-11-21 01:16:22 +00:00
vitest.config.js feat: add admin page 2025-01-20 16:20:02 +00:00

Deploy Spasm


Spasm Forum web client

Mirrors: Forgejo Codeberg Github

spasm-forum-web is a frontend for a Spasm forum.

spasm-forum-server repository can be found here.

This repo is for development. If you want to deploy Spasm, then check docker/podman or ansible.

Install npm

Note: nvm and npm should already be installed if you've used scripts for an automated initial server setup.

# install nvm to manage node versions
# https://github.com/nvm-sh/nvm

# install node v20
nvm install 20

# set node v20 as default
nvm alias default 20

# switch to node v20
nvm use 20

# update npm
npm install -g npm

# install packages
npm ci

Download the app

Download the app from the Github into the frontend/ folder.

Note: the app should already be downloaded if you've used scripts for an automated initial server setup.

git clone https://github.com/spasm-network/spasm-forum-web.git frontend/
cd frontend/

Environment

Create default .env file, see example .env.example.

Note: the .env file should already be created if you've used scripts for an automated initial server setup.

cp .env.example .env

Test locally

Note: this is an optional step intended for developers. You can skip this step if you want to run a Spasm forum.

Install npm packages in the frontend folder.

npm ci

Start the app.

npm run dev

Open a browser and test the app at localhost:3000.

Note: press ctrl+c in the terminal to stop the process.

Note: npm run dev temporarily doesn't work on nuxt versions above 3.15 because they introduced breaking changes, but you can still use npm run prod.


Customization

Necessary settings

  • Change app name, title, description, about, manifest params in .env.
  • Add logos (recommended sizes are 100x100, 192x192, 512x512) as favicon.ico, pwa-192x192.png, pwa-512x512.png into public/ folder.

Optional settings

There are many other settings that can be changed via .env, most variables have self-explanatory names and comments.

The full list of settings can be found in ./.env.example.

Admin panel

Instances can be customized via GUI through the admin panel.

The admin page can be accessed by clicking an 'admin' button at the bottom menu bar after connecting an admin public key (address), or directly via url, e.g. https://forum.spasm.network/admin.

Make sure that an admin panel and app config changes are enabled and admin addresses are listed in .env files in both frontend (spasm-forum-web) and backend (spasm-forum-server).

ENABLE_APP_CONFIG_CHANGES=true
ENABLE_APP_CONFIG_CHANGES_BY_ADMIN=true
# Separate admin addresses with comma
ENABLE_ADMIN=true
ADMINS=""

Advanced customization

You can use completely custom intro and contacts if customization via predefined options in .env is not enough.

If you've used scripts for the automated server setup, then custom intro and contacts files should have already been created.

If you follow the manual installation, then create custom files CustomIntro.vue and CustomContacts.vue in components/custom/.

If your version has example files, then you can simply copy-paste them:

cp components/custom/CustomContacts.example.vue components/custom/CustomContacts.vue
cp components/custom/CustomIntro.example.vue components/custom/CustomIntro.vue

Updates

Note: customized files like components/custom/CustomIntro.vue, components/custom/CustomContacts.vue, and .env are ignored by git, so you can customize them and they won't be changed after updating the code to a newer version with git pull. However, it's a good idea to back these files up.


Build

npm ci

Build the frontend for running in production.

npm run build

Run production

npm ci

Run with pm2 (after build):

# Install pm2
npm i pm2 -g

# To make sure app starts after reboot
pm2 startup

# Run the app
npm run prod

# Freeze a process list on reboot
pm2 save

# Check processes
pm2 list

For developers

Use mock data

If you want to contribute to the UI (frontend) without the hassle of setting up the backend and the database, then you can use the mock data to pre-populate the client with feed posts and latest comments by enabling this environment variable in the ./.env file:

USE_MOCKED_DATA_IF_BACKEND_IS_DOWN=true

Don't forget to restart the app with npm run dev.

Contact

Send a message to degenrocket on Session if you need any help.