https://github.com/kemalcr/kemal
Fast, Effective, Simple Web Framework
https://github.com/kemalcr/kemal
api crystal efficient fast json kemal rest simple web-framework websocket
Last synced: 6 days ago
JSON representation
Fast, Effective, Simple Web Framework
- Host: GitHub
- URL: https://github.com/kemalcr/kemal
- Owner: kemalcr
- License: mit
- Created: 2015-10-23T16:56:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T19:40:56.000Z (11 days ago)
- Last Synced: 2025-04-09T17:19:12.926Z (6 days ago)
- Topics: api, crystal, efficient, fast, json, kemal, rest, simple, web-framework, websocket
- Language: Crystal
- Homepage: https://kemalcr.com
- Size: 788 KB
- Stars: 3,677
- Watchers: 71
- Forks: 190
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - kemal - Lightning Fast, Super Simple web framework. Inspired by Sinatra (Web Frameworks)
- awesome-luooooob - kemalcr/kemal - Fast, Effective, Simple Web Framework (Crystal)
- awesome-crystal - kemal - Lightning Fast, Super Simple web framework. Inspired by Sinatra (Web Frameworks)
- awesome-crystal - kemal - Lightning Fast, Super Simple web framework. Inspired by Sinatra (Web Frameworks)
- stars - kemalcr/kemal - Fast, Effective, Simple Web Framework (Crystal)
README
[](http://kemalcr.com)
# Kemal
Kemal is the Fast, Effective, Simple Web Framework for Crystal. It's perfect for building Web Applications and APIs with minimal code.
[](https://github.com/kemalcr/kemal/actions/workflows/ci.yml)
## Why Kemal?
- 🚀 **Lightning Fast**: Built on Crystal, known for C-like performance
- 💡 **Super Simple**: Minimal code needed to get started
- 🛠 **Feature Rich**: Everything you need for modern web development
- 🔧 **Flexible**: Easy to extend with middleware support## Quick Start
1. First, make sure you have [Crystal installed](https://crystal-lang.org/install/).
2. Add Kemal to your project's `shard.yml`:
```yaml
dependencies:
kemal:
github: kemalcr/kemal
```3. Create your first Kemal app:
```crystal
require "kemal"# Basic route - responds to GET "http://localhost:3000/"
get "/" do
"Hello World!"
end# JSON API example
get "/api/status" do |env|
env.response.content_type = "application/json"
{"status": "ok"}.to_json
end# WebSocket support
ws "/chat" do |socket|
socket.send "Hello from Kemal WebSocket!"
endKemal.run
```4. Run your application:
```bash
crystal run src/your_app.cr
```5. Visit [http://localhost:3000](http://localhost:3000) - That's it! 🎉
## Key Features
- ✅ **Full REST Support**: Handle all HTTP verbs (GET, POST, PUT, DELETE, etc.)
- 🔌 **WebSocket Support**: Real-time bidirectional communication
- 📦 **Built-in JSON Support**: Native JSON handling
- 🗄️ **Static File Serving**: Serve your static assets easily
- 📝 **Template Support**: Built-in ECR template engine
- 🔒 **Middleware System**: Add functionality with middleware
- 🎯 **Request/Response Context**: Easy parameter and request handling## Learning Resources
- 📚 [Official Documentation](http://kemalcr.com)
- 💻 [Sample Applications](https://github.com/kemalcr/kemal/tree/master/samples)
- 🚀 [Getting Started Guide](http://kemalcr.com/guide/)
- 💬 [Community Chat](https://discord.gg/prSVAZJEpz)## Contributing
We love contributions! If you'd like to contribute:
1. Fork it (https://github.com/kemalcr/kemal/fork)
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## Acknowledgments
Special thanks to Manas for their work on [Frank](https://github.com/manastech/frank).
## License
Kemal is released under the MIT License.