Local Development Setup

This section guides you through installing and running the RDMC prototype on your local development machine. Follow the steps in order to set up the repository, configure the environment, run database migrations, start the server, and access the application.

Clone the Repository

Download the project code from the Git repository:

git clone https://gitlab.gwdg.de/nfdixcs/a1-architecture/rdmc-prototype.git

Cloning the repository is required to obtain the source code before any installation or configuration can begin.

Install Python

Ensure Python is installed on your system. You can download it from the Python Download Page.

Python is the runtime environment required to execute the RDMC project.

Create and Activate a Virtual Environment

Before installing dependencies, create and activate a Python virtual environment:

To create and activate a virtual environment on Linux or macOS, run:

python3 -m venv venv
source venv/bin/activate

A virtual environment isolates project dependencies from the system Python installation, preventing version conflicts.

Install Required Libraries

Install the project dependencies (including development and documentation extras) with:

pip install -e ".[dev,docs]"

Installing required libraries ensures all packages the project depends on are available in the virtual environment.

Create a .env File

Set up your environment variables by creating a .env file in the project root. An example configuration file is available here: .env.example.

The .env file stores sensitive configuration such as database and admin credentials, keeping them out of version control.

Migrate the Database and Run the Project

To set up the database and run the project locally, follow these steps:

  1. Generate migration files:

    python manage.py makemigrations
    

  1. Apply migrations:

    python manage.py migrate
    

    After a successful migration, a file named rdmc.db.sqlite3 is created.

  2. Load demo data (optional):

    To populate the database with sample data, run:

    python manage.py loaddata etc/fixtures/data.json
    

    Note

    Run makemigrations and migrate before loading demo data to ensure the database schema is up to date.

  3. Run the project:

    Start the development server using:

    python manage.py runserver
    

Database migrations create and update the database schema so the application can store and retrieve data correctly.

Access the Application

Once the server is running, open the application in your browser:

Accessing the application verifies that the server started successfully and the installation is complete.