Git Product home page Git Product logo

backender's Introduction

Backender

Backender is a dynamic open-source project crafted in C#. It empowers your website by automating the creation of its backend infrastructure using the repository pattern. With Backender, you can swiftly and efficiently develop a robust backend, transforming your vision into reality.

Table of Contents

Nuget Packages

Package NuGet Stable Downloads
Backender.CLI Backender.CLI Backender.CLI

Getting Started

  1. Install from .NET Core Global Tool
  dotnet tool install --global Backender.CLI --version 2.0.2
  1. Create or edit Blueprint file
  2. the command line executes the Backender command.
    • Backender
    • wait for prompt to enter the Blueprint file path
    • carriage return execution command
  3. wait for the end of the task execution.
  4. Edit the created projects as you need.
  5. Enjoy the time saved!

Sample of Blueprint File

<Blueprint ValidationControl="FluentValidation">
<Solution Name="GoBlog" Namespace="GoBlog"/>
<Domains>
<Enum Name="CommentStatus">
<EnumValue Name="Pending" Value="1"/>
<EnumValue Name="Accepted" Value="2"/>
<EnumValue Name="Failed" Value="3"/>
</Enum>
<Entity Name="Post">
<Col Name="Title" Type="string"/>
<Col Name="Author" Type="string"/>
<Col Name="Content" Type="string"/>
</Entity>
<Entity Name="Comment">
<Col Name="Name" Type="string"/>
<Col Name="CommentStatus" Type="CommentStatus"/>
<Col Name="Email" Type="string" Options="email"/>
<Col Name="Content" Type="string"/>
</Entity>
<Entity Name="Category">
<Col Name="Title" Type="string"/>
<Col Name="Description" Type="string" Options="DisplayName(توضیحات) required"/>
</Entity>
<RelationShip Entity1="Post" Entity2="Comment" Type="O2M"/>
<RelationShip Entity1="Category" Entity2="Post" Type="O2M"/>
<GlobalOption Id="ShortString" EntityCols="root.Title, Post.All(), Post.Comment" Options="Length(0,250) required"/>
</Domains>
</Blueprint>
  • Tags Explanation:
    • <Blueprint>: Defines the Blueprint file and its configuration with the following attributes:

      • ValidationControl (optional): Specifies the validation control mechanism for the Blueprint. Allowed values include: FluentValidation, DataAnnotations.
    • <Entity>: Defines an entity with the following attributes:

      • Name (required): Specifies the name of the entity.
      • Category (optional): Specifies the category or group to which the entity belongs.
    • <Col>: Defines a column within an entity with the following attributes:

      • Name (required): Specifies the name of the column.
      • Type (required): Specifies the data type of the column.
      • options (optional): Specifies the options for the column, such as validation rules.
    • <RelationShip>: Defines a relationship between two entities with the following attributes:

      • Entity1 (required): Specifies the name of the first entity in the relationship.
      • Entity2 (required): Specifies the name of the second entity in the relationship.
      • Type (required): Specifies the type of relationship. Allowed values include: O2O (One-to-One), O2M (One-to-Many), M2M (Many-to-Many).
    • <Enum>: Defines an enumeration with the following attributes:

      • Name (required): Specifies the name of the enumeration.
    • <EnumValue>: Defines a value within an enumeration with the following attributes:

      • Name (required): Specifies the name of the value.
      • Value (required): Specifies the corresponding value for the enumeration value.
    • <Solution>: Specifies the name and namespace of the solution with the following attributes:

      • Name (required): Specifies the name of the solution.
      • Namespace (required): Specifies the namespace of the solution.
    • <Reference>: References other blueprint files, allowing the reuse of entity definitions with the following attributes:

      • Href (required): Specifies the path or location of the referenced blueprint file.
      • Type (required): Specifies the type of reference. Allowed values include: Partial/blueprint,template/blueprint.
    • <GlobalOption>: Sets global options for entity columns, allowing the application of options to multiple columns at once. It has the following attributes:

      • EntityCols (required): Specifies the target columns to which the options should be applied.
      • Options (required): Specifies the options to be applied to the target columns.

More Information

Introducing Backender 2: Enhanced Speed, Blueprints, Validations, and More

Blueprint: The Only Thing That Backender Needs

backender's People

Contributors

mahdihoseinpoor avatar shupsta avatar

Stargazers

Kh.Moh3en avatar  avatar Moritz Reis avatar Mr K avatar Fasil Marshooq avatar Iain Rough avatar Timur Zakirov avatar  avatar Greg DeMaderios avatar Hassan Gulzar avatar Ali Bashiri avatar  avatar YuChia avatar Guillaume Gnaegi avatar joonhwan avatar Macojn avatar Raphael Kuster avatar  avatar NITIN VARMA MANTHENA avatar Long Ngo avatar Scott Manktelow avatar Luis Pirir avatar David Barbero avatar Masashi Fujita avatar Javier Martínez avatar Dillan Cagnetta avatar send2vinnie avatar  avatar Steve A avatar Byron Jones avatar Moe Vakili avatar Soheib Papi avatar Nguyen Viet Manh avatar Ryan Spain avatar Jeff West avatar  avatar sajad mehri avatar

Watchers

send2vinnie avatar Luis Pirir avatar  avatar

backender's Issues

Backender is not working

I want to test, but is not working.
I have the error bellow:

Enter your Configuration File Location: D://Backender/configs/GoBlog.yaml
--- D://Backender/configs/GoBlog.yaml -> The Config File Processing has been start
ErrorCode | Description
BA901 | The SavePath is null, your Solution will Create in 'Documents/Backender 2023/Sources'

    Backender Engine Start to Generate!

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Backender.CodeGenerator.Patterns.Repo.DtoHandler.ImplementFactory(Class entityFactory, String entityCategory) in E:\Creations of my Mind\Palokino\Programmings\Backender\src\Backender.CodeGenerator\Patterns\Repo\DtoHandler.cs:line 207
at Backender.CodeGenerator.Patterns.Repo.DtoHandler.AddPrepareMethod(Class entityFactory, Entity entity, Project coreProj, List1 entities) in E:\Creations of my Mind\Palokino\Programmings\Backender\src\Backender.CodeGenerator\Patterns\Repo\DtoHandler.cs:line 141 at Backender.CodeGenerator.Patterns.Repo.DtoHandler.FactoriesGenerate(List1 entities, Project& proj, Project coreProj) in E:\Creations of my Mind\Palokino\Programmings\Backender\src\Backender.CodeGenerator\Patterns\Repo\DtoHandler.cs:line 89
at Backender.CodeGenerator.Patterns.Repo.RepoPatternGenerator.Run() in E:\Creations of my Mind\Palokino\Programmings\Backender\src\Backender.CodeGenerator\Patterns\Repo\RepoPatternGenerator.cs:line 77
at Backender.CodeGenerator.Engine.Run(Config config) in E:\Creations of my Mind\Palokino\Programmings\Backender\src\Backender.CodeGenerator\Engine.cs:line 33
at Backender.ConsoleApp.Program.Main(String[] args) in E:\Creations of my Mind\Palokino\Programmings\Backender\src\Backender.CLI\Program.cs:line 70
at Backender.ConsoleApp.Program.

(String[] args)

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.