Giter Club home page Giter Club logo

relation-builder's Introduction

Relationships Builder

PHP

  • Eloquent
  • Doctrine ORM

Python

  • Django
  • Other

Disclaimer: When building complex apps, I often forget the order of keys in Belongs To Many and Has Many Through relationships. Initially, someone (whom I unfortunately do not know) created a similar app at https://rel.uonick.com/. Unfortunately, it is no longer available, so I rebuilt it and included all possible Eloquent relationships.

Relationships Builder designed to facilitate the creation of Eloquent, Doctrine, Django relationships in your applications.

Built with Vue 3, Vuetify, and TypeScript, this dynamic web interface provides a user-friendly environment to define and customize relationships like hasOne, hasMany, belongsTo, morphToMany, and more.

Features

  • Dynamic Relationship Configuration: Easily configure various types of relationships using a user-friendly web interface.
  • Support for Multiple Relationship Types: Includes hasOne, hasMany, belongsTo, belongsToMany, hasManyThrough, morphTo, morphMany, and morphToMany.
  • Interactive UI: Built with Vuetify, offering a responsive and intuitive design.
  • Local and Demo Installation: Can be installed locally for development and testing or accessed via a live demo.

Demo

Check out the live demo: Relationships Builder Demo

Requirements

  • Node.js (I use v21.7.3)
  • npm or yarn
  • Laravel environment (for local installation)

Installation

Local Installation

  1. Clone the Repository

    git clone kwidoo/relation-builder.git
    cd relation-builder
  2. Install Dependencies

    npm install
    # or
    yarn install
  3. Environment Setup

    • Ensure your Laravel backend is setup and running.
    • Configure any necessary environment variables, such as API endpoints.
  4. Serve the Application

    npm run dev
    # or
    yarn dev

    This will compile and hot-reload for development.

    By default will be available on http://localhost:3000

Using Docker

  • Add docker setup

    docker-compose up -d

    Access it:

    http://localhost:3000
    

Usage

After installation, navigate to the main page where you can select the type of relationship you wish to configure. Fill in the required fields such as model names and keys, and the tool will dynamically generate the corresponding relationship methods.

For Laravel

You can choose to either include generated code in your model or, by default, download a trait and use it in your model.

You can also select a namespace, if required.

  • Allow saving, editing, and deleting namespaces
  • Enable the generation of default scopes
  • Allow the creation of migrations

Todo

  • Check syntax of stubs
  • Setup strict eslint

Contributing

Contributions are welcome! Please feel free to submit pull requests, or report bugs and suggest features via the issue tracker.

License

This project is open-sourced software licensed under the MIT license.

relation-builder's People

Contributors

kwidoo 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.