Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 1.59 KB

mac-native.md

File metadata and controls

72 lines (50 loc) · 1.59 KB

← Back: Getting started

Installing on MacOS (Native)

Requirements

  • Homebrew
    • MacOS package manager
  • uv
    • Backend Python package, project and version manager (replaces pip, poetry, pyenv and virtualenv). It also installs the Python version that Samfundet4 expects (defined in backend/.python-version).
  • yarn
    • Frontend dependency manager

Installing

First clone the Samfundet4 repository.

git clone git@github.com:Samfundet/Samfundet4.git

Install the frontend dependencies

cd Samfundet4/frontend
yarn

Install the backend dependencies

cd ../backend
uv sync

Then apply migrations and run seed script (the seed script adds test data to our database)

uv run python3 manage.py migrate
uv run python3 manage.py seed

Environment files

Both the backend and frontend directories have an .env.example file. In each directory, copy this file to .env and adjust any values as needed. You may for example want to change the default Django superuser username and password (DJANGO_SUPERUSER_USERNAME and DJANGO_SUPERUSER_PASSWORD).

Running

Start backend:

cd backend
uv run python3 manage.py runserver

Start frontend:

cd frontend
yarn start

Post-install

Now that you've got the project up and running, check out the post-install instructions: