PitchHut logo
Cyclopt Server
Central API for software quality management and project coordination.
Pitch

Cyclopt Server serves as the backbone of the Cyclopt platform, providing essential APIs for managing software projects. It collects data, triggers code analyses, and integrates with external services, empowering teams to enhance software quality effectively and streamline project workflows.

Description

Cyclopt Server serves as the central API backend for the Cyclopt platform, dedicated to enhancing software quality and effective project management. This mature backend solution offers an array of RESTful endpoints designed for:

  • Collecting and integrating project data such as commits, pull requests, issues, and tasks.
  • Triggering and routing code analysis results sourced from various analyzer services.
  • Managing projects, repositories, and teams within a cohesive framework.
  • Facilitating user authentication, handling subscriptions, and sending notifications.
  • Seamlessly integrating with external developer platforms and services.

The Cyclopt Server is the foundational component of the Cyclopt ecosystem, responsible for orchestrating multiple submodules according to the specific environment configuration, promoting efficient data flow and enhanced user experience.

Overview and Purpose

Cyclopt Server is designed to:

  • Respond to repository webhooks including commits, pull requests, and issues.
  • Manage the queuing of analysis jobs in RabbitMQ.
  • Delegate in-depth code analysis to Cyclopt Analyzers.
  • Store analysis results in MongoDB for easy access and retrieval.
  • Route outcomes to diverse platforms:
  • Efficiently manage user roles, subscriptions, and integration configurations.

Event Flow

VCS Webhook → Server → RabbitMQ → Cyclopt Analyzers → MongoDB → Server →
 ├─ Panorama (dashboards)
 └─ Communication Service → Companion (notifications)

Architecture Diagram

flowchart LR
  A["Webhook (GitHub/GitLab/Bitbucket/Azure)"] --> B[Server]
  B --> C[RabbitMQ]
  C --> D["Cyclopt Analyzers"]
  D --> E[(MongoDB)]
  D --> F[(Google Cloud Storage)]
  E --> G["Server (post-analysis router)"]
  F --> G["Server (post-analysis router)"]
  G --> H[Panorama UI]
  H --> I[Communication Service]
  I --> J[Companion UI]

Technology Stack

Cyclopt Server is built upon a robust technology stack that includes:

  • Node.js (v20+) for a modern ES modules codebase.
  • Express.js to facilitate RESTful APIs and middleware.
  • MongoDB & Mongoose serving as the persistence layer.
  • RabbitMQ (AMQP) for efficient message queuing.
  • Sentry for comprehensive error monitoring.
  • Google Cloud Storage for secure file handling and analysis results storage.
  • Stripe for managing subscriptions and billing processes.
  • SendGrid to manage email notifications.
  • OAuth2 integrations with popular platforms including GitHub, GitLab, Bitbucket, Azure DevOps, and Auth0.
  • Support for several internal services such as Cyclopt Analyzers and Communication Service.

Usage

Cyclopt Server provides multiple API endpoints under the /api/ prefix, which are secured by JWT authentication. Clients can authenticate using either a cookie (_cyclopt=<token>) or a header (Authorization: Bearer <token>).

Examples:

  • GET /api/projects - Lists all projects available.
  • POST /api/projects - Creates a new project.
  • GET /api/projects/:id/analyses - Fetches analysis results for a specific project.

API Documentation

To generate static API documentation, ensure apidoc comments are present in the code and run:

npm run buildDoc

Open the generated files located in the doc/ directory for detailed usage instructions.

0 comments

No comments yet.

Sign in to be the first to comment.