# Overview

## Technology Stack

We have built our back ends primarily using [Python](https://www.python.org/), [Django](https://www.djangoproject.com/), and [Django Rest Framework](https://www.django-rest-framework.org/).

{% hint style="info" %}
We recommend getting familiar with the basics of each technology before contributing to one of our back ends.
{% endhint %}

## Code Repositories

Each service has a back end code repository in the [Ocado Technology](https://github.com/ocadotechnology) GitHub organisation which follows the naming convention:

```
codeforlife-{service}-backend
```

[View](https://github.com/orgs/ocadotechnology/repositories?q=codeforlife-+-backend) our back end repos on GitHub.

### Template

To speed up the process of creating a new back end repo, we created the template repo [codeforlife-template-backend](https://github.com/ocadotechnology/codeforlife-template-backend) which can be used to scaffold a new service's back end repo. Read [here](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) on how to create a repo from a template.

{% hint style="success" %}
After creating a repo from the template, run a case-insensitive search across all files for **replace-me**. Replace these strings with the appropriate value; this will most likely be the service's name.
{% endhint %}

## CI/CD Pipelines

In order to avoid repeating the same pipelines in every back end service, we centrally define the pipelines in our [workspace repo](https://github.com/ocadotechnology/codeforlife-workspace/tree/main/.github/workflows), and reference them in each back end service. In GitHub's terminology, these are referred to as [reusable workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows).

There are 2 main pipelines in each back end service.

### main.yaml

The main pipeline for each back end service which simply reuses the [backend](https://github.com/ocadotechnology/codeforlife-workspace/blob/main/.github/workflows/backend.yaml) pipeline located in the workspace. This pipeline is responsible for testing and deploying a back end service.

You can see an example of this pipeline in the [back end template repo](https://github.com/ocadotechnology/codeforlife-template-backend/blob/development/.github/workflows/main.yaml).

### contributing.yaml

This pipeline is responsible for managing the process of contributing to our code base, such as checking our contributors have signed our contributor agreement, auto-assigning/-unassigning contributors to issues, and more.

You can see an example of this pipeline in the [back end template repo.](https://github.com/ocadotechnology/codeforlife-template-backend/blob/development/.github/workflows/contributing.yaml)

## Python Package

To avoid repeating code across 2 or more back ends, we have created the repo [codeforlife-package-python](https://github.com/ocadotechnology/codeforlife-package-python) which automatically tests and releases new version of the package using [semantic versioning](https://semver.org/). These versioned packages can then be installed into our Python virtual-environments (.venv).

Learn more about our Python package [here](https://code-for-life.gitbook.io/python-package).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codeforlife.education/software-developer-guide/back-end/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
