OWASP / OWASP/Nest

Introduce a Unified Domain Layer for Business Logic

Open
#4,271 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
451
Forks
707
Avg merge
22h 59m
Merged PRs (30d)
91

Description

**Problem:**

Currently, much of the business logic (e.g., project filtering, issue summarization, contributor activity tracking) is embedded directly inside Django views or serializers. This mixes responsibilities and makes it harder to maintain, test, or extend features consistently across apps.

**Improvement:**

- Create a services/ or domain/ layer in the backend to hold reusable business logic.
- Move complex operations (e.g., AI issue summarization, contributor scoring, chapter proximity calculations) into dedicated service classes or functions.
- Keep views/serializers focused only on request/response handling.

**Impact:**

- Clear separation of concerns → easier to test and maintain.
- Encourages reuse of logic across apps (e.g., contributor scoring could be used in both issues and projects).
- Makes the repo more scalable as new features are added.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.