Skip to content

SpectraEYEHQ/SpectraSurvey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 

Repository files navigation

πŸ“‹ SpectraSurvey - Intensive Analysis (Technical + Business)


πŸ“‘ Table of Contents

  1. 🧭 Executive Summary
  2. 🎯 Application Purpose
  3. 🏒 Business Architecture
  4. ✨ Application Features
  5. πŸ—οΈ Technical Architecture
  6. πŸ”„ Technical Flow Map
  7. πŸ—ƒοΈ Data Architecture
  8. 🧩 Product Offering
  9. πŸ“„ License

🧭 Executive Summary

SpectraSurvey is a multi-tenant platform designed for:

  • creating, distributing, and analyzing surveys,
  • managing organizational files through storage, sharing, and versioning,
  • enabling team and organization administration with audit and compliance visibility,
  • supporting centralized super-admin operations across tenants.

🎯 Application Purpose

Primary Purpose

Provide organizations with a unified system for:

  • survey operations,
  • associated data and digital asset management,
  • controlled collaboration,
  • compliance visibility and governance.

Business Value

  • πŸ“¬ Improve response rates through multi-channel distribution and optimized public UX.
  • 🧾 Provide traceability through audit and compliance visibility for enterprise and regulated use cases.
  • πŸ—‚οΈ Centralize survey data and digital assets in one operational workspace.
  • 🏒 Support multi-tenant organizational administration with role-based control.
  • πŸ“Š Enable insight generation through survey analytics and response exploration.

🏒 Business Architecture

Main Actors

  • Organization Member: creates surveys, analyzes results, manages files.
  • Organization Admin: manages members, policies, settings, and access.
  • Platform Super Admin: governs tenants, users, and global configurations.
  • Respondent (External/Public): completes surveys through public or private access flows.

Capability Map (Business)

  • Research Operations: survey design, publishing, response collection.
  • Analytics & Insight: dashboards, exports, response-level analysis.
  • Digital Asset Management: folders, files, versions, sharing, trash.
  • Tenant Administration: members, roles, organization settings.
  • Platform Governance: global admin, monitoring, compliance controls.

Business Map (Mermaid)

flowchart LR
  A["Respondent"] --> B["Public Survey Access"];
  B --> C["Survey Engine"];
  C --> D["Analytics"];
  C --> E["Audit Trail"];

  F["Organization Member"] --> C;
  F --> G["File Governance"];

  H["Organization Admin"] --> I["Tenant Settings"];
  H --> J["Team Management"];

  K["Super Admin"] --> L["Platform Control Plane"];
  L --> M["Organizations"];
  L --> N["Users"];
  L --> O["Compliance / Monitoring"];
Loading

✨ Application Features

4.1 Authentication, Identity, Security

  • πŸ” Login, signup, reset, and MFA flow.
  • πŸ‘€ Separate contexts for standard users and super-admin.
  • πŸ•“ Login history and security event visibility.
  • βœ‰οΈ Organization confirmation and invite flows.
  • 🚦 Rate limiting on authentication endpoints.

4.2 Full Survey Lifecycle

  • πŸ“ Create, edit, and delete surveys.
  • 🧱 Question builder with types, logic, and ordering.
  • πŸ—“οΈ Scheduling and lifecycle controls (start, end, archive, trash).
  • πŸ’Ύ Auto-save draft and recovery support.

4.3 Response Collection (Public/Private)

  • 🌍 Public survey pages with access guards.
  • πŸ”’ Password-protected surveys and additional validation flows.
  • πŸ‘₯ Invitation-based and group-based distribution.
  • πŸ›‘οΈ Anti-abuse controls such as captcha or challenge flows where applicable.

4.4 Analytics and Reporting

  • πŸ“Š Overview dashboard and response trends.
  • πŸ”Ž Individual response inspection.
  • πŸ” Cross-survey comparisons.
  • πŸ“€ Export options such as CSV, Excel, and PDF where enabled.

4.5 Groups, Invitations, Distribution

  • 🧩 Audience segmentation through groups.
  • βœ‰οΈ Invitation lifecycle: send, resend, expire, complete.
  • πŸ”— Share links and QR-based distribution.

4.6 File Module (DAM)

  • πŸ“ Folder and file hierarchy.
  • πŸ•˜ File versioning with auto/manual version history.
  • πŸ” Secure sharing options:
    • expiration,
    • maximum downloads,
    • password protection,
    • email delivery.

4.7 Team and Organization Settings

  • πŸ‘₯ Team invite, remove, and role change flows.
  • πŸ” Per-user MFA toggle.
  • 🎨 Organization branding such as name and logo.
  • βš™οΈ Organization-level policies and settings.

