Skip to content

Ray-Hughes/zag-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zag Framework

Zag is a minimalistic web framework written in Zig, inspired by Ruby on Rails.

Features

  • Routing: Define URL mappings to controller actions.
  • HTTP Server Integration: A built-in, basic HTTP server that listens for incoming connections and dispatches requests to appropriate handlers.
  • Middleware Support: (Planned) Extend functionality using a middleware system.
  • Templating: (Planned) Render dynamic HTML responses.
  • Database Integration: (Planned) ORM-style model interactions.
  • Scaffolding: (Planned) Code generation for models, controllers, and views.

Installation

  1. Install Zig
  2. Clone this repository:
    git clone https://github.com/yourusername/zag_framework.git
    cd zag_framework
  3. Build the project:
    zig build

Usage

Start the server:

zig build run

By default, the server listens on 0.0.0.0:8080. Access it via your browser or a tool like curl.

Example Routes

try router.get("/", homeHandler);
try router.get("/about", aboutHandler);

Roadmap

  • Routing System
  • HTTP Server Integration
  • Middleware
  • Model Layer (ActiveRecord-like)
  • View Layer (HTML Templating)
  • CLI (zag new MyApp)

Contributing

Feel free to open issues and contribute!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages