-
Notifications
You must be signed in to change notification settings - Fork 10
Installation & Setup
Splines edited this page Jul 4, 2024
·
26 revisions
- See the installation guide here. (Maybe outsource to the wiki?)
- See the testing guide here. (This one has not been checked for some time and might be outdated).
Prerequisites:
- Have git installed.
- Install a working Ruby environment. We recommend rbenv. With that ruby environment, you can then install a Ruby version as described in their Readme.
- Install Bundler as Ruby package manager (these "packages"/libraries are called gems in Ruby).
- Install Node.js in one of its latest versions (LTS). You need this locally for JavaScript linting (among others). Also install Yarn as Node.js package manager.
- Install Docker Desktop as our containerization tool. This is crucial for developing as you don't want to have to setup the database, the mail server, mampf itself etc. manually all the time.
Then MaMpf-specific:
- Clone the MaMpf Git repo locally. If you're working on Windows, we highly recommend to use WSL (with Ubuntu 24 LTS). Make sure to run
wsl --update
in Powershell. For Windows users, you may also like the Windows Terminal - Optional: Install the recommended workspace extensions in VSCode. We highly recommend VSCode as editor. Many settings and convenience features are already pre-populated for you to ease onboarding and working with VSCode and multiple team members use it.
- Install the Node.js packages with yarn:
yarn install
- Install Ruby gems:
bundle install
- There are many commands that you use frequently. We make them easily accessible via the
just
command line runner. To install it, runyarn just-install
in the directory where you installed mampf and where thepackage.json
is located. Do not installjust
viaapt
as the version there might be outdated. After having installed it, reload your current shell. Typejust --version
and it should not fail. Then typejust
and you will see available commands with comments explaining what they do. If you want to updatejust
later on, runyarn just-update
.
To finally start MaMpf locally:
- Make sure you've started Docker Desktop.
- Run
just docker up -d
- Wait a bit, then access
http://localhost:3000/
. You should see the MaMpf login screen 🎉 - In order to login, you need actual users in the database. We have some initial data available with users, and lectures, homework assignments etc. Preseed the database via
just docker up-reseed -d
.
To continue: Get to know more about how we structure code, how to lint Ruby, JavaScript etc. files and how we work in the remaining Wiki pages. Don't hesitate to ask a team member if you're stuck; it happens to all of us.