# nishan756/saascom architecture

> Architecture diagram of the GitHub repository nishan756/saascom, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nishan756/saascom
- Repository: https://github.com/nishan756/saascom

## Overview

1. **Overall shape**
   - This is a Django monolith for a developer/community platform, not a microservice split.
   - The core request path is: Django URL routing → app-specific view → service/repository layer → Django models/database → template response.
   - The UI is server-rendered HTML with shared static assets; there is no obvious separate frontend SPA in the tree.

2. **Project shell / runtime**
   - `saas_com/` is the project container: `settings.py`, root `urls.py`, plus `asgi.py` and `wsgi.py`.
   - `manage.py` drives local development, migrations, and admin/maintenance commands.
   - A custom management command exists in `apps/management/commands/createsu.py`, likely for creating privileged users or seeded accounts.

3. **Domain modules are separated by feature**
   - The repo is organized into Django apps by business capability: `session`, `jobs`, `apps`, `discussion`, `comment`, `bookmark`, `report`, `vote`, and `dashboard`.
   - Each major module typically has its own `models.py`, `views.py`, `urls.py`, `service.py`, `repository.py`, templates, and migrations.
   - This indicates a deliberate layered structure inside each app rather than putting all logic in views.

4. **Identity and social graph: `session`**
   - `session` is the user/account boundary and appears to own the custom user model.
   - Migrations indicate profile fields like joined date, gender, image, bio, and user type, plus follow and report relationships.
   - It also includes auth screens (`login`, `signup`, `verification`, `send-code`, profile editing), so this app is the platform’s identity gateway.

5. **Apps/SaaS showcase domain: `apps`**
   - The `apps` module models SaaS/product listings, including app details, images, tags, reviews, and votes.
   - Templates such as `create-app.html`, `app-detail.html`, and `apps.html` show a listing/detail workflow for published products.
   - This module is one of the main content pillars and likely consumes user identity, voting, reporting, and media upload flows.

6. **Jobs marketplace domain: `jobs`**
   - `jobs` is the hiring subsystem, with posting and browsing templates like `post-job.html`, `jobs.html`, and `job-detail.html`.
   - Migrations suggest richer job metadata: company, vacancy, experience, currency, short description, categories, skills, and applications.
   - The presence of an `Application` model makes this a complete job board flow: create job → browse jobs → apply → track applications.

7. **Community / discussion domain**
   - `discussion` holds threaded or article-style community posts, with create/list/detail templates.
   - `comment` is a separate subsystem for nested comments, with a parent relationship in migrations.
   - `vote` is a reusable engagement subsystem, likely supporting upvote/downvote behavior across multiple content types.
   - Together these form the platform’s interaction layer around content, rather than being embedded directly inside each content app.

8. **Cross-cutting moderation and trust features**
   - `report` is a dedicated moderation/abuse-reporting boundary.
   - `bookmark` is a saved-content feature; it appears as its own app and also has user-related references in session migrations.
   - These features are orthogonal to content creation and are separated so they can apply across apps without duplicating logic.

9. **Dashboard / analytics layer**
   - `dashboard` does not own core content; it aggregates data for role-specific views.
   - Its templates include app stats, application detail, apps dashboard, jobs dashboard, discussion dashboard, and “my applications”.
   - This is the control/summary layer that reads from other domains and presents operational views for users, founders, or admins.

10. **Repository/service layering**
   - Most apps include both `repository.py` and `service.py`, which suggests a split between persistence queries and business rules.
   - Views likely stay thin: they orchestrate HTTP concerns, call services, and render templates.
   - This boundary is important for diagrams because it shows business logic is not concentrated in views or models alone.

11. **Presentation layer**
   - Each major domain has its own templates directory, and there is a shared `base.html`.
   - Static assets are centralized under `static/` with Bootstrap, custom CSS per page/screen, and a small amount of JavaScript.
   - The UI is therefore composed from reusable layout templates plus feature-specific pages.

12. **Data storage and media**
   - The project is Django ORM–driven, with extensive migrations across all apps, so relational persistence is central.
   - The README mentions MySQL for production and SQLite for development.
   - Images are a meaningful part of the data model, especially for user profiles and app listings, and the README references Cloudinary as a media service.

13. **Tests and quality boundary**
   - Tests are mostly model-focused and live alongside each domain app (`tests/models/...`).
   - That suggests the current quality strategy emphasizes domain invariants, model behavior, and relationship integrity more than API-level testing.
   - The architecture is therefore strongly domain-oriented, with tests close to the business models they validate.

