Skip to content

πŸ’Ž A lightweight Ruby web framework inspired by Sinatra, designed for educational purposes and simplicity.

License

ArviiSoft/mini-ruby-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MiniRubyWeb

A lightweight Ruby web framework inspired by Sinatra, designed for educational purposes and simplicity.


πŸš€ Features

Feature Description
πŸ›£οΈ Routing Supports static and dynamic routes
🧭 Controllers BaseController structure for logic separation
🧾 Views ERB rendering system for templates
βœ… Rack Compatible Works with rackup and middleware
πŸ” Testable Designed with RSpec and modularity in mind

πŸ—‚οΈ Project Structure

mini_ruby_web/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ base_controller.rb
β”‚   β”œβ”€β”€ mini_ruby_web.rb
β”‚   └── router.rb
β”œβ”€β”€ controllers/
β”‚   └── users_controller.rb
β”œβ”€β”€ views/
β”‚   └── user_show.erb
β”œβ”€β”€ app.rb
└── config.ru

πŸ”§ Usage

Start the server

rackup

Example Routes

app.get "/merhaba" do |req, res|
  res.write "Merhaba ArviS."
end

app.get "/users/:id" do |req, res|
  controller = UsersController.new(req, res)
  controller.show
end

πŸ“¦ Future Improvements

  • Middleware support
  • Sessions and cookies
  • ORM integration (e.g., ActiveRecord)
  • CLI tool
  • RESTful routing

About

πŸ’Ž A lightweight Ruby web framework inspired by Sinatra, designed for educational purposes and simplicity.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published