Skip to content

allez-chauffe/marcel

Repository files navigation

marcel

Marcel

Marcel is a configurable plugin based dashboard system.

🚧 This README is still a work in progress...

Create a plugin

Marcel is based on plugins, and we need you to complete the collection!

By convention, a plugin should have a name begin with marcel-plugin-* (marcel-plugin-text for example). This way, you can find a list of all available plugins by searching them on gitHub

See the marcel-plugin package to know more about plugin creation.

Build

marcel is composed of 3 parts:

  • api is the backend written in go.
  • backoffice is the single page app used to configure marcel and create medias.
  • frontend is the single page app actually displaying a media.

Requirements

  • go > 1.16.0 (marcel is using go modules)
  • node > 16.17

Backend

Building the backend is simple, you can just install the main go package :

$ go install ./cmd/marcel

This will make the marcel command available (if your go bin folder is in your PATH)

Backoffice and Frontend

The backoffice and the frontend are both regular React application. To build them, go to their respective folder and run

$ npm i && npm run build
# or with yarn
$ yarn && yarn build

Usage

The backend can be launched with the marcel command line :

$ marcel api

This will serve the api on the default port 8090.

You should then serve api, backoffice and frontend behind reverse proxy and serve this routes :

  • / : the backoffice (pkg/backoffice/build)
  • /front : the frontend (pkg/frontend/build)
  • /api: the backend (pkg/api)

localhost:8090 by default

Development

To have a working development environment, you have to run this 3 commands in separated terminals :

$ cd pkg/backoffice && yarn && yarn start
$ cd pkg/frontend && yarn && yarn start
$ go build ./cmd/marcel && ./marcel api --secure=false

You can then begin to modify sources. The backend is not compiled in watch mode, so you have to restart it manually. The backoffice and the frontend are live-reloaded.

Another solution is to use the standalone mode if you want a quick launch :

$ go build ./cmd/marcel && ./marcel standalone

(don't forget to save admin password displayed in logs :-))

or the demo mode if you just want to play with it :

$ go build ./cmd/marcel && ./marcel

If you want to explore the bolt database, you can use the tool boltdbweb

$ go install go get github.com/evnix/boltdbweb@latest
$ boltdbweb --db-name=marcel.db --port=<port>[optional] --static-path=<static-path>[optional]

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details