-
-
Notifications
You must be signed in to change notification settings - Fork 630
docs: add/improve overview pgs for backend, frontend, schema, & SDKs #4075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arkid15r
merged 15 commits into
OWASP:main
from
hassaansaleem28:docs/improve-project-docs
Mar 4, 2026
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2a51a4b
docs: add overviews, edit mkdocs, compose
hassaansaleem28 eec4bcc
fix check
hassaansaleem28 d3a1f51
Merge branch 'main' into docs/improve-project-docs
hassaansaleem28 9c94f02
Merge branch 'main' into docs/improve-project-docs
hassaansaleem28 e246e42
Merge branch 'main' into docs/improve-project-docs
hassaansaleem28 c977850
docs: refactor mkdocs & overview files
hassaansaleem28 a2bd2e1
Merge branch 'main' into docs/improve-project-docs
hassaansaleem28 c4c4e7c
update code
hassaansaleem28 cbbf600
Merge branch 'main' into docs/improve-project-docs
hassaansaleem28 a7e5f62
bot suggestions
hassaansaleem28 964927f
Update code
hassaansaleem28 265460e
empty commit
hassaansaleem28 6184a3f
Update code
arkid15r 3fdcd10
Merge branch 'main' into pr/hassaansaleem28/4075
arkid15r 6eff310
Merge branch 'main' into docs/improve-project-docs
arkid15r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Backend Overview | ||
|
|
||
| The OWASP Nest backend is a Python-based API server built with the [Django](https://www.djangoproject.com/) framework. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| | Component | Technology | | ||
| | --------------- | ------------------------------------------------| | ||
| | **Framework** | Django 6.x | | ||
| | **REST API** | [Django Ninja](https://django-ninja.dev/) | | ||
| | **GraphQL API** | [Strawberry GraphQL](https://strawberry.rocks/) | | ||
| | **Database** | PostgreSQL | | ||
| | **Caching** | Redis (via `django-redis`) | | ||
| | **Task Queue** | Django RQ | | ||
| | **Search** | Algolia | | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| The backend code lives in this directory. Key directories include: | ||
|
|
||
| - `apps/` - Contains all Django applications (e.g., `owasp`, `github`, `api`). | ||
| - `settings/` - Django configuration files. | ||
| - `tests/` - Automated tests. | ||
| - `data/` - Database dumps and backup files. | ||
|
|
||
| ## Running Locally | ||
|
|
||
| The project uses **Docker** for local development. From the project root: | ||
|
|
||
| ```bash | ||
| # Start all services (backend, db, cache) | ||
| docker compose -f docker-compose/local/compose.yaml up | ||
| ``` | ||
|
|
||
| For common tasks, use the provided `Makefile` targets: | ||
|
|
||
| | Task | Command | | ||
| | ----------------------- | ----------------------- | | ||
| | Run database migrations | `make migrate` | | ||
| | Create a superuser | `make create-superuser` | | ||
| | Run backend tests | `make test-backend` | | ||
| | Access Django shell | `make django-shell` | | ||
|
|
||
| See the root `Makefile` and the local `Makefile` for more targets. | ||
|
|
||
| ## Key APIs | ||
|
|
||
| - **REST API (v0)**: Served at `/api/v0/`. See [API v0 README](https://github.com/OWASP/Nest/blob/main/backend/apps/api/rest/v0/README.md) for SDK-related constraints. | ||
| - **GraphQL API**: Served at `/graphql/`. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| Dependencies are managed with [Poetry](https://python-poetry.org/). The main configuration is in `pyproject.toml`. | ||
|
|
||
| ```bash | ||
| # Update dependencies | ||
| cd backend && poetry update | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # API Overview | ||
|
|
||
| The OWASP Nest API is divided into two primary interfaces: GraphQL and REST. | ||
|
|
||
| ## GraphQL API | ||
|
|
||
| The GraphQL API is the primary interface used by the OWASP Nest frontend application. | ||
|
|
||
| - **Framework**: Built using [Strawberry GraphQL](https://strawberry.rocks/). | ||
| - **Endpoint**: `/graphql/` | ||
| - **Playground**: An interactive GraphiQL interface is automatically available at `/graphql/` when running the backend in development mode (`DJANGO_CONFIGURATION=Local`). | ||
|
|
||
| ## REST API (v0) | ||
|
|
||
| The REST API is used primarily for programmatic access, integrations, and generating client SDKs. | ||
|
|
||
| - **Framework**: Built using [Django Ninja](https://django-ninja.dev/). | ||
| - **Base Route**: `/api/v0/` | ||
| - **Schema**: Auto-generated OpenAPI (Swagger) specification is available at `/api/v0/openapi.json`. | ||
|
|
||
| ### Client SDKs | ||
|
|
||
| The OpenAPI specification is used to generate official SDKs in various languages: | ||
| - [OWASP Nest SDKs (Main Repo)](https://github.com/owasp/nest-sdk) | ||
| - [Python SDK](https://github.com/owasp/nest-sdk-python) | ||
| - [TypeScript SDK](https://github.com/OWASP/nest-sdk-typescript) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Nestbot Overview | ||
|
|
||
| Nestbot is the custom Slack integration for the OWASP Nest project, built using the [Slack Bolt for Python](https://docs.slack.dev/tools/bolt-python/getting-started) framework within Django. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| | Component | Technology | | ||
| | ----------------- | ---------------------------------- | | ||
| | **Framework** | Slack Bolt (Python) | | ||
| | **Integration** | Django (as a standard app) | | ||
| | **Hosting** | AWS Lambda (via Zappa) | | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| The Nestbot code lives in `backend/apps/slack/`. Key directories include: | ||
|
|
||
| - `commands/` - Handlers for Slack slash commands (e.g., `/nest`). | ||
| - `events/` - Handlers for Slack events (e.g., when a user joins a channel). | ||
| - `actions/` - Handlers for interactive components (e.g., button clicks). | ||
| - `models/` - Django models for storing Slack workspaces, messages, and users. | ||
| - `templates/` - Slack Block Kit JSON templates for rich messages. | ||
|
|
||
| ## Key Commands | ||
|
|
||
| Run these `Makefile` targets to manage Slack data: | ||
|
|
||
| | Task | Command | | ||
| | -------------------------------- | -------------------------------------------------- | | ||
| | Sync Slack workspace data | `make slack-sync-data` | | ||
| | Sync recent Slack messages | `make slack-sync-messages` | | ||
| | Export Slack data to JSON | `make slack-export-data` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --8<-- "backend/apps/api/README.md" | ||
|
|
||
| --- | ||
|
|
||
| ## Important Constraints | ||
|
|
||
| When contributing to the REST API, follow these rules to avoid breaking SDK generation: | ||
|
|
||
| ### 1. Unique `operationId` | ||
|
|
||
| Each API endpoint **must have a unique `operationId`** in the OpenAPI spec. Duplicate `operationId`s will cause method conflicts in generated SDKs. | ||
|
|
||
| ### 2. Stable Authentication Class Name | ||
|
|
||
| The authentication class in `backend/apps/api/rest/auth/api_key.py` **must be named `ApiKey`**. | ||
| - The client's `api_key` parameter is automatically derived from this class name. | ||
| - **Do not rename this class.** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| --8<-- "backend/README.md" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,92 +1 @@ | ||
| <!-- Disabling MD046 to preserve MkDocs rendering --> | ||
| <!-- markdownlint-disable MD046 --> | ||
| # Code of Conduct | ||
|
|
||
| ## Our Pledge | ||
|
|
||
| !!! quote "Community Pledge" | ||
| We as members, contributors, and leaders pledge to make participation in our | ||
| community a harassment-free experience for everyone, regardless of age, body | ||
| size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
| identity and expression, level of experience, education, socio-economic status, | ||
| nationality, personal appearance, race, religion, or sexual identity | ||
| and orientation. | ||
|
|
||
| We pledge to act and interact in ways that contribute to an open, welcoming, | ||
| diverse, inclusive, and healthy community. | ||
|
|
||
| ## Community Standards | ||
|
|
||
| ### Positive Behaviors | ||
|
|
||
| We encourage behaviors that contribute to a positive environment: | ||
|
|
||
| - Demonstrating empathy and kindness toward other people | ||
| - Being respectful of differing opinions, viewpoints, and experiences | ||
| - Giving and gracefully accepting constructive feedback | ||
| - Accepting responsibility and apologizing for mistakes | ||
| - Focusing on what is best for the overall community | ||
|
|
||
| ### Unacceptable Behaviors | ||
|
|
||
| !!! warning "The following behaviors are considered unacceptable" | ||
| - Use of sexualized language or imagery | ||
| - Trolling, insulting comments, and personal attacks | ||
| - Public or private harassment | ||
| - Publishing others' private information without permission | ||
| - Other inappropriate conduct in a professional setting | ||
|
|
||
| ## Enforcement | ||
|
|
||
| ### Responsibilities | ||
|
|
||
| !!! info "Leadership Role" | ||
|
|
||
| Community leaders are responsible for: | ||
|
|
||
| - Clarifying and enforcing standards of acceptable behavior | ||
| - Taking appropriate and fair corrective action | ||
| - Removing, editing, or rejecting contributions not aligned with this Code | ||
| - Communicating moderation decisions when appropriate | ||
|
|
||
| ### Reporting Process | ||
|
|
||
| !!! tip "Reporting Violations" | ||
| Report instances of unacceptable behavior to the community leaders at: | ||
| [OWASP Nest Project Leaders](https://owasp.org/www-project-nest) | ||
|
|
||
| All complaints will be reviewed and investigated promptly and fairly. | ||
|
|
||
| ### Guidelines for Enforcement | ||
|
|
||
| Community leaders follow these impact guidelines when determining consequences: | ||
|
|
||
| === "Correction" | ||
| - **Impact**: Inappropriate or unwelcome behavior | ||
| - **Response**: Private warning and explanation | ||
| - **Action**: Public apology may be requested | ||
|
|
||
| === "Warning" | ||
| - **Impact**: Single incident or series of violations | ||
| - **Response**: Warning with consequences | ||
| - **Action**: No interaction for specified period | ||
|
|
||
| === "Temporary Ban" | ||
| - **Impact**: Serious violation of community standards | ||
| - **Response**: Temporary ban from community interaction | ||
| - **Action**: No public or private interaction allowed | ||
|
|
||
| === "Permanent Ban" | ||
| - **Impact**: Pattern of violations or harassment | ||
| - **Response**: Permanent ban from community | ||
| - **Action**: No public interaction within community | ||
|
|
||
| ## Attribution | ||
|
|
||
| This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html), version 2.0, available at [contributor-covenant.org](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). | ||
|
|
||
| Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). | ||
|
|
||
| !!! note "Additional Resources" | ||
| - [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq) | ||
| - [Available Translations](https://www.contributor-covenant.org/translations) | ||
| --8<-- "CODE_OF_CONDUCT.md" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.