Popularity
7.7
Stable
Activity
0.0
Stable
51
6
4
Programming language: Crystal
License: MIT License
Tags:
Web Frameworks
Latest version: v0.5.2
amatista alternatives and similar shards
Based on the "Web Frameworks" category.
Alternatively, view amatista alternatives based on common mentions on social networks and blogs.
-
amethyst
Amethyst is a Rails inspired web-framework for Crystal language -
amber
A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance. -
lucky
A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts. -
kemalyst
A Rails like framework inspired by Kemal but includes the kitchen sink -
spider-gazelle
A Rails esque web framework with a focus on speed and extensibility for crystal lang -
moonshine
Web framework for Crystal language [DEPRECATED in favour of kemal] -
lattice-core
A WebSocket-first object-oriented framework for Crystal -
runcobo
An api framework with type-safe params, elegant json serializer. Thanks for enjoying it! ๐ป๐ป https://runcobo.github.io/docs/ -
Shivneri
Component based MVC web framework based on fort architecture targeting good code structures, modularity & performance. -
luckyframework
Fast, maintainable and confidence boosting web framework
Static code analysis for 29 languages.
Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
Promo
www.sonarqube.org
Do you think we are missing an alternative of amatista or a related project?
Popular Comparisons
README
Amatista

Deprecated!.
you want to use Kemal instead
This is a web framework build in Crystal to create quick applications.
Shard file
shard.yml
name: myapp
version: 0.0.1
dependencies:
amatista:
github: werner/amatista
Basic Usage
require "amatista"
class HelloWorldController < Amatista::Controller
get "/" do
html = %(<h1> Hello World </h1>)
respond_to(:html, html)
end
end
class Main < Amatista::Base
configure do |conf|
conf[:secret_key] = "secret"
end
end
app = Main.new
app.run 3000
Callbacks
class ApplicationController < Amatista::Controller
#It will be a redirection if the condition is fulfilled,
#it should not be a session with a key user_id for the redirect to works
before_filter(condition: -> { !get_session("user_id") }) do
redirect_to("/sessions/new")
end
end
View System
class HelloWorldController < Amatista::Controller
get "/tasks" do
tasks = Task.all
# You're going to need a LayoutView class as
# a layout for set_view method to work
respond_to(:html, IndexView.new(tasks).set_view)
end
get "/tasks.json" do
tasks = Task.all
respond_to(:json, tasks.to_s.to_json)
end
end
class LayoutView < Amatista::BaseView
def initialize(@include)
end
set_ecr "layout"
end
class IndexView < Amatista::BaseView
def initialize(@tasks)
end
def tasks_count
@tasks.count
end
set_ecr "index"
end
#Views:
#layout.ecr
<html>
<head>
<title>Todo App</title>
<link rel="stylesheet" type="text/css" href="/app/assets/stylesheets/bootstrap-theme.min.css" media="all">
<link rel="stylesheet" type="text/css" href="/app/assets/stylesheets/bootstrap.min.css" media="all">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-8">
<%= @include %>
</div>
</div>
</div>
<script src="/app/assets/javascripts/jquery-2.1.3.min.js"></script>
<script src="/app/assets/javascripts/main.js"></script>
<script src="/app/assets/javascripts/bootstrap.min.js"></script>
</body>
</html>
#index.ecr
<div class="panel panel-success">
<div class="panel-heading">
<h2 class="panel-title">Todo Tasks</h2>
</div>
<div class="panel-body">
<table class="table">
<tbody>
<% @tasks.each do |task| %>
<tr>
<td>
<%= check_box_tag(:task, "id#{task[0]}", task[0], task[2], { class: "checkTask" }) %>
<%= label_tag("task_id#{task[0]}", task[1].to_s) %>
</td>
<td>
<%= link_to("Edit", "/tasks/edit/#{task[0]}", { class: "btn btn-success btn-xs" }) %>
</td>
<td>
<%= link_to("Delete", "/tasks/delete/#{task[0]}", { class: "del btn btn-danger btn-xs" }) %>
</td>
<tr>
<% end %>
<tbody>
</table>
<%= link_to("New Task", "/tasks/new", { class: "btn btn-info btn-xs" } ) %>
<%= label_tag("total", "Total: #{tasks_count}" ) %>
</div>
</div>
Example
Contributing
- Fork it ( https://github.com/werner/amatista/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request