4.8 Platform Admin (Super Admin)

  • 🏒 Organization management.
  • πŸ‘€ User management and privilege elevation.
  • πŸ“ˆ Platform reports and global controls.
  • πŸ“ Release notes and version management.
  • πŸ›‘οΈ Global audit and compliance views.

4.9 Audit and Compliance

  • πŸ“‹ Activity logs by organization.
  • 🚨 Security event timeline.
  • πŸ”‘ Login history views.
  • πŸ’“ Operational telemetry and health visibility.

πŸ—οΈ Technical Architecture

5.1 Technology Stack

  • Frontend: React + TypeScript + Vite.
  • UI / Routing: React Router, modular domain pages.
  • Backend API: Node.js + Express + security middleware.
  • Database: MySQL

5.2 Technical Map (System)

flowchart TD
  Browser["Browser / SPA"] --> FE["React Frontend"];
  FE --> API["Express API /api & /api/v2"];
  API --> DB["MySQL"];
  API --> FS["Local File Storage"];
  API --> Workers["Background Workers"];
  Workers --> Email["Email Notifications"];
Loading

5.3 Frontend Component Architecture

  • 🧭 Domain-oriented pages in src/pages/*
  • 🧩 Reusable UI components in src/components/*
  • πŸ”Œ API and services layer in src/services/*
  • πŸͺ Hooks for data fetching and mutations in src/hooks/*

5.4 Express Backend (Functional Zones)

  • Auth, session, and token flows.
  • Survey management and public submission endpoints.
  • File, folder, version, and share endpoints.
  • Organization, member, and role endpoints.
  • Audit, security, and admin routes.
  • Worker jobs for backups, cleanup, and observability.

πŸ”„ Technical Flow Map

6.1 Login Flow (Simplified)

sequenceDiagram
  participant User
  participant Frontend
  participant API
  participant DB

  User->>Frontend: Submit credentials
  Frontend->>API: POST /api/auth/login
  API->>DB: Validate user + membership
  DB-->>API: User + org context
  API-->>Frontend: Session cookies / auth response
  Frontend-->>User: Authenticated session
Loading

6.2 Public Survey Submit Flow

sequenceDiagram
  participant Respondent
  participant Frontend
  participant API
  participant DB

  Respondent->>Frontend: Open public survey URL
  Frontend->>API: GET /api/v2/public/surveys/:id
  API->>DB: Validate visibility and schedule
  DB-->>API: Survey payload
  API-->>Frontend: Survey + questions
  Respondent->>Frontend: Submit answers
  Frontend->>API: POST /api/v2/public/surveys/:id/submit
  API->>DB: Persist response + audit/security events
  API-->>Frontend: Submission success
Loading

6.3 Secure File Sharing Flow

sequenceDiagram
  participant User
  participant Frontend
  participant API
  participant Storage

  User->>Frontend: Create share link
  Frontend->>API: POST /api/files/:id/share
  API->>API: Apply ACL, expiry, and download limits
  API-->>Frontend: Signed/public link metadata
  Respondent->>API: GET shared file endpoint
  API->>Storage: Validate link + stream file
  API-->>Respondent: File download
Loading

πŸ—ƒοΈ Data Architecture

7.1 Data Domains

  • Identity and Access: users, organization memberships, roles.
  • Survey Domain: surveys, questions, responses, invitations.
  • File Domain: folders, files, versions, shares, logs.
  • Governance Domain: audit logs, security events, cron logs, reports.

7.2 High-Level ER (Mermaid)

erDiagram
  ORGANIZATIONS ||--o{ USERS : has
  ORGANIZATIONS ||--o{ SURVEYS : owns
  SURVEYS ||--o{ SURVEY_QUESTIONS : contains
  SURVEYS ||--o{ SURVEY_RESPONSES : receives
  ORGANIZATIONS ||--o{ FILES : owns
  FILES ||--o{ FILE_VERSIONS : versions
  ORGANIZATIONS ||--o{ AUDIT_LOGS : emits
  ORGANIZATIONS ||--o{ SECURITY_EVENTS : emits
Loading

7.3 Multi-Tenancy

  • Most domains are organization-scoped.
  • Isolation is implemented through schema structure and server-side access checks.
  • Strict regression testing is required for every tenant route and hook to avoid cross-organization leakage.

🧩 Product Offering

  • Research Engine: advanced survey creation and execution.
  • Insight Engine: analytics and reporting.
  • Collaboration Engine: teams, roles, organization settings.
  • File Governance Engine: secure file management and sharing.
  • Control Plane: global admin, audit, compliance, and monitoring.

πŸ“„ License

Distributed under the Proprietary License. See LICENSE for more information.


**Built with ❀️ by the SpectraEYE Team**

About

πŸ“‹ Creating, distributing, and analyzing surveys & Question builder

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors