diff --git a/.coverage b/.coverage
new file mode 100644
index 0000000000..63c7aa7e89
Binary files /dev/null and b/.coverage differ
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000000..624291b553
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,13 @@
+[run]
+omit =
+ */tests.py
+ */tests/*
+ */test_*.py
+ */tests_*.py
+ */migrations/*
+ */apps.py
+ */__init__.py
+ */admin.py
+ */asgi.py
+ */wsgi.py
+ */settings.py
\ No newline at end of file
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000..038e96f73a
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,26 @@
+node_modules/
+vendor/
+__pycache__/
+*.pyc
+
+.git/
+.gitignore
+.vscode/
+.idea/
+*.swp
+
+dist/
+build/
+*.log
+
+.env
+.env.local
+*.pem
+*.key
+secrets/
+.npmrc
+.pypirc
+kubeconfig
+
+cov_html
+flake8-report
diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml
new file mode 100644
index 0000000000..4d53895f6b
--- /dev/null
+++ b/.github/workflows/django.yml
@@ -0,0 +1,106 @@
+name: OC Lettings site CI/CD
+
+on:
+ push:
+ branches:
+ - '**'
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ ci:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.10"]
+ env:
+ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v3
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install Dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+
+ - name: Run Lint
+ run: |
+ flake8
+
+ - name: Upload flake8 report
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: flake8-report
+ path: flake8-report/
+ if-no-files-found: warn
+ retention-days: 5
+
+ - name: Run Tests
+ run: |
+ pytest
+
+ - name: Upload coverage report
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: cov_html
+ path: cov_html/
+ if-no-files-found: warn
+ retention-days: 5
+
+ deploy:
+ if: github.ref == 'refs/heads/master'
+ runs-on: ubuntu-latest
+ needs: ci
+ environment: production
+ concurrency: production
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v4
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
+ with:
+ images: ${{ secrets.DOCKER_USERNAME }}/oc_lettings_site
+
+ - name: Build and push Docker image
+ id: push
+ uses: docker/build-push-action@v4
+ with:
+ no-cache: true
+ context: .
+ file: ./Dockerfile
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+
+ - name: Install Heroku CLI
+ run: |
+ curl https://cli-assets.heroku.com/install.sh | sh
+
+ - name: Deploy to Heroku
+ uses: akhileshns/heroku-deploy@v3.15.15
+ with:
+ heroku_api_key: ${{secrets.HEROKU_API_KEY}}
+ heroku_app_name: "orange-county-lettings"
+ heroku_email: ${{ secrets.HEROKU_USER_EMAIL }}
+ usedocker: true
+ docker_build_args: |
+ SENTRY_KEY
+ env:
+ SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
diff --git a/.gitignore b/.gitignore
index b4405ebab4..6ed860f88d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,18 @@
+# Temp files
**/__pycache__
*.pyc
+
+# Virtual environment
venv
+env
+env-docs
+
+# Idea
+.idea
+
+# Database
+backup.sqlite3
+oc-lettings-site_old.sqlite3
+
+# .env file
+.env
\ No newline at end of file
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 0000000000..12180598fc
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,22 @@
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version, and other tools you might need
+build:
+ os: ubuntu-24.04
+ tools:
+ python: "3.10"
+
+# Build documentation in the "docs/" directory with Sphinx
+sphinx:
+ configuration: docs/source/conf.py
+
+# Optionally, but recommended,
+# declare the Python requirements required to build your documentation
+# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
+python:
+ install:
+ - requirements: ./requirements-docs.txt
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..ce0e449da9
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+FROM python:3.10-slim
+
+WORKDIR /app
+
+ENV PYTHONDONTWRITEBYTECODE=1
+ENV PYTHONUNBUFFERED=1
+ENV DEBUG=$DEBUG
+
+COPY ./requirements.txt .
+RUN pip install --no-cache-dir -r requirements.txt
+
+COPY . .
+
+RUN python manage.py collectstatic --noinput
+
+EXPOSE 8000
+
+CMD gunicorn oc_lettings_site.wsgi:application --bind 0.0.0.0:${PORT:-8000}
diff --git a/README.md b/README.md
index c8547803f7..06e01a0d0e 100644
--- a/README.md
+++ b/README.md
@@ -1,77 +1,262 @@
-## Résumé
+# Django App - OpenClassrooms Project 13
+**Scale a Django application using a modular architecture**
-Site web d'Orange County Lettings
+---
-## Développement local
+## DESCRIPTION
-### Prérequis
+This project was completed as part of the "Python Developer" path at OpenClassrooms.
-- Compte GitHub avec accès en lecture à ce repository
-- Git CLI
-- SQLite3 CLI
-- Interpréteur Python, version 3.6 ou supérieure
+The goal was to scale a Django application using a modular architecture :
-Dans le reste de la documentation sur le développement local, il est supposé que la commande `python` de votre OS shell exécute l'interpréteur Python ci-dessus (à moins qu'un environnement virtuel ne soit activé).
+- Redesign of the modular architecture in the GitHub repository;
+- Reduction of various technical debts on the project;
+- Addition and deployment of a CI/CD pipeline;
+- Application monitoring and error tracking via Sentry;
+- Creation of the application's technical documentation using Read The Docs and Sphinx.
-### macOS / Linux
+The application must:
-#### Cloner le repository
+- allow the users to view available rentals and all the registered profiles.
-- `cd /path/to/put/project/in`
-- `git clone https://github.com/OpenClassrooms-Student-Center/Python-OC-Lettings-FR.git`
+---
-#### Créer l'environnement virtuel
+## PROJECT STRUCTURE
+
+
+
-- `cd /path/to/Python-OC-Lettings-FR`
-- `python -m venv venv`
-- `apt-get install python3-venv` (Si l'étape précédente comporte des erreurs avec un paquet non trouvé sur Ubuntu)
-- Activer l'environnement `source venv/bin/activate`
-- Confirmer que la commande `python` exécute l'interpréteur Python dans l'environnement virtuel
-`which python`
-- Confirmer que la version de l'interpréteur Python est la version 3.6 ou supérieure `python --version`
-- Confirmer que la commande `pip` exécute l'exécutable pip dans l'environnement virtuel, `which pip`
-- Pour désactiver l'environnement, `deactivate`
+---
-#### Exécuter le site
+## INSTALLATION
-- `cd /path/to/Python-OC-Lettings-FR`
-- `source venv/bin/activate`
-- `pip install --requirement requirements.txt`
-- `python manage.py runserver`
-- Aller sur `http://localhost:8000` dans un navigateur.
-- Confirmer que le site fonctionne et qu'il est possible de naviguer (vous devriez voir plusieurs profils et locations).
+- ### Clone the repository :
-#### Linting
+```
+git clone https://github.com/Tit-Co/OpenClassrooms_Project_13.git
+```
-- `cd /path/to/Python-OC-Lettings-FR`
-- `source venv/bin/activate`
-- `flake8`
+- ### Navigate into the project directory :
+ `cd OpenClassrooms_Project_13`
-#### Tests unitaires
+- ### Create a virtual environment and dependencies :
-- `cd /path/to/Python-OC-Lettings-FR`
-- `source venv/bin/activate`
-- `pytest`
+1. #### With [uv](https://docs.astral.sh/uv/)
-#### Base de données
+ `uv` is an environment and dependencies manager.
+
+ - #### Install environment and dependencies
+
+ `uv sync`
-- `cd /path/to/Python-OC-Lettings-FR`
-- Ouvrir une session shell `sqlite3`
-- Se connecter à la base de données `.open oc-lettings-site.sqlite3`
-- Afficher les tables dans la base de données `.tables`
-- Afficher les colonnes dans le tableau des profils, `pragma table_info(Python-OC-Lettings-FR_profile);`
-- Lancer une requête sur la table des profils, `select user_id, favorite_city from
- Python-OC-Lettings-FR_profile where favorite_city like 'B%';`
-- `.quit` pour quitter
+2. #### With pip
-#### Panel d'administration
+ - #### Install the virtual env :
-- Aller sur `http://localhost:8000/admin`
-- Connectez-vous avec l'utilisateur `admin`, mot de passe `Abc1234!`
+ `python -m venv env`
-### Windows
+ - #### Activate the virtual env :
+ `source env/bin/activate` in Git Bash on Windows or on macOS / Linux
+ Or
+ `env\Scripts\activate` on Windows
-Utilisation de PowerShell, comme ci-dessus sauf :
+3. #### With [Poetry](https://python-poetry.org/docs/)
-- Pour activer l'environnement virtuel, `.\venv\Scripts\Activate.ps1`
-- Remplacer `which ` par `(Get-Command ).Path`
+ `Poetry` is a tool for dependency management and packaging in Python.
+
+ - #### Install the virtual env :
+ `py -3.10 -m venv env`
+
+ - #### Activate the virtual env :
+ `poetry env activate`
+
+- ### Install dependencies
+ 1. #### With [uv](https://docs.astral.sh/uv/)
+ `uv sync` or `uv pip install -r requirements.txt` or `uv add -r requirements.txt`
+
+ 2. #### With pip
+ `pip install -r requirements.txt`
+
+ 3. #### With [Poetry](https://python-poetry.org/docs/)
+ `poetry install`
+
+ (NB : Poetry and uv will read the `pyproject.toml` file to know which dependencies to install)
+
+---
+
+## USAGE
+
+### Launching server
+- Open a terminal
+- Go to project folder - example : `cd oc_lettings_site`
+- Activate the virtual environment as described previously
+- Create environment variables (to avoid to add raw Sentry key into the code)
+ - With Power Shell :
+ ```
+ $env:SENTRY_KEY = "my_key"
+ ```
+ - With Git Bash :
+ ```
+ export SENTRY_KEY = "my_key"
+ ```
+- Launch the local server by typing the command :
+ - `python manage.py runserver`
+
+### Launching the APP
+- With local server, open a web browser and type the urls :
+ - [http://127.0.0.1:8000/](http://127.0.0.1:8000/)
+ - [http://127.0.0.1:8000/admin](http://127.0.0.1:8000/admin)
+ - for the admin panel (username: ```admin```, password: given in the project technical specifications)
+
+- With web server (after deployment), open a web browser and type the url :
+ - your Heroku app url given in the Heroku dashboard, for example the url below :
+[Heroku app](https://orange-county-lettings-7b4c4811f25f.herokuapp.com/)
+
+---
+
+## APP EXAMPLES
+
+Here are some examples of the application execution.
+
+- Home page
+
+
+- **Type the line below in the terminal to generate another report with [flake8-html](https://pypi.org/project/flake8-html/) tool :**
+
+ ` flake8`
+ - The app code has a setup.cfg file that specify Flake 8 options as below :
+ ```
+ format = html
+ htmldir = flake8-report
+ max-line-length = 99
+ exclude = **/migrations/*,env,cov_html
+ ```
+
+---
+
+## TESTS COVERAGE WITH PYTEST
+
+- ### Coverage report
+
+
+
+
+
+- **Type the line below in the terminal to generate another coverage report with pytest**
+
+ `pytest`
+ - The app code has a setup.cfg file that specify Pytest options as below :
+ ```
+ python_files = tests*.py
+ addopts = -v --cov=lettings --cov=profiles --cov=oc_lettings_site --cov-report=html:cov_html
+ ```
+---
+
+## DEPLOYMENT
+- ### Docker
+ - The application is containerized using Docker.
+ - The Dockerfile located at the project root defines the build process:
+ - install Python dependencies
+ - copy the Django project
+ - collect static files
+ - start the application with Gunicorn
+
+ - The container can be executed locally for testing purposes.
+
+- ### CI/CD Pipeline
+ - The CI/CD pipeline is defined in .github/workflows/.
+
+ - Continuous Integration
+
+ - The CI workflow runs on every branch push and includes:
+ - repository checkout
+ - dependency installation
+ - linting
+ - test execution with pytest
+ - coverage and quality report generation
+ - Continuous Deployment
+
+ - Deployment is only triggered on the master branch after successful CI validation.
+
+ - The deployment workflow:
+ - builds the Docker image
+ - pushes the image to Heroku Container Registry
+ - releases the application on Heroku
+
+- ### Heroku Deployment
+ - The application is deployed on Heroku using the container stack.
+
+ - Required environment variables must be configured in the Heroku dashboard:
+
+ - `DEBUG`
+ - `DJANGO_ALLOWED_HOSTS`
+ - `SECRET_KEY`
+
+- ### Monitoring
+ - Application monitoring and exception tracking are handled using Sentry.
+
+ - To enable monitoring:
+ - Create a Sentry account
+ - Generate a project key
+ - Add the key as a GitHub repository secret:
+ - `SENTRY_KEY`
+
+ - The secret is injected into the deployment workflow through GitHub Actions.
+
+## DOCUMENTATION
+- ### ReadTheDocs documentation :
+ - A ReadTheDocs documentation for technical specifications is linked to the repository
+ - The documentation includes :
+ - a project description
+ - project installation instructions
+ - a quick start guide
+ - the technologies and programming languages to be used
+ - a description of the database structure and data models
+ - a description of the programming interfaces
+ - a user guide (with use cases)
+ - application deployment and management procedures
+
+---
+
+
+
+
+[](https://tit-co-oc-lettings-documentation.readthedocs.io/en/latest/)
+
+---
+
+## AUTHOR
+**Name**: Nicolas MARIE
+**Track**: Python Developer – OpenClassrooms
+**Project 13 – Scale a Django application using a modular architecture – May 2026**
diff --git a/config.py b/config.py
new file mode 100644
index 0000000000..097854e7fc
--- /dev/null
+++ b/config.py
@@ -0,0 +1,11 @@
+"""
+Config module for environment variables
+"""
+import os
+
+from dotenv import load_dotenv
+
+
+load_dotenv()
+
+SENTRY_KEY = os.getenv("SENTRY_KEY")
diff --git a/cov_html/.gitignore b/cov_html/.gitignore
new file mode 100644
index 0000000000..23006f1f32
--- /dev/null
+++ b/cov_html/.gitignore
@@ -0,0 +1 @@
+# Created by coverage.py
diff --git a/cov_html/class_index.html b/cov_html/class_index.html
new file mode 100644
index 0000000000..fac060a788
--- /dev/null
+++ b/cov_html/class_index.html
@@ -0,0 +1,231 @@
+
+
+
+
+ Coverage report
+
+
+
+
+
+
+
In the lettings models there are 2 objects with all attributes regarding the address and letting, previously implemented in the first version of the application :
The Django application’s settings.py file is used to configure the application regarding some very important
+environment variables used by the CI/CD pipeline such as “DEBUG” and “DJANGO_ALLOWED_HOSTS” (the latter must be set on
+your Heroku profile) and regarding the static files used by the application’s front-end.
If you’re familiar with Django you’ll know what to do. If you’re just getting started with a new Django project then you’ll need add the following to the bottom of your settings.py file:
The WhiteNoise library has to be installed before if not already done.
+Please edit your settings.py file and add WhiteNoise to the MIDDLEWARE list.
+The WhiteNoise middleware should be placed directly after the Django SecurityMiddleware (if you are using it) and before all other middleware:
WhiteNoise comes with a storage backend which compresses your files and hashes them to unique names, so they can safely be cached forever. To use it, set it as your staticfiles storage backend in your settings file:
A Dockerfile in the repository root defines the process for building an image of the application and its dependencies
+as a Docker container. Here are the main steps in this image building :
+
+
Copy the dependencies from the requirements.txt file and install them.
+
Retrieve the static files of the Django application.
+
Run Gunicorn (a library required for deployment on Heroku) on the specified application (for example, oc_lettings_site.wsgi:application), and the specified host and port.
In order to use correctly this Django web application, you must define some secrets in your Git platform secrets section.
+Those secrets are used in the django.yml file that describes the CI/CD pipeline.
Once the GitHub actions are successfully completed, the application is deployed as a web service. Please check the
+application’s Heroku URL or click the “View application” button in your Heroku account to view the web application.
+
If the GitHub actions failed, please review the logs on GitHub or in Heroku, fix the errors, and try the deployment
+again.
Once the Gitlab CI/CD is successfully completed, the application is deployed as a web service. Please check the
+application’s Heroku URL or click the “View application” button in your Heroku account to view the web application.
+
If the Gitlab CI/CD failed, please review the logs on the platform or in Heroku, fix the errors, and try the deployment
+again.
In this project, the CI/CD pipeline uses the Sentry SDK for exceptions and logs monitoring.
+
You will need a Sentry account to run the application correctly. Therefore, please register on the Sentry website
+if you don’t already have one.
+
Another step: Before using the deployment pipeline, you must define a secret or variable into your Git platform for the Sentry key, required to link
+the application to your Sentry account. Please see the “Secrets” subsection above.
Example :
+A HTTP 400 error usually indicates that the Heroku domain is missing from DJANGO_ALLOWED_HOSTS, environment variable
+defines in Heroku app.
Orange County Lettings is a startup in the real estate rental sector. The startup is currently expanding rapidly in the
+United States.
+The Orange County Lettings teams developed the
+OC_Letting_Site web application and the new scaled
+version has just been released.
You can use the index.rst as an entry point for the documentation content. Please use reStructuredText language in order to add content.
+If you need help, you can check the url below to see reStructuredText help documentation.
In all views, database access is achieved through an SQL query applied on the required model. The primary use case
+involves calling the methods ‘objects.all()’ or objects.get() as shown below for example :
The Orange County Lettings application uses a CI/CD pipeline (detailed in deployment section) that automatically runs tests during the continuous integration task.
+
This pipeline uses a setup.cfg file containing the test command that generates a new report after each commit and push to your Git platform.
The Orange County Lettings application uses a CI/CD pipeline (detailed in deployment section) that automatically runs Flake 8 linter during the continuous integration task.
+
This pipeline uses a setup.cfg file containing the Flake 8 command to generate a new report after each commit and push to your Git platform.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/build/html/quick_start.html b/docs/build/html/quick_start.html
new file mode 100644
index 0000000000..f403c5a465
--- /dev/null
+++ b/docs/build/html/quick_start.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+ Quick start guide — Orange County Lettings 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Please follow the procedure described in deployment section regarding the GitHub Actions or Gitlab CI/CD workflow, Docker containerization
+and automatic deployment.
You also need to specify all required environment variables used by the application in your Heroku app.
+Please follow the procedure detailed in the Heroku sub-section in deployment section.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/build/html/search.html b/docs/build/html/search.html
new file mode 100644
index 0000000000..fea0ef27c2
--- /dev/null
+++ b/docs/build/html/search.html
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+ Search — Orange County Lettings 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
In the lettings page or profiles page, click on the “Home” button
+
The application displays the home page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644
index 0000000000..dc1312ab09
--- /dev/null
+++ b/docs/make.bat
@@ -0,0 +1,35 @@
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set SOURCEDIR=source
+set BUILDDIR=build
+
+%SPHINXBUILD% >NUL 2>NUL
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.https://www.sphinx-doc.org/
+ exit /b 1
+)
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/docs/screenshots/cov_report_1_screenshot.png b/docs/screenshots/cov_report_1_screenshot.png
new file mode 100644
index 0000000000..8da9ced1d2
Binary files /dev/null and b/docs/screenshots/cov_report_1_screenshot.png differ
diff --git a/docs/screenshots/cov_report_2_screenshot.png b/docs/screenshots/cov_report_2_screenshot.png
new file mode 100644
index 0000000000..58c9a2c22e
Binary files /dev/null and b/docs/screenshots/cov_report_2_screenshot.png differ
diff --git a/docs/screenshots/flake8_report_screenshot.png b/docs/screenshots/flake8_report_screenshot.png
new file mode 100644
index 0000000000..3736cee381
Binary files /dev/null and b/docs/screenshots/flake8_report_screenshot.png differ
diff --git a/docs/screenshots/home_page_screenshot.png b/docs/screenshots/home_page_screenshot.png
new file mode 100644
index 0000000000..798f0950ee
Binary files /dev/null and b/docs/screenshots/home_page_screenshot.png differ
diff --git a/docs/screenshots/letting_details_screenshot.png b/docs/screenshots/letting_details_screenshot.png
new file mode 100644
index 0000000000..ab0dbd83bb
Binary files /dev/null and b/docs/screenshots/letting_details_screenshot.png differ
diff --git a/docs/screenshots/lettings_list_screenshot.png b/docs/screenshots/lettings_list_screenshot.png
new file mode 100644
index 0000000000..21f41d766f
Binary files /dev/null and b/docs/screenshots/lettings_list_screenshot.png differ
diff --git a/docs/screenshots/profile_details_screenshot.png b/docs/screenshots/profile_details_screenshot.png
new file mode 100644
index 0000000000..57ca31328d
Binary files /dev/null and b/docs/screenshots/profile_details_screenshot.png differ
diff --git a/docs/screenshots/profiles_list_screenshot.png b/docs/screenshots/profiles_list_screenshot.png
new file mode 100644
index 0000000000..835b72dbdd
Binary files /dev/null and b/docs/screenshots/profiles_list_screenshot.png differ
diff --git a/docs/screenshots/structure_screenshot.png b/docs/screenshots/structure_screenshot.png
new file mode 100644
index 0000000000..378ffb758e
Binary files /dev/null and b/docs/screenshots/structure_screenshot.png differ
diff --git a/docs/source/_static/cov_report_1_screenshot.png b/docs/source/_static/cov_report_1_screenshot.png
new file mode 100644
index 0000000000..8da9ced1d2
Binary files /dev/null and b/docs/source/_static/cov_report_1_screenshot.png differ
diff --git a/docs/source/_static/database_tables_1_screenshot.png b/docs/source/_static/database_tables_1_screenshot.png
new file mode 100644
index 0000000000..0efa8af694
Binary files /dev/null and b/docs/source/_static/database_tables_1_screenshot.png differ
diff --git a/docs/source/_static/home_page_screenshot.png b/docs/source/_static/home_page_screenshot.png
new file mode 100644
index 0000000000..798f0950ee
Binary files /dev/null and b/docs/source/_static/home_page_screenshot.png differ
diff --git a/docs/source/_static/letting_404_error_screenshot.png b/docs/source/_static/letting_404_error_screenshot.png
new file mode 100644
index 0000000000..686e8aa997
Binary files /dev/null and b/docs/source/_static/letting_404_error_screenshot.png differ
diff --git a/docs/source/_static/letting_details_screenshot.png b/docs/source/_static/letting_details_screenshot.png
new file mode 100644
index 0000000000..ab0dbd83bb
Binary files /dev/null and b/docs/source/_static/letting_details_screenshot.png differ
diff --git a/docs/source/_static/lettings_list_screenshot.png b/docs/source/_static/lettings_list_screenshot.png
new file mode 100644
index 0000000000..21f41d766f
Binary files /dev/null and b/docs/source/_static/lettings_list_screenshot.png differ
diff --git a/docs/source/_static/logo.png b/docs/source/_static/logo.png
new file mode 100644
index 0000000000..47ecb49b49
Binary files /dev/null and b/docs/source/_static/logo.png differ
diff --git a/docs/source/_static/profile_details_screenshot.png b/docs/source/_static/profile_details_screenshot.png
new file mode 100644
index 0000000000..57ca31328d
Binary files /dev/null and b/docs/source/_static/profile_details_screenshot.png differ
diff --git a/docs/source/_static/profiles_list_screenshot.png b/docs/source/_static/profiles_list_screenshot.png
new file mode 100644
index 0000000000..835b72dbdd
Binary files /dev/null and b/docs/source/_static/profiles_list_screenshot.png differ
diff --git a/docs/source/_static/structure_screenshot.png b/docs/source/_static/structure_screenshot.png
new file mode 100644
index 0000000000..378ffb758e
Binary files /dev/null and b/docs/source/_static/structure_screenshot.png differ
diff --git a/docs/source/conf.py b/docs/source/conf.py
new file mode 100644
index 0000000000..71648e27d9
--- /dev/null
+++ b/docs/source/conf.py
@@ -0,0 +1,28 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# For the full list of built-in configuration values, see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Project information -----------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
+
+project = 'Orange County Lettings'
+copyright = '2026, Nicolas MARIE'
+author = 'Nicolas MARIE'
+release = '1.0'
+
+# -- General configuration ---------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
+
+extensions = []
+
+templates_path = ['_templates']
+exclude_patterns = []
+
+# -- Options for HTML output -------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
+
+html_theme = 'alabaster'
+html_static_path = ['_static']
+
+html_theme = "sphinx_rtd_theme"
diff --git a/docs/source/db_structure_and_models.rst b/docs/source/db_structure_and_models.rst
new file mode 100644
index 0000000000..a5533b545b
--- /dev/null
+++ b/docs/source/db_structure_and_models.rst
@@ -0,0 +1,67 @@
+Database structure and models
+=============================
+
+The code has been split in 3 different apps vs only one in the old version :
+
+* lettings
+* oc_lettings_site
+* profiles
+
+Each new app has 5 main modules as below :
+
+* admin.py for the representation in admin page
+* apps.py for the app namespace
+* models.py for the models used by the database (except for oc_lettings_app)
+* urls.py for the urls
+* views.py for the views
+
+Lettings models
+---------------
+In the lettings models there are 2 objects with all attributes regarding the address and letting, previously implemented in the first version of the application :
+
+* Address object
+
+================ ====================
+Attribute Type
+================ ====================
+number PositiveIntegerField
+street CharField
+city CharField
+state CharField
+zip_code PositiveIntegerField
+country_iso_code CharField
+================ ====================
+
+* Letting object
+
+========= ========================
+Attribute Type
+========= ========================
+title CharField
+address OneToOneField to Address
+========= ========================
+
+Oc_lettings_site models
+-----------------------
+No models are currently available in this application in its new version.
+
+This Django app serves only as an entry point of the web application and for Django settings.
+
+Profiles models
+---------------
+In the profiles models, there is 1 object with all attributes regarding the profiles previously implemented in the first version of the application :
+
+* Profile object
+
+============= =====================
+Attribute Type
+============= =====================
+user OneToOneField to User
+favorite_city CharField
+============= =====================
+
+Database admin page
+-------------------
+Here is a screenshot from the database admin page :
+
+.. image:: _static/database_tables_1_screenshot.png
diff --git a/docs/source/deployment.rst b/docs/source/deployment.rst
new file mode 100644
index 0000000000..52b1d823f0
--- /dev/null
+++ b/docs/source/deployment.rst
@@ -0,0 +1,266 @@
+Deployment
+==========
+
+Django settings
+---------------
+The Django application's `settings.py` file is used to configure the application regarding some very important
+environment variables used by the CI/CD pipeline such as "DEBUG" and "DJANGO_ALLOWED_HOSTS" (the latter must be set on
+your Heroku profile) and regarding the static files used by the application's front-end.
+
+Static files and WhiteNoise
+---------------------------
+
+You can find the detailed specific configuration of WhiteNoise library by checking the url below : `WhiteNoise `_
+
+Configuration
+^^^^^^^^^^^^^
+If you’re familiar with Django you’ll know what to do. If you’re just getting started with a new Django project then you’ll need add the following to the bottom of your settings.py file:
+
+.. code::
+
+ STATIC_ROOT = BASE_DIR / "staticfiles"
+
+Enable WhiteNoise
+^^^^^^^^^^^^^^^^^
+The WhiteNoise library has to be installed before if not already done.
+Please edit your `settings.py` file and add WhiteNoise to the MIDDLEWARE list.
+The WhiteNoise middleware should be placed directly after the Django SecurityMiddleware (if you are using it) and before all other middleware:
+
+.. code::
+
+ MIDDLEWARE = [
+ # ...
+ "django.middleware.security.SecurityMiddleware",
+ "whitenoise.middleware.WhiteNoiseMiddleware",
+ # ...
+ ]
+
+Add compression and caching support
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+WhiteNoise comes with a storage backend which compresses your files and hashes them to unique names, so they can safely be cached forever. To use it, set it as your staticfiles storage backend in your settings file:
+
+.. code::
+
+ STORAGES = {
+ # ...
+ "staticfiles": {
+ "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
+ },
+ }
+
+Docker containerization
+-----------------------
+A Dockerfile in the repository root defines the process for building an image of the application and its dependencies
+as a Docker container. Here are the main steps in this image building :
+
+* Copy the dependencies from the `requirements.txt` file and install them.
+
+* Retrieve the static files of the Django application.
+
+* Run Gunicorn (a library required for deployment on Heroku) on the specified application (for example, `oc_lettings_site.wsgi:application`), and the specified host and port.
+
+CI/CD pipeline
+--------------
+GitHub Actions is the CI/CD solution provided by GitHub, while GitLab uses GitLab CI/CD pipelines.
+
+The `.yml` file structures the CI/CD pipelines and it is used by GitHub for creating GitHub Actions or used by Gitlab for creating CI/CD workflow.
+
+CI pipeline
+^^^^^^^^^^^
+The continuous integration (CI) pipeline ensures the quality of the code.
+The CI pipeline defined in the "ci" job runs as follows:
+
+* Checkout on the branch from which the push was performed
+
+* Installing the project's dependencies
+
+* Running linters (quality step)
+
+* Running tests with the `pytest` command (testing step)
+
+* Finally, loading the quality and test coverage reports
+
+CD pipeline
+^^^^^^^^^^^
+The Continuous Delivery (CD) pipeline ensures the delivery and deployment of the app.
+The CD pipeline defined in the "deploy" job works as follows:
+
+* Requires the successful execution of the previous continuous integration (CI) job (described earlier) on the master branch.
+
+* Checkout on the master branch. If the commit & push are performed from another branch, the CD pipeline is not executed.
+
+* The Docker image is initialized.
+
+* The Docker image is built and pushed (containerization process).
+
+* The Heroku command-line interface (CLI) is installed.
+
+* Deployment to Heroku.
+
+Secrets/variables
+-----------------
+In order to use correctly this Django web application, you must define some secrets in your Git platform secrets section.
+Those secrets are used in the django.yml file that describes the CI/CD pipeline.
+
+GitHub
+^^^^^^
+
+Here's how you can add a secret on GitHub :
+
+* Go to your GitHub profile and open the project repository.
+
+* Click on "Settings", then on the "Secrets & Variables" section, and finally on the "Actions" button in the dropdown menu.
+
+* Next, click on "New Repository Secret" and enter the secret name and the secret value. Then confirm. The new secret is added to the repository.
+
+Gitlab
+^^^^^^
+
+Here's how you can add a secret variable on GitLab :
+
+* Go to your GitLab profile and open the project repository.
+
+* In the left sidebar, click on "Settings" and then on "CI/CD".
+
+* Expand the "Variables" section.
+
+* Click on "Add variable".
+
+* Enter the variable key (name) and the variable value, then click on "Add variable" to save it.
+
+* The new variable is now available in the GitLab CI/CD pipeline.
+
+Required secrets/variables
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Here are all the required secrets/variables :
+
+* DOCKER_PASSWORD
+
+* DOCKER_USERNAME
+
+* HEROKU_API_KEY
+
+* HEROKU_USER_EMAIL
+
+* SENTRY_KEY
+
+When created, you can then use this secret with the variable `secrets` as shown below :
+
+.. code::
+
+ ${{ secrets. }}
+
+All secrets are used according to this format in the django.yml file which describes the CI/CD pipeline.
+
+The variable attribute name and the secret name has to be rigorously identical.
+
+Heroku
+------
+
+GitHub
+^^^^^^
+
+Once the GitHub actions are successfully completed, the application is deployed as a web service. Please check the
+application's Heroku URL or click the "View application" button in your Heroku account to view the web application.
+
+If the GitHub actions failed, please review the logs on GitHub or in Heroku, fix the errors, and try the deployment
+again.
+
+Gitlab
+^^^^^^
+
+Once the Gitlab CI/CD is successfully completed, the application is deployed as a web service. Please check the
+application's Heroku URL or click the "View application" button in your Heroku account to view the web application.
+
+If the Gitlab CI/CD failed, please review the logs on the platform or in Heroku, fix the errors, and try the deployment
+again.
+
+Environment variables
+^^^^^^^^^^^^^^^^^^^^^
+The application needs some environment variables to work well. You must specify the variables into your Heroku app.
+Please follow the steps below :
+
+* Go into your app in Heroku dashboard
+
+* Go to settings section
+
+* scroll down to "config vars" sub-section
+
+* click on the "Reveal Config Vars" button to reveal the variables if some are already existing
+
+* For each environment variable needed by the project, enter the "key" and the "value", and validate by clicking the "add' button
+
+Hera are all the variables regarding Django you need to provide :
+
+==================== =================================================================
+Key Value
+==================== =================================================================
+DEBUG False (required for production deployment, True otherwise in dev)
+DJANGO_ALLOWED_HOSTS localhost,127.0.0.1,.herokuapp.com
+SECRET_KEY
+==================== =================================================================
+
+Monitoring with Sentry
+----------------------
+In this project, the CI/CD pipeline uses the Sentry SDK for exceptions and logs monitoring.
+
+You will need a Sentry account to run the application correctly. Therefore, please register on the Sentry website
+if you don't already have one.
+
+Another step: Before using the deployment pipeline, you must define a secret or variable into your Git platform for the Sentry key, required to link
+the application to your Sentry account. Please see the "Secrets" subsection above.
+
+Troubleshooting
+---------------
+In this section we focus on some common issues that arise in this kind of pipeline.
+
+Heroku application crashes immediately
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Here are the possible causes :
+
+* bad port
+
+* non-used port
+
+* bad Gunicorn configuration
+
+
+Example :
+If the application crashes immediately after deployment, ensure Gunicorn binds to the environment PORT variable:
+
+.. code:: bash
+
+ gunicorn oc_lettings_site.wsgi:application --bind 0.0.0.0:$PORT
+
+ALLOWED_HOSTS errors
+^^^^^^^^^^^^^^^^^^^^
+Example :
+A HTTP 400 error usually indicates that the Heroku domain is missing from DJANGO_ALLOWED_HOSTS, environment variable
+defines in Heroku app.
+
+.. code:: bash
+
+ DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,my-app.herokuapp.com
+
+Static files not loading
+^^^^^^^^^^^^^^^^^^^^^^^^
+Here are the possible causes :
+
+* collectstatic not implemented
+
+* WhiteNoise not used
+
+* STATIC_ROOT not defined in Django app settings.py file
+
+Docker build fails
+^^^^^^^^^^^^^^^^^^
+Here are the possible causes :
+
+* secrets missing
+
+* invalid Heroku API key
+
+* bad Docker login
+
+* release failed
diff --git a/docs/source/description.rst b/docs/source/description.rst
new file mode 100644
index 0000000000..2cfcd961ff
--- /dev/null
+++ b/docs/source/description.rst
@@ -0,0 +1,50 @@
+
+Description
+===========
+Orange County Lettings is a startup in the real estate rental sector. The startup is currently expanding rapidly in the
+United States.
+The Orange County Lettings teams developed the
+`OC_Letting_Site `_ web application and the new scaled
+version has just been released.
+
+Summary
+-------
+
+The new version has been scaled using a modular architecture.
+
+What we have done :
+
+* Redesign of the modular architecture in the Git platform repository
+* Reduction of various technical debts on the project
+* Addition and deployment of a CI/CD pipeline
+* Application monitoring and error tracking via Sentry
+* Creation of the application's technical documentation using Read The Docs and Sphinx
+
+The application must :
+
+* allow the users to view available rentals and all the registered profiles.
+
+Architecture
+------------
+
+Overview
+^^^^^^^^
+.. image:: _static/structure_screenshot.png
+
+Modular architecture
+^^^^^^^^^^^^^^^^^^^^
+The architecture has been optimized by reducing the technical debts from the previous monolithic design.
+
+The code has been :
+
+* reorganized into several separate Django applications
+* reorganized into application-specific HTML templates folders
+
+This optimization has improved the flexibility, maintainability, and scalability of the code.
+
+Finally, each app has its own :
+
+* views module
+* urls module
+* templates folder
+* test folder with several test modules for models, views and urls
diff --git a/docs/source/documentation.rst b/docs/source/documentation.rst
new file mode 100644
index 0000000000..3a5d4e4d9a
--- /dev/null
+++ b/docs/source/documentation.rst
@@ -0,0 +1,62 @@
+Documentation
+=============
+
+Environment configuration
+-------------------------
+In the `env-docs` virtual environment, you must install Sphinx library if not already installed as explained in the :doc:`installation section `.
+
+.. code::
+
+ pip install sphinx
+
+.. code::
+
+ poetry add sphinx
+
+.. code::
+
+ uv add sphinx
+
+Documentation project initialization
+------------------------------------
+Please create a "docs" folder or use one if existing and type in your terminal the command below to initialize the documentation :
+
+.. code::
+
+ sphinx-quickstart
+
+You can choose default options and validate. It will create all required files used by ReadTheDocs documentation.
+
+Documentation editing
+---------------------
+You can use the index.rst as an entry point for the documentation content. Please use reStructuredText language in order to add content.
+If you need help, you can check the url below to see `reStructuredText help documentation `_.
+
+Documentation local building
+----------------------------
+To generate your documentation locally while editing content, you must type in your terminal the command below :
+
+.. code::
+
+ .\docs\make.bat html
+
+ReadTheDocs configuration
+-------------------------
+Here are the steps to follow if you want to generate another documentation in your account into the ReadTheDocs website :
+
+* First, you need to create an account on the ReadTheDocs website if you don't already have one.
+
+* Then create a new documentation project and link it to your Git platform :
+ * Click on "Import a repository" and then "Connect to GitHub/GitLab"
+ * Click on "+" button to finalise the importation
+ * The two accounts are synchronized
+
+* Configure the options of the ReadTheDocs projects
+
+* Configure the option for the automatic building and release after each push & commit on GitHub/Gitlab
+
+* Finally, ReadTheDocs will detect each modification and will rebuild the documentation online
+
+ReadTheDocs documentation access
+--------------------------------
+ReadTheDocs provides an URL to your documentation online. You can include that URL in your repository `readme.md` file.
diff --git a/docs/source/index.rst b/docs/source/index.rst
new file mode 100644
index 0000000000..5d289d9824
--- /dev/null
+++ b/docs/source/index.rst
@@ -0,0 +1,29 @@
+.. Orange County Lettings documentation master file, created by
+ sphinx-quickstart on Tue May 26 16:37:54 2026.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+===============================================
+Welcome to Orange County Lettings documentation
+===============================================
+
+.. image:: _static/logo.png
+
+-------------------------------------------------------------------
+By `Nicolas MARIE `_ - June 2026 - v1.0
+-------------------------------------------------------------------
+
+.. toctree::
+ :maxdepth: 2
+
+ description
+ stack
+ installation
+ quick_start
+ db_structure_and_models
+ quality
+ programing_interface
+ use_cases
+ deployment
+ documentation
+ links
diff --git a/docs/source/installation.rst b/docs/source/installation.rst
new file mode 100644
index 0000000000..b648d8143f
--- /dev/null
+++ b/docs/source/installation.rst
@@ -0,0 +1,119 @@
+Installation
+============
+
+Python version
+--------------
+
+For this new app version, the Python version is the same : Python 3.10
+
+Virtual environments
+--------------------
+In this Django application we use 2 virtual environments as below :
+
+* One for the application environment (env)
+
+* One for the ReadTheDocs documentation environment (env-docs)
+
+Libraries
+---------
+The libraries used are for both environments :
+
+App env
+^^^^^^^
+* django (==3.0)
+
+* flake8 (==3.7.0)
+
+* flake8-html (==0.4.3)
+
+* pytest (==9.0.3)
+
+* pytest-django (==4.12.0)
+
+* pytest-cov (==7.1.0)
+
+* six (==1.17.0)
+
+* sentry-sdk (>=2.60.0,<3.0.0)
+
+* python-dotenv (>=1.2.2,<2.0.0)
+
+* gunicorn (>=26.0.0,<27.0.0)
+
+* whitenoise (>=6.12.0,<7.0.0)
+
+Documentation env
+^^^^^^^^^^^^^^^^^
+* Sphinx (==8.1.3)
+
+* sphinx_rtd_theme (==3.1.0)
+
+Dependency manager and installation
+-----------------------------------
+
+Pip
+^^^
+
+First, create the virtual environment :
+.. code::
+
+ py -3.10 -m venv env
+
+Then, activate the virtual env :
+
+* in Git Bash on Windows or on macOS / Linux
+
+.. code::
+
+ source env/bin/activate
+
+
+* on Windows
+
+.. code::
+
+ env\Scripts\activate
+
+To install dependencies, type :
+
+.. code::
+
+ pip install -r requirements.txt
+
+Uv
+^^
+
+UV is an environment and dependencies manager.
+
+To install environment and dependencies, type :
+
+.. code::
+
+ uv sync
+
+UV will use the .toml file to know which Python version and dependencies to install.
+
+Poetry
+^^^^^^
+
+POETRY is an environment and dependencies manager.
+
+First, install the virtual environment :
+
+.. code::
+
+ py -3.10 -m venv env
+
+Then, activate the virtual env :
+
+.. code::
+
+ poetry env activate
+
+To install dependencies, type :
+
+.. code::
+
+ poetry install
+
+POETRY will use the .toml file to know which dependencies to install.
diff --git a/docs/source/links.rst b/docs/source/links.rst
new file mode 100644
index 0000000000..ab41e02e90
--- /dev/null
+++ b/docs/source/links.rst
@@ -0,0 +1,23 @@
+Links
+=====
+You can find more details on each library used in the Orange County Lettings application by checking the links below :
+
+* `Django `_
+
+* `WhiteNoise `_
+
+* `Flake8 `_
+
+* `Flake8-html `_
+
+* `Pytest `_
+
+* `Pytest-cov `_
+
+* `Pytest-django `_
+
+* `Sentry-sdk `_
+
+* `Docker `_
+
+* `Heroku with Docker `_
diff --git a/docs/source/programing_interface.rst b/docs/source/programing_interface.rst
new file mode 100644
index 0000000000..f48e4b8bc8
--- /dev/null
+++ b/docs/source/programing_interface.rst
@@ -0,0 +1,73 @@
+Programing Interface description
+================================
+
+URL routes
+----------
+Here are all the routes for each Django app :
+
+`oc_lettings_site` app
+^^^^^^^^^^^^^^^^^^^^^^
+
+========== =============
+Route Description
+========== =============
+/ Home page
+/lettings/ Lettings list
+/profiles/ Profiles list
+/admin/ Admin page
+========== =============
+
+`lettings` app
+^^^^^^^^^^^^^^
+
+=========================== ===================
+Route Description
+=========================== ===================
+/lettings/ Lettings index page
+/lettings// Letting detail
+=========================== ===================
+
+`profiles` app
+^^^^^^^^^^^^^^
+
+=========================== ===================
+Route Description
+=========================== ===================
+/profiles/ Profiles index page
+/profiles// Profile detail
+=========================== ===================
+
+Django views
+------------
+Each app has its views.py module according to the routes previously described.
+
+================ ======== =====================
+Django App View Template rendered
+================ ======== =====================
+oc_lettings_site index index.html
+lettings index lettings/index.html
+lettings lettings lettings/letting.html
+profiles index profiles/index.html
+profiles profiles lettings/profile.html
+================ ======== =====================
+
+In addition, in each application view, we check if an error has occurred (404 or 500) and, if an error occurs, the view renders an error template.
+
+Templates rendering
+-------------------
+Each view renders templates with Django render method.
+
+Each Django app has a template folder with one template for each view previously described and one for each possible error.
+
+Database interaction
+--------------------
+In all views, database access is achieved through an SQL query applied on the required model. The primary use case
+involves calling the methods 'objects.all()' or `objects.get()` as shown below for example :
+
+.. code::
+
+ lettings_list = Letting.objects.all()
+
+.. code::
+
+ profile = Profile.objects.get(user__username=username)
diff --git a/docs/source/quality.rst b/docs/source/quality.rst
new file mode 100644
index 0000000000..eaf3fec098
--- /dev/null
+++ b/docs/source/quality.rst
@@ -0,0 +1,90 @@
+Quality
+=======
+
+Testing
+-------
+This Django project uses the Pytest library for testing the application.
+
+Each Django app has a testing package with commonly 3 testing modules (for models, urls, and views) and a test fixture module `conftest.py`.
+
+We guarantee 100% test coverage for the Orange County Lettings application in its new version.
+
+.. image:: _static/cov_report_1_screenshot.png
+
+Environment configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^
+In the `env` virtual environment, you must install Pytest library if not already installed as explained in the :doc:`installation section `.
+
+.. code::
+
+ pip install pytest
+
+.. code::
+
+ poetry add pytest
+
+.. code::
+
+ uv add pytest
+
+Tests coverage
+^^^^^^^^^^^^^^
+To complete the test process, the `pytest-cov` library is used to generate a coverage report.
+
+To generate another report, you must install `pytest-cov` before.
+Please use the same procedure as above for `pytest`.
+
+Tests local execution
+^^^^^^^^^^^^^^^^^^^^^
+To generate another test process in your terminal, please type the line below :
+
+.. code::
+
+ pytest -v --cov=lettings --cov=profiles --cov=oc_lettings_site --cov-report=html:cov_html
+
+Automatic tests execution
+^^^^^^^^^^^^^^^^^^^^^^^^^
+The Orange County Lettings application uses a CI/CD pipeline (detailed in :doc:`deployment section `) that automatically runs tests during the continuous integration task.
+
+This pipeline uses a `setup.cfg` file containing the test command that generates a new report after each commit and push to your Git platform.
+
+Linting
+-------
+This Django project uses the Flake 8 linter that ensures you to implement an always-standardized code and according to the PEP 8 convention.
+
+Environment configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^
+In the `env` virtual environment, you must install Flake 8 library if not already installed as explained in the :doc:`installation section `.
+
+.. code::
+
+ pip install flake8
+
+.. code::
+
+ poetry add flake8
+
+.. code::
+
+ uv add flake8
+
+Flake 8 report
+^^^^^^^^^^^^^^
+To complete the flake 8 process by adding an HTML report, the `flake8-html` library is used to.
+
+To generate another report, you must install `flake8-html` before.
+Please use the same procedure as above for `flake8`.
+
+Flake 8 local execution
+^^^^^^^^^^^^^^^^^^^^^^^
+To generate another flake 8 linting process in your terminal, please type the line below :
+
+.. code::
+
+ flake8 --format=html --htmldir=flake8-report --max-line-length=119 --extend-exclude="env/, env-docs/"
+
+Automatic linting
+^^^^^^^^^^^^^^^^^
+The Orange County Lettings application uses a CI/CD pipeline (detailed in :doc:`deployment section `) that automatically runs Flake 8 linter during the continuous integration task.
+
+This pipeline uses a `setup.cfg` file containing the Flake 8 command to generate a new report after each commit and push to your Git platform.
diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst
new file mode 100644
index 0000000000..4890cf8918
--- /dev/null
+++ b/docs/source/quick_start.rst
@@ -0,0 +1,69 @@
+Quick start guide
+=================
+
+Launching server
+----------------
+
+Local server
+^^^^^^^^^^^^
+Please follow the steps as below :
+
+* Open a terminal
+* Go to project folder - example :
+
+ .. code::
+
+ cd oc_lettings_site
+
+* Activate the virtual environment as described previously
+* Create environment variables (to avoid to add raw Sentry key into the code) :
+
+ * With Power Shell :
+
+ .. code::
+
+ $env:SENTRY_KEY = "your_key"
+
+ * With Git Bash :
+
+ .. code::
+
+ export SENTRY_KEY = "your_key"
+
+* Launch the local server by typing the command :
+
+ .. code::
+
+ python manage.py runserver
+
+Web server
+^^^^^^^^^^
+
+Please follow the procedure described in :doc:`deployment section ` regarding the GitHub Actions or Gitlab CI/CD workflow, Docker containerization
+and automatic deployment.
+
+Launching the APP
+-----------------
+
+Please follow the steps as below :
+
+* With local server, open a web browser and type the urls :
+
+ .. code::
+
+ http://127.0.0.1:8000/
+
+ .. code::
+
+ http://127.0.0.1:8000/admin
+
+ for the admin panel (username: `admin`, password: given in the project technical specifications)
+
+* With web server (after deployment), open a web browser and type the url :
+
+ * Your Heroku app url given in the Heroku dashboard, for example the url below :
+
+ `Heroku app url example `_
+
+You also need to specify all required environment variables used by the application in your Heroku app.
+Please follow the procedure detailed in the Heroku sub-section in :doc:`deployment section `.
diff --git a/docs/source/stack.rst b/docs/source/stack.rst
new file mode 100644
index 0000000000..a6f92d5ec4
--- /dev/null
+++ b/docs/source/stack.rst
@@ -0,0 +1,11 @@
+Stack
+=====
+The stack used for developing Orange County Lettings new version is as below :
+
+* Python 3.10 and some libraries (:doc:`see installation section `) for app code
+* Pytest library for testing
+* SQLite database
+* Docker for image containerization
+* Heroku (and Gunicorn library) for web deployment
+* Sentry for logs and exceptions monitoring
+* ReadTheDocs for the application documentation
diff --git a/docs/source/use_cases.rst b/docs/source/use_cases.rst
new file mode 100644
index 0000000000..4aca5b3224
--- /dev/null
+++ b/docs/source/use_cases.rst
@@ -0,0 +1,68 @@
+User guide with use cases
+=========================
+
+Quick overview
+--------------
+Orange County Lettings allows the user to browse available rentals and all the registered profiles.
+
+The user has access to lettings and profiles lists, and can display a letting or a profile detail by id or username.
+
+Example of main use cases
+-------------------------
+
+Home page
+^^^^^^^^^
+.. image:: _static/home_page_screenshot.png
+
+Lettings list page
+^^^^^^^^^^^^^^^^^^
+.. image:: _static/lettings_list_screenshot.png
+
+Letting details page
+^^^^^^^^^^^^^^^^^^^^
+.. image:: _static/letting_details_screenshot.png
+
+Profiles list page
+^^^^^^^^^^^^^^^^^^
+.. image:: _static/profiles_list_screenshot.png
+
+Profile details page
+^^^^^^^^^^^^^^^^^^^^
+.. image:: _static/profile_details_screenshot.png
+
+Letting 404 error page
+^^^^^^^^^^^^^^^^^^^^^^
+.. image:: _static/letting_404_error_screenshot.png
+
+Use cases
+---------
+
+Browsing lettings
+^^^^^^^^^^^^^^^^^
+Here is the procedure :
+
+* Open the home page
+
+* Click on the "Letting" link
+
+* Select a letting from the list
+
+* The detail page displays the address and related information
+
+Viewing profiles
+^^^^^^^^^^^^^^^^
+The procedure is more or less the same :
+
+* Open the Profiles page.
+
+* Select a profile from the list.
+
+* The application displays the user profile details.
+
+Returning to home page
+^^^^^^^^^^^^^^^^^^^^^^
+Here is the procedure :
+
+* In the lettings page or profiles page, click on the "Home" button
+
+* The application displays the home page
diff --git a/flake8-report/back.svg b/flake8-report/back.svg
new file mode 100644
index 0000000000..ce80d2e6da
--- /dev/null
+++ b/flake8-report/back.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/flake8-report/file.svg b/flake8-report/file.svg
new file mode 100644
index 0000000000..98706cfe53
--- /dev/null
+++ b/flake8-report/file.svg
@@ -0,0 +1,64 @@
+
+
+
+
diff --git a/flake8-report/index.html b/flake8-report/index.html
new file mode 100644
index 0000000000..195631a111
--- /dev/null
+++ b/flake8-report/index.html
@@ -0,0 +1,30 @@
+
+
+
+ flake8 violations
+
+
+
+
+
+
+
flake8 violations
+
Generated on 2026-05-22 21:12
+ with mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1
+