Git Product home page Git Product logo

ujjwalguptaofficial / shivneri Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 2.0 2.41 MB

Component based MVC web framework based on fort architecture targeting good code structures, modularity & performance.

Home Page: https://shivneriforcrystal.com/

License: Apache License 2.0

Crystal 94.36% HTML 4.92% JavaScript 0.72%
mvc-framework fort component-based web-framework http-server oops crystal modularize fort-architecture crystal-language

shivneri's Introduction

GitHub version Crystal CI Docs

Shivneri

Component based MVC web framework based on fort architecture for crystal targeting good code structures, modularity & performance.

Features

  • Based on Fort architecture.
  • MVC Framework and follows OOPS approach so everything is class and object.
  • Provides components - Wall, Shield and Guard. Components help modularize the application.
  • Everything is configurable - you can configure your session store, view engine, websocket etc.
  • Dependency Injection.
  • Everything can be unit tested, so you can use a TDD approach.

Examples

Doc Site

https://shivneriforcrystal.com/

shivneri's People

Contributors

ujjwalguptaofficial avatar waghanza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

shivneri's Issues

Guards error

I'm following the rest code example, and I'm having this error in the guards:
Sem título

I already implemented check(), but the error continues

module Rest
  module Guard
    class UserValidator < Shivneri::Guard
      @[Inject("as_body")]
      @[BodySameAs("UserController", "add_user")]
      def check(user)
        err_message = validate user
        if (err_message.size > 0)
          return text_result(err_message, 400)
        end
      end

      def validate(user)
        if (user.name.size < 5)
          return "name should be minimum 5 characters"
        elsif (!["male", "female"].include? user.gender)
          return "gender should be either male of female"
        end
        return ""
      end
    end
  end
end

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.