Management system for student clubs
Go to file
Ferdinand Thiessen 873fee3301 [docs] Updated readme on how to install plugins 2021-05-25 22:09:26 +02:00
.vscode [Vue3][pinia] Make pricelist compile with vue3, needs more work! 2021-03-19 16:33:27 +01:00
api Merge branch 'develop' into seperate_plugins 2021-05-25 22:01:13 +02:00
public [pricelist][picture] update picture if changed, add no-image.svg 2021-03-28 11:34:36 +02:00
src Merge branch 'develop' into seperate_plugins 2021-05-25 22:01:13 +02:00
src-cordova [pricelist][electron] add electron 2021-04-17 12:36:19 +02:00
src-electron [pricelist][electron] add electron 2021-04-17 12:36:19 +02:00
.editorconfig new Project with Quasar 2020-10-02 09:13:14 +02:00
.eslintignore Use yarn and updated dependencies 2020-11-24 17:34:12 +01:00
.eslintrc.js Fixed dependencies, calendar and submodule 2021-03-19 15:53:25 +01:00
.gitignore Code formatting with prettier 2021-01-28 23:08:34 +01:00
.postcssrc.js new Project with Quasar 2020-10-02 09:13:14 +02:00
LICENSE [core] Added license and fixed links in package.json 2021-04-02 04:41:49 +02:00
README.md [docs] Updated readme on how to install plugins 2021-05-25 22:09:26 +02:00
babel.config.js new Project with Quasar 2020-10-02 09:13:14 +02:00
package.json [test] enable all plugins 2021-05-25 21:54:09 +02:00
plugin.config.js [test] enable all plugins 2021-05-25 21:54:09 +02:00
quasar.conf.js [core] Seperated all plugins from the main source tree 2021-05-25 16:13:15 +02:00
tsconfig.json [core] Seperated all plugins from the main source tree 2021-05-25 16:13:15 +02:00
yarn.lock [core] Fixed menu link title generation 2021-05-25 21:54:49 +02:00

README.md

Flaschengeist (frontend)

Modular student club administration system, licensed under the MIT license.

Installation

Requirements

 "engines": {
    "node": ">= 12.22.1",
    "npm": ">= 6.14.12",
    "yarn": ">= 1.21.1"
 }

So on debian (buster and bullseye) you will need to install node.js and yarn beside the debian packages to meet the needed versions.

pushd ~/opt
wget https://nodejs.org/dist/v16.2.0/node-v16.2.0-linux-x64.tar.xz
tar -xJf node-v16.2.0-linux-x64.tar.xz
export PATH="$(pwd)/node-v16.2.0-linux-x64/bin":"$PATH"
npm i -g yarn
npm i -g @quasar/cli
popd

Install the dependencies

yarn install

Be aware npm might not work.

Configure Plugins

Installing a plugin

Simply add it as a dependency and install it, for example installing the pricelist-plugin:

yarn add '@flaschengeist/pricelist'
yarn install

Enable / Disable a plugin

After installing a plugin you will have to enable it, this is done by adding it to the plugin.config.js file. For the example above the file should look like:

module.exports = [
  // pricelist plugin:
  '@flaschengeist/pricelist',
];

Remember to rebuild the project

Configure Backend

The application is using the API of the backend This access needs to be configured in `src/config.ts'->config.baseURL

  • either you do have a proxy webserver that maps the '/api' to the backend (http://localhost:5000) or
  • you do directly configure the backend there:baseURL: 'http://localhost:5000'. Be aware not committing this configuration.

Build the application

yarn quasar build

Development

Icons used

We are using the mdi-v5 icon set, so feel free to use any icon from it. A list can be found here

Commands useful for development

Start the app in development mode

Provides hot-code reloading, error reporting, etc.

yarn quasar dev

File linting

yarn run lint

Plugins

Build a Plugin

Create a new node.js project and add @flaschengeist/api as a peer dependency (e.g. yarn add --peer '@flaschengeist/api'). If your plugin depends on an other plugin (e.g. you use the @flaschengeist/users plugin / stores), then you have to add that plugin as a peer dependency too.

You need to define a main entry point for your plugin (e.g. "main": "src/index.ts" in your package.json) which exportes a plugin descriptor as the default export (see @flaschengeist/types -> FG_Plugin.Plugin). E.g.

import { FG_Plugin } from '@flaschengeist/types';
import { routes } from './routes';

const plugin: FG_Plugin.Plugin = {
  id: 'com.example.myplugin',
  name: 'myplugin',
  innerRoutes: routes,
  // This are required backend plugins:
  requiredModules: [['auth'], ['users'], ['roles']],
  version: '0.0.1',
  widgets: [
    {
      priority: 1,
      name: 'greeting',
      permissions: [],
      widget: defineAsyncComponent(() => import('./components/Widget.vue')),
    },
  ],
};

export default plugin;

This will add a plugin providing a widget for the dashboard side and some routes.