14. **What to draw in an architecture diagram**
   - Draw one central Django project box containing feature apps around it.
   - Show `session` as the identity hub feeding auth/authorization into all other apps.
   - Show `apps`, `jobs`, and `discussion` as the primary content domains.
   - Show `comment`, `vote`, `bookmark`, and `report` as shared interaction/moderation services that connect across domains.
   - Show `dashboard` as a read-heavy aggregation layer over the domain models.

Main entry points: [`saas_com/urls.py`](https://github.com/nishan756/saascom/blob/main/saas_com/urls.py) (Root URLs), [`session`](https://github.com/nishan756/saascom/tree/main/session) (Session), [`apps`](https://github.com/nishan756/saascom/tree/main/apps) (Apps), [`discussion`](https://github.com/nishan756/saascom/tree/main/discussion) (Discussion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_project["Project shell"]
  node_manage_py["manage.py<br/>django entrypoint<br/>[manage.py]"]
  node_saas_com_settings["Settings<br/>django config<br/>[settings.py]"]
  node_saas_com_urls["Root URLs<br/>routing<br/>[urls.py]"]
  node_saas_com_runtime["ASGI/WSGI<br/>runtime bootstrap<br/>[asgi.py]"]
end

subgraph group_domains["Domain apps"]
  node_session_app["Session<br/>identity app"]
  node_apps_app["Apps<br/>product listings"]
  node_jobs_app["Jobs<br/>job board"]
  node_discussion_app["Discussion<br/>community posts"]
  node_comment_app["Comment"]
end

subgraph group_shared["Shared services"]
  node_vote_app["Vote<br/>engagement"]
  node_bookmark_app["Bookmark<br/>saved content"]
  node_report_app["Report<br/>moderation"]
  node_dashboard_app["Dashboard<br/>analytics views"]
  node_service_layer["Services<br/>business rules"]
  node_repository_layer["Repositories<br/>data access"]
  node_db_models[("ORM models<br/>relational data")]
end

subgraph group_ui["Presentation"]
  node_templates_layer["Templates<br/>server UI"]
  node_static_assets["Static assets<br/>css/js/media"]
end

node_manage_py -->|"loads"| node_saas_com_settings
node_saas_com_settings -->|"routes"| node_saas_com_urls
node_saas_com_runtime -->|"boots"| node_saas_com_settings
node_saas_com_urls -->|"includes"| node_session_app
node_saas_com_urls -->|"includes"| node_apps_app
node_saas_com_urls -->|"includes"| node_jobs_app
node_saas_com_urls -->|"includes"| node_discussion_app
node_saas_com_urls -->|"includes"| node_comment_app
node_saas_com_urls -->|"includes"| node_vote_app
node_saas_com_urls -->|"includes"| node_bookmark_app
node_saas_com_urls -->|"includes"| node_report_app
node_saas_com_urls -->|"includes"| node_dashboard_app
node_session_app -->|"owns"| node_db_models
node_apps_app -->|"persists to"| node_db_models
node_jobs_app -->|"persists to"| node_db_models
node_discussion_app -->|"persists to"| node_db_models
node_comment_app -->|"persists to"| node_db_models
node_vote_app -->|"persists to"| node_db_models
node_bookmark_app -->|"persists to"| node_db_models
node_report_app -->|"persists to"| node_db_models
node_dashboard_app -->|"reads from"| node_db_models
node_session_app -->|"uses"| node_service_layer
node_apps_app -->|"uses"| node_service_layer
node_jobs_app -->|"uses"| node_service_layer
node_discussion_app -->|"uses"| node_service_layer
node_comment_app -->|"uses"| node_service_layer
node_dashboard_app -->|"uses"| node_service_layer
node_service_layer -->|"delegates"| node_repository_layer
node_repository_layer -->|"queries"| node_db_models
node_session_app -->|"renders"| node_templates_layer
node_apps_app -->|"renders"| node_templates_layer
node_jobs_app -->|"renders"| node_templates_layer
node_discussion_app -->|"renders"| node_templates_layer
node_comment_app -->|"renders"| node_templates_layer
node_dashboard_app -->|"renders"| node_templates_layer
node_templates_layer -->|"uses"| node_static_assets
node_session_app -.->|"auth for"| node_apps_app
node_session_app -.->|"auth for"| node_jobs_app
node_session_app -.->|"auth for"| node_discussion_app
node_session_app -.->|"auth for"| node_bookmark_app
node_session_app -.->|"auth for"| node_report_app
node_vote_app -.->|"supports"| node_apps_app
node_vote_app -.->|"supports"| node_discussion_app
node_comment_app -.->|"extends"| node_discussion_app
node_comment_app -.->|"extends"| node_apps_app
node_report_app -.->|"covers"| node_apps_app
node_report_app -.->|"covers"| node_jobs_app
node_report_app -.->|"covers"| node_discussion_app

click node_manage_py "https://github.com/nishan756/saascom/blob/main/manage.py"
click node_saas_com_settings "https://github.com/nishan756/saascom/blob/main/saas_com/settings.py"
click node_saas_com_urls "https://github.com/nishan756/saascom/blob/main/saas_com/urls.py"
click node_saas_com_runtime "https://github.com/nishan756/saascom/blob/main/saas_com/asgi.py"
click node_session_app "https://github.com/nishan756/saascom/tree/main/session"
click node_apps_app "https://github.com/nishan756/saascom/tree/main/apps"
click node_jobs_app "https://github.com/nishan756/saascom/tree/main/jobs"
click node_discussion_app "https://github.com/nishan756/saascom/tree/main/discussion"
click node_comment_app "https://github.com/nishan756/saascom/tree/main/comment"
click node_vote_app "https://github.com/nishan756/saascom/tree/main/vote"
click node_bookmark_app "https://github.com/nishan756/saascom/tree/main/bookmark"
click node_report_app "https://github.com/nishan756/saascom/tree/main/report"
click node_dashboard_app "https://github.com/nishan756/saascom/tree/main/dashboard"
click node_templates_layer "https://github.com/nishan756/saascom/tree/main/static"
click node_static_assets "https://github.com/nishan756/saascom/tree/main/static"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manage_py,node_saas_com_settings,node_saas_com_urls,node_saas_com_runtime toneBlue
class node_session_app,node_apps_app,node_jobs_app,node_discussion_app,node_comment_app toneAmber
class node_vote_app,node_bookmark_app,node_report_app,node_dashboard_app,node_service_layer,node_repository_layer,node_db_models toneMint
class node_templates_layer,node_static_assets toneRose
```

## Components

### Project shell

Django project container and runtime entrypoints.

- [manage.py](https://github.com/nishan756/saascom/blob/main/manage.py): django entrypoint · Command-line entrypoint for development, migrations, and admin tasks. · `manage.py`
- [Settings](https://github.com/nishan756/saascom/blob/main/saas_com/settings.py): django config · Project settings and runtime configuration. · `saas_com/settings.py`
- [Root URLs](https://github.com/nishan756/saascom/blob/main/saas_com/urls.py): routing · Top-level URL dispatcher for the project. · `saas_com/urls.py`
- [ASGI/WSGI](https://github.com/nishan756/saascom/blob/main/saas_com/asgi.py): runtime bootstrap · Deployment and process entrypoints for async and WSGI servers. · `saas_com/asgi.py`

### Domain apps

Feature-focused Django apps that own core business areas.

- [Session](https://github.com/nishan756/saascom/tree/main/session): identity app · Custom user model, auth flows, profiles, follows, and trust boundaries. · `session`
- [Apps](https://github.com/nishan756/saascom/tree/main/apps): product listings · SaaS/app marketplace domain with app pages, tags, reviews, and votes. · `apps`
- [Jobs](https://github.com/nishan756/saascom/tree/main/jobs): job board · Hiring domain for job posts, applications, and related metadata. · `jobs`
- [Discussion](https://github.com/nishan756/saascom/tree/main/discussion): community posts · Threaded or article-style community content and its lifecycle. · `discussion`
- [Comment](https://github.com/nishan756/saascom/tree/main/comment): nested comments · Reusable comment subsystem with parent-child threading. · `comment`

### Shared services

Cross-cutting interaction, moderation, and aggregation modules.

- [Vote](https://github.com/nishan756/saascom/tree/main/vote): engagement · Reusable voting subsystem for content interactions. · `vote`
- [Bookmark](https://github.com/nishan756/saascom/tree/main/bookmark): saved content · Saved-items subsystem for users to collect content across domains. · `bookmark`
- [Report](https://github.com/nishan756/saascom/tree/main/report): moderation · Abuse/reporting boundary for cross-domain moderation flows. · `report`
- [Dashboard](https://github.com/nishan756/saascom/tree/main/dashboard): analytics views · Read-heavy aggregation and operational views across domain data. · `dashboard`
- **Services**: business rules · Per-app service modules that coordinate domain logic beyond views.
- **Repositories**: data access · Per-app repository modules that isolate persistence and query logic.
- **ORM models**: relational data · Django models and migrations backing the repository's persistent state.

### Presentation

Templates and static assets used for server-rendered HTML.

- [Templates](https://github.com/nishan756/saascom/tree/main/static): server UI · Shared and feature-specific HTML templates for server-rendered pages. · `static`
- [Static assets](https://github.com/nishan756/saascom/tree/main/static): css/js/media · Bootstrap, page CSS, JavaScript, icons, and images for the UI. · `static`

## Connections

- manage.py → Settings: loads · Starts Django using project settings.
- Settings → Root URLs: routes · Connects runtime configuration to the root URL dispatcher.
- ASGI/WSGI → Settings: boots · ASGI and WSGI entrypoints initialize the configured project.
- Root URLs → Session: includes · Root routing delegates identity-related paths to the session app.
- Root URLs → Apps: includes · Root routing delegates product listing paths.
- Root URLs → Jobs: includes · Root routing delegates job board paths.
- Root URLs → Discussion: includes · Root routing delegates community discussion paths.
- Root URLs → Comment: includes · Root routing delegates comment paths.
- Root URLs → Vote: includes · Root routing delegates vote paths.
- Root URLs → Bookmark: includes · Root routing delegates bookmark paths.
- Root URLs → Report: includes · Root routing delegates reporting paths.
- Root URLs → Dashboard: includes · Root routing delegates dashboard paths.
- Session → ORM models: owns · Defines the custom user model and social relationships.
- Apps → ORM models: persists to · Stores apps, images, tags, reviews, and votes.
- Jobs → ORM models: persists to · Stores jobs, categories, skills, and applications.
- Discussion → ORM models: persists to · Stores discussion content and author relationships.
- Comment → ORM models: persists to · Stores threaded comments and parent links.
- Vote → ORM models: persists to · Stores vote records for content engagement.
- Bookmark → ORM models: persists to · Stores saved content references.
- Report → ORM models: persists to · Stores moderation reports and abuse signals.
- Dashboard → ORM models: reads from · Aggregates operational views from domain data.
- Session → Services: uses · Auth and profile flows delegate business rules to services.
- Apps → Services: uses · Listing, review, and media workflows use services.
- Jobs → Services: uses · Posting and application workflows use services.
- Discussion → Services: uses · Discussion creation and retrieval use services.
- Comment → Services: uses · Comment threading and moderation-related actions use services.
- Dashboard → Services: uses · Dashboard views assemble data through services.
- Services → Repositories: delegates · Services rely on repositories for persistence and queries.
- Repositories → ORM models: queries · Repositories implement model-centric data access.
- Session → Templates: renders · Auth and profile screens are server-rendered templates.
- Apps → Templates: renders · App marketplace pages are rendered from templates.
- Jobs → Templates: renders · Job board pages are rendered from templates.
- Discussion → Templates: renders · Discussion pages are rendered from templates.
- Comment → Templates: renders · Comment UI is rendered from templates.
- Dashboard → Templates: renders · Dashboard summaries are rendered from templates.
- Templates → Static assets: uses · Templates consume shared CSS, JS, bootstrap, and media assets.
- Session → Apps: auth for · Identity and profile data support app ownership and participation.
- Session → Jobs: auth for · Identity data supports job posting and applications.
- Session → Discussion: auth for · Identity data supports discussion authorship and participation.
- Session → Bookmark: auth for · Bookmarks are user-scoped and depend on account identity.
- Session → Report: auth for · Reports are tied to user identity and trust boundaries.
- Vote → Apps: supports · Voting is applied to app content.
- Vote → Discussion: supports · Voting is applied to discussion content.
- Comment → Discussion: extends · Comments attach to discussion content.
- Comment → Apps: extends · Comments can attach to app content where enabled.
- Report → Apps: covers · Reports can target app content.
- Report → Jobs: covers · Reports can target job content.
- Report → Discussion: covers · Reports can target discussion content.
