Giter VIP home page Giter VIP logo

devboard's Introduction

Devboard

A dashboard for developers to monitor project activity. Dynamic configuration supports parsing slack messages or dispatching periodic web requests.

Setup

Create a configuration config.ts file in the root of the project. The configuration follows schema defined in src/types/config.ts. Here is an example of what it might look like (all values and tokens are AI generated):

import type { Config } from "~/types/config";

export const config: Config = {
  slack: {
    appToken:
      "xapp-1-B12JK8K9DQA-9876543210-zyxwvutsrqponmlkjihgfedcba9876543210",
    token: "xoxb-1234567890-0987654321098-abcdef123456ghijklmnopqrs",
  },

  builds: {
    development: {
      success: {
        match: /completed<[^>]+>\s\((\w+)\)/,
        channel: "C3XY12AB34",
        extra: "mentioned",
        user: "U87654321",
        exclude: ["-test"],
        include: ["-release"],
        capture: 1,
      },
      fail: {
        match: /failure<[^>]+>\s\((\w+)\)/,
        channel: "C3XY34AB56",
        extra: "mentioned",
        user: "U87654321",
        exclude: ["-test"],
        include: ["-release"],
        capture: 1,
      },
      pending: {
        match: /build initiated/,
        channel: "C3XY34AB56",
        extra: "mentioned",
        user: "U87654321",
        exclude: ["-test"],
        include: ["-release"],
      },
    },
    preproduction: {
      success: {
        match: /completed<[^>]+>\s\((\w+)\)/,
        include: ["-release", "-live"],
        channel: "C3XY34AB56",
        extra: "mentioned",
        user: "U87654321",
        capture: 1,
      },
      fail: {
        match: /failure<[^>]+>\s\((\w+)\)/,
        include: ["-release", "-live"],
        channel: "C3XY34AB56",
        extra: "mentioned",
        user: "U87654321",
        capture: 1,
      },
      pending: {
        match: /build initiated/,
        include: ["-release", "-live"],
        channel: "C3XY34AB56",
        extra: "mentioned",
        user: "U87654321",
      },
    },
  },
  activity: {
    idle: {
      match: /class="status_active\b[^"]*"[^>]*>\s*([0-9]+)/,
      url: "https://example.org/status",
      interval: 15 * 60_000,
      capture: 1,
    },
    event: {
      channel: "C0456XYZ890",
      match: /(\s|\S)+/,
      capture: "extra",
      extra: "author",
    },
  },
  statistics: {
    "Merged Branches": {
      match: /<@[A-Z0-9]+>/g,
      channel: "G1XY2Z3AB4",
      include: ["done"],
    },
    "Support Messages": {
      channel: "C0456XYZ890",
      match: /(\s|\S)+/g,
    },
    "Tasks Planned": {
      channel: "C7XYZ1234L",
      match: /`[^`]+`/g,
    },
  },
};

Install packages, init database, build project, run:

bun install
bun db:push
bun run build
bun start

Optionally there is also mock.sql file which contains fake data to try out the dashboard.

devboard's People

Contributors

azarattum avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.