Dragonfly, POC full-stack web app DSL

Overview

Dragonfly

Dragonfly is a toy DSL that explores ways to describe the structure of full-stack web applications. You should not use it in production.

For a production-ready solution, check out Wasp.

Crates

Dragonfly

  • ast — The initial Abstract Syntax Tree that Dragonfly is parsed into.
  • ir — An Intermediate Representation that is more suitable for code generation.
  • cli — A command-line interface to generate code from Dragonfly files.

Data structures

  • token-set — An insertion-ordered set of String values.
  • ord-str-map — An insertion-ordered map with keys of type String.

Generators

  • prisma — Generate and print a Prisma schema.
  • graphql — Generate and print a GraphQL schema.
  • typescript — Generate and print TypeScript types.

Utilities

  • parser — Combinators for parsing the DSL.
  • print — A trait for printing types.

Example application

model Image {
  title: String
  country: Country
  category: [Category]
  dimensions: @Dimensions
}

model Dimensions {
  width: Int
  height: Int
}

query images: [Image] {
  image {
    title
    country {
      name
    }
    category
  }
}

query imagesByCountryName($name: CountryName): [Image] {
  image {
    title
    category
  }
  where {
    image {
      country {
        name {
          equals: $name
        }
      }
    }
  }
}

enum DrivingSide {
  Left
  Right
}

model Country {
  domain: String
  drivingSide: DrivingSide
  flag: String
  name: CountryName
}

enum CountryName {
  Albania
  Andorra
  Austria
  Yemen
  Zambia
  Zimbabwe
}

enum Category {
  Architecture
  Bollard
  Chevron
  TrafficLight
  TrafficSign
  UtilityPole
}

TODO short-term

  • Automate test coverage collection.
  • Show test coverage in README.
  • Implement FromInterator and Extend for collections.
  • Generate foreign keys in PSL.
  • Generate GraphQL types.
  • Generate full GraphQL queries.
    • CLI: generate GQL.
  • Support aggregate queries :)
You might also like...
🦚  A web-app pentesting suite written in rust .
🦚 A web-app pentesting suite written in rust .

Kanha - A web-app pentesting suite written in rust 🦀 Installation ⦾ Subcommands ⦾ Contribute Kanha is a tool that can help you perform, a variety of

A full featured, fast Command Line Argument Parser for Rust

clap Command Line Argument Parser for Rust It is a simple-to-use, efficient, and full-featured library for parsing command line arguments and subcomma

full text search manpages

buke full text search manpages cargo run --release -- --build builds an sqlite3 database out of all manpages in your $MANPATH cargo run --release -- "

A full featured, fast Command Line Argument Parser for Rust

clap Command Line Argument Parser for Rust It is a simple-to-use, efficient, and full-featured library for parsing command line arguments and subcomma

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.
Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

xcp is a (partial) clone of the Unix cp command. It is not intended as a full replacement

xcp is a (partial) clone of the Unix cp command. It is not intended as a full replacement, but as a companion utility with some more user-friendly feedback and some optimisations that make sense under certain tasks (see below).

A TUI for your todos built in Rust with full CLI support.

todui TUI Features This app allows for almost anythig you would need when dealing with todos: Create, edit, and delete tasks Add links to tasks Add du

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models
Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models, supports talking, speaking assessment, memorizing words with contexts, Listening test, so on.

"Better" tab and stack navigation for Sway WM.

sway_bfocus "Better" tab and stack navigation for Sway WM. Proof of concept. This program lets you create one set of keybinds exclusively for cycling

Owner
Bas Dirks
Bas Dirks
🦀🔨 DevBcn Workshop - Full Stack Rust - Actix - Postgres - Shuttle - Dioxus

Building a Movie Collection Manager - Full Stack Workshop with Rust, Actix, SQLx, Dioxus, and Shuttle Welcome to the this workshop! In this hands-on w

BcnRust 57 Jul 12, 2023
Mypyc DSL grammar for tree-sitter

tree-sitter-mypyc Mypyc DSL grammar for tree-sitter. Installing (Neovim) This is based on the Neovim Tree-sitter docs for adding new parsers. Basicall

dosisod 3 Dec 30, 2022
Noir, Circom, and Halo2 exercises for DSL workshop at ZKSummit10

ZKSummit10 - Exploring Noir, Circom, halo2 Workshop Prompt Write Noir, Halo2 and Circom circuits that constrain integer division i.e decimals are trun

Richard Liang 4 Sep 21, 2023
A high level DSL for Simplicity. This is a work in progress and is not yet ready for production use

A high level DSL for Simplicity. This is a work in progress and is not yet ready for production use. The language is designed to be simple and easy to use. It is inspired by rust syntax and is statically typed. The syntax will be extended in the future to support more features.

null 13 Oct 28, 2023
Sero is a web server that allows you to easily host your static sites without pain. The idea was inspired by surge.sh but gives you full control.

sero Lightning-fast, static web publishing with zero configuration and full control ?? Table Of Contents ?? Table Of Contents ?? Tools ❓ About The Pro

Dmitry Miasnenko 6 Nov 13, 2023
WIP / POC for using the ESP32C3 and ESP32 wifi drivers in bare-metal Rust

Wifi on ESP32C3 and ESP32 (on bare-metal Rust) About This is experimental and work-in-progress! You are welcome to experiment with it and contribute b

esp-rs 135 Jan 2, 2023
A PoC for the CVE-2022-44268 - ImageMagick arbitrary file read

CVE-2022-44268 Arbitrary File Read PoC - PNG generator This is a proof of concept of the ImageMagick bug discovered by https://www.metabaseq.com/image

Cristian 'void' Giustini 100 Feb 19, 2023
[PoC] An all-in-one preview window for the furries

previuwu An all-in-one preview window for the furries. Uses egui to render the preview window. STATUS: Proof of Concept ( ⚠️ heavy work in progress).

Arijit Basu 9 Feb 10, 2023
Prompt Description Language [POC]

Prompt Description Language (V0.1.1 POC) Description PDL (Prompt Description Language) format provides an extensible way to describe the behavior and

Alex 192 Jun 5, 2023
A todo list app that indexes your app to find TODO:'s

forgot A todo list app that indexes your app to find TODO:'s Usage to list all your todos forgot list list all your todos ignoring search in ./target,

null 2 Oct 6, 2022