Skip to content

Development: Getting Started

After reading through the Code Contributions Guide and forking the repo you can start working. This project is developed with ๐Ÿณ docker and as such you will be greatly aided by using docker for development. It's not necessary but it is helpful.

With Docker

Prerequisites

  • Docker
  • docker-compose

You can easily start the development stack by running make docker-dev in the root of the project directory. This will run and build the docker-compose.dev.yml file.

On Windows, the mealie/run.sh file must have LF line endings, or the mealie-api container will fail to start with the error: /app/mealie/run.sh: not found.

Without Docker

Prerequisites

  • Python 3.9+
  • Poetry
  • Nodejs
  • npm

Once the prerequisites are installed you can cd into the project base directory and run make setup to install the python and node dependencies. Once that is complete you can run make backend and make frontend to start the backend and frontend servers.

Make File Reference

Run make help for reference

clean-purge          โš ๏ธ Removes All Developer Data for a fresh server start
clean                ๐Ÿงน Remove all build, test, coverage and Python artifacts
clean-pyc            ๐Ÿงน Remove Python file artifacts
clean-test           ๐Ÿงน Remove test and coverage artifacts
test-all             ๐Ÿงช Check Lint Format and Testing
test                 ๐Ÿงช Run tests quickly with the default Python
lint                 ๐Ÿงบ Check style with flake8
coverage             โ˜‚๏ธ Check code coverage quickly with the default Python
setup                ๐Ÿ— Setup Development Instance
backend              ๐ŸŽฌ Start Mealie Backend Development Server
frontend             ๐ŸŽฌ Start Mealie Frontend Development Server
frontend-build       ๐Ÿ— Build Frontend in frontend/dist
docs                 ๐Ÿ“„ Start Mkdocs Development Server
docker-dev           ๐Ÿณ Build and Start Docker Development Stack
docker-prod          ๐Ÿณ Build and Start Docker Production Stack
code-gen             ๐Ÿค– Run Code-Gen Scripts

Before you Commit!

Before you commit any changes on the backend/python side you'll want to run make format to format all the code with black. make lint to check with flake8, and make test to run pytests. You can also use make test-all to run both lint and test.

Run into another issue? Ask for help on discord

Back to top