Getting Started

On this page, you will find instructions on how to set up your coding environment to contribute to the project.

Prerequisites

In order to contribute to the project, you should have the following prerequisites:

  1. Install Git.

  2. Ensure you have Python 3.12 installed or higher. You can check which version you are running by executing the following command in your terminal:

    $ python --version
    
  3. Install UV by following the installation instructions here.

  4. Clone the repository locally by executing the following command:

    $ git clone https://github.com/Loefbijter/loefsys.git
    
  5. Then, open the directory with the cloned repository and execute:

    $ uv install
    
  6. Install all pre-commit hooks with the following command:

    $ pre-commit install  # If pre-commit isn't recognized, use this:
    $ uv run pre-commit install
    
  7. In the root directory, create a .env file and fill it with the necessary environment variables. In Recommended Development Variables, the recommended environment variables for development can be found.

  8. Install Tailwind CLI and execute the following command:

    $ tailwindcss -i loefsys/indexpage/static/input.css -o loefsys/indexpage/static/output.css --watch
    
  9. To populate the database, in the root folder, run the following command:

    $ uv run manage.py makemigrations
    
  10. Then run the following command:

    $ uv run manage.py migrate
    
  11. Finally, you can start the development server in a new terminal with:

    $ uv run manage.py runserver
    
  12. Now, head over to localhost:8000 <localhost:8000> in your browser and you should see the homepage of loefsys, or go to http://localhost:8000/profile/signup/.

Creating a Superuser

  1. If you want to create an admin user for yourself in your local database, you can run the following command:

    $ uv run manage.py createsuperuser
    
    # You will be asked to enter a username, email address, and password. Choose these as you like. You can keep the email address field empty.
    # If you get a prompt that your password is too weak, you can ignore this (only in development of course, we don't do weak passwords in production ;).
    
  2. You just created your first superuser! Head over to http://localhost:8000/profile/login/ and log in with the credentials which you have entered in the previous step.

Available Commands