Rails inspired web-framework middleware
0.1.7 Latest release released

#Amethyst-logo Build Status Join the chat at

Amethyst is a web framework written in Crystal language. The goals of Amethyst are to be extremely fast and provide agility in application development as Rails do. Why I called it "Amethyst"? Because Crystal has a light purple color at GitHub like amethyst gemstone.

Latest version - 0.1.7 Note that Amethyst is at it early stages, so it lacks for whole bunch of things. But you can give a hand with contributing.

Amethyst examples

For detailed information, see docs on our wiki below:

Here are some benchmarking results

For now, next things are implemented:

  • class-based controllers with method-based actions
  • views for actions (*.ecr)
  • filters for action
  • middleware support
  • simple REST routing
  • default routes for controller
  • path, GET and POST params inside actions
  • basic cookies support
  • static files serving
  • http logger and timer for developers
  • simple environments support
  • simple session support


Here is classic 'Hello World' in Amethyst

require "amethyst"

class WorldController < Base::Controller
  actions :hello

  view "hello", "#{__DIR__}/views"
  def hello
    @name = "World"
    respond_to do |format|
      format.html { render "hello" }

class HelloWorldApp < Base::App
  routes.draw do
    all "/",      "world#hello" 
    get "/hello", "world#hello" 
    register WorldController

app =

# /views/hello.ecr
Hello, <%= name %>


Feel free to fork project and make pull-requests. Stick to standart project structure and name conventions:

    module1/       # module1 files
      ...   # loads all module1 files into namespace Amethyst::Module1
    module2/    # describe class Class1 (module, struct, i.e)
      ...   # loads all module2 files into namespace Amethyst::Module2 # module that consists of one file      # requires,,

  module1/ # specs for Module1::Class # loads main spec_helper
  spec_helper      # loads "amethyst/all"

examples/          # examples to play with
                   # don't forget to require "..src/amethyst" or "..src/all"


I would be glad for any help with contributing.

  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request


  github: amethyst-framework/amethyst
  version: ~> 0.1.7
Crystal none

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently