‹ Reports
The Dispatch

GitHub Repo Analysis: directus/directus


Executive Summary

The Directus project is an open-source platform that provides REST+GraphQL APIs and a no-code data collaboration app for SQL databases. Managed by the organization named Directus, this project supports multiple database systems and can be deployed in various environments. The project is primarily developed in TypeScript and aims to serve both technical and non-technical users by being extensible and customizable. Currently, the project exhibits a healthy development activity with a focus on enhancing security features, error handling, and user documentation, indicating a positive trajectory towards robustness and user accessibility.

Recent Activity

Team Members and Contributions:

Patterns and Conclusions:

The team's recent activities suggest a strong emphasis on maintaining system stability through rigorous dependency management, enhancing security protocols, and improving error handling mechanisms. Documentation efforts reflect a commitment to making the platform more accessible. Frequent integration of features and fixes indicates a dynamic development environment.

Risks

  1. Unresolved Critical Bugs: Issues like #22683 impact core functionalities such as database migrations, which are crucial for the platform's reliability.
  2. Display Issues in User Interfaces (#22676): Problems in displaying related items in many-to-many relationships could degrade the user experience, especially for non-admin users.
  3. High Rate of Unmerged PRs: Several significant pull requests have been closed without merging (e.g., #22534, #22457), which might indicate underlying problems either in the proposed solutions or internal decision-making processes.

Of Note

  1. Extensive Use of Draft PRs: Many pull requests are still drafts (e.g., #22673, #22654), suggesting that features might be under thorough review or development before finalization. This could be seen as both a cautious approach to quality control or a potential delay in feature rollout.
  2. Dependency on Automated Updates (dependabot[bot]): Heavy reliance on automated dependency updates could pose risks if not properly supervised, potentially leading to integration issues with untested library versions.
  3. Documentation as a Core Focus Area: The emphasis on restructuring and enhancing documentation (contributions by alejandrocortell and phazonoverload) highlights the project’s initiative towards better usability and accessibility, which is critical for expanding its user base.

Quantified Commit Activity Over 14 Days

Developer Avatar Branches PRs Commits Files Changes
Hannes Küttner (hanneskuettner) 3 2/0/0 49 110 3324
dependabot[bot] 1 37/26/14 26 34 2232
ian 2 1/3/0 4 45 1742
Brainslug 3 8/7/0 10 76 1601
Pascal Jufer 3 3/3/0 11 14 420
Kevin Lewis 1 1/1/0 1 2 215
José Varela 1 2/2/0 2 9 207
Daniel Biegler 2 1/1/0 5 16 146
Rijk van Zanten 1 1/2/0 2 7 136
Alejandro Cortell Marín 1 1/1/0 1 2 32
Zehir 1 1/1/0 1 3 23
Joey 1 0/1/0 1 3 16
Niklas Postulart 1 1/1/0 1 3 8
Shane (GuyShane) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Quantified Reports

Quantify commits



Quantified Commit Activity Over 14 Days

Developer Avatar Branches PRs Commits Files Changes
Hannes Küttner (hanneskuettner) 3 2/0/0 49 110 3324
dependabot[bot] 1 37/26/14 26 34 2232
ian 2 1/3/0 4 45 1742
Brainslug 3 8/7/0 10 76 1601
Pascal Jufer 3 3/3/0 11 14 420
Kevin Lewis 1 1/1/0 1 2 215
José Varela 1 2/2/0 2 9 207
Daniel Biegler 2 1/1/0 5 16 146
Rijk van Zanten 1 1/2/0 2 7 136
Alejandro Cortell Marín 1 1/1/0 1 2 32
Zehir 1 1/1/0 1 3 23
Joey 1 0/1/0 1 3 16
Niklas Postulart 1 1/1/0 1 3 8
Shane (GuyShane) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Detailed Reports

Report On: Fetch commits



Project Overview

The Directus project is an open-source software platform that provides an instant REST+GraphQL API and a no-code data collaboration app for any SQL database. It is managed by the organization named Directus. This platform supports a variety of databases including PostgreSQL, MySQL, SQLite, OracleDB, CockroachDB, MariaDB, and MS-SQL. Directus can be run locally, installed on-premises, or used via a cloud service offered by the Directus team. The project is built using TypeScript and is designed to be extensible and customizable, catering to both technical and non-technical users.

Development Team and Recent Activities

Team Members:

  • dependabot[bot]: Automated dependency updates.
  • boring-joey: Developer focused on bug fixes and enhancements.
  • joselcvarela: Developer working on app-level enhancements.
  • br41nslug: Active contributor across multiple aspects of the project.
  • paescuj: Engaged in middleware enhancements and error handling improvements.
  • rijkvanzanten: Project lead managing merges and overarching project direction.
  • licitdev: Involved in enhancing API functionalities and SDK integrations.
  • alejandrocortell: Contributed to documentation enhancements.
  • phazonoverload: Worked on documentation restructuring and content creation.
  • npostulart: Focused on SDK updates.
  • DanielBiegler: Contributed to both backend logic and testing enhancements.
  • Zehir: Addressed specific backend issues related to queries.
  • GuyShane: Opened pull requests but no direct commits recently.
  • hanneskuettner: Highly active in database schema management and permissions handling.

Recent Commit Activities:

dependabot[bot]

  • Updated various dependencies across multiple packages ensuring the project stays up-to-date with the latest libraries.

boring-joey

  • Fixed issues related to schema handling on Azure SQL.

joselcvarela

  • Enhanced the app's handling of fake fields in requests to improve data integrity and processing.

br41nslug

  • Worked extensively on session management features including sliding window mechanisms for session tokens.

paescuj

  • Enhanced error handling in API middleware to better manage different types of errors and improve system stability.

rijkvanzanten

  • Managed merges from main into various branches ensuring consistency across the project.

licitdev

  • Focused on integrating new features into the SDK and improving GraphQL functionalities.

alejandrocortell

  • Contributed to documentation by adding guides on extension modules.

phazonoverload

  • Restructured sections of the documentation to improve clarity and user navigation.

npostulart

  • Updated SDK API endpoints for registration verification improving security measures.

DanielBiegler

  • Addressed user limits within the system enhancing control over user activities.

Zehir

  • Fixed an invalid query issue related to random string generation improving reliability.

GuyShane

  • Opened pull requests indicating engagement with project issues though no direct commits were made recently.

hanneskuettner

  • Extensively worked on permissions policies within the database migrations ensuring robust access control mechanisms are in place.

Patterns and Conclusions:

The development team shows a strong focus on maintaining robustness through dependency updates (dependabot[bot]) and enhancing security features (br41nslug, licitdev). There is also a significant effort towards improving error handling mechanisms (paescuj) which is crucial for enterprise-grade software. Documentation efforts (phazonoverload, alejandrocortell) indicate a commitment to making the platform accessible to new users. The frequent activity across multiple branches suggests a healthy pipeline of features and fixes being continuously integrated into the project.

Report On: Fetch issues



GitHub Issues Analysis

Recent Activity Analysis

The recent activity in the Directus GitHub repository shows a variety of issues ranging from bug reports to feature requests, primarily focusing on enhancements and fixes for the Directus software. Notable issues include problems with custom migrations, display issues in many-to-many relationships, and challenges with SDK custom storage settings.

Several issues highlight critical bugs that could potentially affect the stability and usability of Directus, such as #22683 where a "Cannot read properties of undefined (reading 'join')" error occurs during certain custom migrations. This issue is particularly significant as it affects the core functionality of database migrations within Directus.

Another critical issue is #22676, which discusses an incomplete display of related items in a many-to-many relationship, affecting non-admin accounts specifically. This could hinder user experience and data management capabilities within the platform.

Issue Details

Most Recently Created Issue

  • Issue: #22683
  • Title: "Cannot read properties of undefined (reading 'join')" when doing certain Custom Migrations
  • Priority: High
  • Status: Open
  • Creation Time: 0 days ago

Most Recently Updated Issue

  • Issue: #22673
  • Title: WIP initial TUS tests
  • Priority: Medium
  • Status: Open
  • Creation Time: 1 day ago
  • Last Update Time: 0 days ago

These issues indicate ongoing development and debugging efforts within the project to enhance functionality and address user-reported bugs. The presence of critical issues like these suggests a need for prompt attention and resolution to maintain the reliability and effectiveness of Directus as a content management system.

Report On: Fetch pull requests



Analysis of Open and Recently Closed Pull Requests

Open Pull Requests

  1. PR #22673: WIP initial TUS tests

    • Scope: Adds initial tests for TUS (resumable file uploads).
    • Status: Open, draft.
    • Notable Concerns:
    • It's a draft and still a work in progress.
    • No changeset found, which might be necessary for version tracking and package updates.
  2. PR #22672: SDK Custom Storage async setters

    • Scope: Updates SDK custom storage with async setters.
    • Status: Open.
    • Notable Concerns:
    • No changeset found, which might be necessary for version tracking and package updates.
  3. PR #22666: Throw errors when present in JSON responses

    • Scope: Modifies SDK to throw errors based on JSON response content.
    • Status: Open.
    • Notable Concerns:
    • Changeset detected but the PR is still open, indicating it might need further review or modifications.
  4. PR #22654: Add roles and permissions to the app

    • Scope: Integrates roles and permissions into the app interface.
    • Status: Open, draft.
    • Notable Concerns:
    • It's a draft and may require more changes before final approval.
    • Changeset detected but it's extensive, suggesting significant changes that need careful review.
  5. PR #22653: Fix junction relation lookup in the relations store

    • Scope: Fixes issues with junction relation lookup in the relations store.
    • Status: Open.
    • Notable Concerns:
    • Changeset detected, indicating readiness for merging pending reviews.

Recently Closed Pull Requests

  1. PR #22534: Replace mysql client with mysql2

    • Scope: Updates the project to use mysql2 instead of mysql.
    • Status: Closed without merging.
    • Notable Concerns:
    • Closed without merging indicates potential issues or reconsiderations about the change.
  2. PR #22457: Add mutex for app token refresh

    • Scope: Implements a mutex mechanism to handle concurrent app token refreshes securely.
    • Status: Closed without merging.
    • Notable Concerns:
    • Extensive discussion and review comments suggest complexity and potential risks involved with the implementation.
  3. PR #22434: Fix primary key unique constraint error extraction for MySQL

    • Scope: Fixes error handling for primary key constraint violations in MySQL.
    • Status: Closed without merging.
    • Notable Concerns:
    • The closure without merging could indicate unresolved issues or alternative solutions adopted.
  4. PR #22413: Consolidate content versioning

    • Scope: Consolidates content versioning mechanisms within the system.
    • Status: Closed without merging.
    • Notable Concerns:
    • Closure without merging suggests potential reevaluation of the approach or strategy.
  5. PR #22379: Implement permission policies in the API

    • Scope: Implements permission policies within the API for enhanced security and control.
    • Status: Closed without merging.
    • Notable Concerns:
    • Extensive discussions indicate complexity; closure without merging suggests alternative approaches might be considered.

Summary

  • Several significant PRs are open, many of which are drafts indicating ongoing development and testing phases.
  • A common issue observed is the absence of changesets in some PRs, which could affect version tracking and package management.
  • The closure of substantial PRs without merging suggests either high standards for acceptance or shifts in project direction or priorities. These should be reviewed to understand better why they were not merged and if those reasons impact other areas of the project.

Report On: Fetch Files For Assessment



Analysis of Source Code Files

1. api/src/controllers/utils.ts

Overview

  • Purpose: Contains utility functions used across various controllers.
  • Recent Changes: A recent commit addressed an issue with an invalid query for generating a random string, suggesting potential issues in the utility functions or their usage.

Specific Observations

  • Error Handling: It is crucial to review how errors are handled within utility functions, especially those that interact with databases or external services.
  • Security: Utility functions often handle sensitive data transformation or operations. Ensuring that these functions do not expose vulnerabilities (like SQL injection or improper data sanitization) is essential.
  • Performance: Given that utilities are used across various parts of the application, their performance impact should be minimal. Optimizations or refactoring might be needed if they are identified as performance bottlenecks.

2. api/src/services/roles.ts

Overview

  • Purpose: Manages user roles within the application, including creation, modification, and deletion of roles.
  • Recent Changes: Modifications related to updating user limits and role functionalities suggest this file is central to access control and user management.

Specific Observations

  • Access Control: The implementation of role-based access control (RBAC) should be scrutinized to ensure it adheres to security best practices, preventing privilege escalation.
  • Scalability: As roles and user limits can grow with the user base, the scalability of the solutions implemented in this file should be evaluated.
  • Code Maintainability: With critical business logic contained within, ensuring that the code is maintainable, well-documented, and cleanly structured is vital for future updates and debugging.

3. api/src/middleware/authenticate.ts

Overview

  • Purpose: Handles authentication middleware for the API, crucial for securing endpoints.
  • Recent Changes: Updates related to token validation and authentication flows indicate its importance in security architecture.

Specific Observations

  • Security Best Practices: The middleware must correctly implement authentication protocols and handle tokens securely (e.g., avoiding exposure to token hijacking).
  • Token Validation: The mechanisms for token validation need rigorous testing to prevent unauthorized access.
  • Integration with Other Services: How this middleware interacts with other components like user services or logging should be clear and secure.

4. api/src/services/graphql/index.ts

Overview

  • Purpose: Manages GraphQL API functionality, handling schema definitions, resolvers, and queries.
  • Recent Changes: Enhancements and error handling improvements in GraphQL schema management have been made recently.

Specific Observations

  • Schema Management: Proper management of GraphQL schemas is crucial for API stability and evolution. Any changes must ensure backward compatibility and minimal disruption to existing clients.
  • Error Handling: Enhanced error handling mechanisms are critical in providing meaningful feedback to API consumers and aiding in troubleshooting.
  • Performance Optimization: Given that GraphQL can potentially generate complex queries, performance optimizations such as query batching or caching should be considered.

5. api/src/services/users.ts

Overview

  • Purpose: Manages user-related operations such as registration, profile updates, and data retrieval.
  • Recent Changes: Significant updates related to user registration and management highlight its role in user lifecycle management.

Specific Observations

  • User Data Security: Protecting user data through encryption at rest, secure data transfer mechanisms, and proper access controls is paramount.
  • Input Validation: Robust input validation is necessary to prevent common vulnerabilities such as injection attacks or data corruption.
  • Integration Points: The service's interaction with databases, email services, or other external systems must be secure and efficient.

Each file plays a critical role in the application's functionality and security posture. Continuous monitoring for security vulnerabilities, performance bottlenecks, and maintainability issues is recommended.