Skip to content

otsuki-dev/nova.jl

Repository files navigation

⚑ Nova.jl

A minimal, modular web framework for Julia

Julia Version Version License Tests Build Status

Docs β€’ Quick Start β€’ Examples β€’ Contributing


πŸŽ‰ Version 0.1.0 Released: Initial objectives achieved! All core features implemented, tested, and production-ready. See CHANGELOG.md for details.

Features

Development

  • Hot Reload - Instant feedback on changes
  • File-based Routing - pages/about.jl β†’ /about
  • Zero Configuration - Works out of the box
  • Professional CLI - Beautiful terminal UI

Production

  • One-command Build - julia nova build
  • Optimized Server - No hot reload overhead
  • Easy Deployment - Docker, systemd, cloud-ready
  • Environment Config - Flexible configuration

Minimal Core

  • Zero CSS by default
  • No bloat - Bring your own tools
  • Modular - 8 independent modules
  • Clean Code - Easy to understand

Full Stack

  • API Endpoints - JSON support built-in
  • Static Assets - Automatic serving
  • MIME Types - Auto-detection
  • Error Handling - 404/500 pages

Quick Start

# 1. Clone the repository
git clone https://github.com/otsuki-dev/nova.jl.git
cd nova.jl

# 2. Install dependencies
julia --project=. -e 'using Pkg; Pkg.instantiate()'

# 3. Start development server
julia nova dev

# 4. Open browser at http://localhost:2518

CLI Commands

Command Description Example
julia nova dev Start development server with hot reload julia nova dev --port 3000
julia nova build Build application for production julia nova build --aot
julia nova compile Compile framework to optimized sysimage (AOT) julia nova compile
julia nova start Start production server (no hot reload) julia nova start --host 0.0.0.0
julia nova help Show help and available commands julia nova help

See full CLI reference: QUICK_REFERENCE.md


Examples

Create a Page

File-based routing: src/pages/hello.jl β†’ /hello

# src/pages/hello.jl
function handler(req)
    return """
    <html>
        <body>
            <h1>Hello from Nova.jl!</h1>
            <a href="/">Back to home</a>
        </body>
    </html>
    """
end

Create an API Endpoint

# src/pages/api/users.jl
using HTTP, JSON

function handler(req)
    users = [
        Dict("id" => 1, "name" => "Alice"),
        Dict("id" => 2, "name" => "Bob")
    ]
    
    return HTTP.Response(
        200,
        ["Content-Type" => "application/json"],
        JSON.json(Dict("users" => users))
    )
end

Production Deployment

# 1. Build for production
julia nova build

# 2. Test locally
cd build && julia start.jl

# 3. Deploy to server
scp -r build/ user@server:/opt/myapp/
ssh user@server "cd /opt/myapp/build && julia start.jl"

🚒 Full deployment guide: DEPLOY.md


Project Structure

Nova.jl supports both a modern src/ structure (recommended) and a legacy root-level structure.

Modern Structure (Recommended)

my-app/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ pages/               Application routes
β”‚   β”‚   β”œβ”€β”€ index.jl         / route
β”‚   β”‚   └── api/             API endpoints
β”‚   β”œβ”€β”€ components/          Reusable UI components
β”‚   └── styles/              Global styles (SCSS/CSS)
β”‚
β”œβ”€β”€ public/                  Static files (images, etc.)
β”œβ”€β”€ Project.toml             Dependencies
└── dev.jl                   Development entry point

Legacy Structure

my-app/
β”œβ”€β”€ pages/                   Application routes
β”œβ”€β”€ components/              UI components
β”œβ”€β”€ styles/                  Global styles
β”œβ”€β”€ public/                  Static files
└── ...

Nova automatically detects which structure you are using.

Framework Core

nova.jl/
β”œβ”€β”€  src/                     Framework Core (8 modules)
β”‚   β”œβ”€β”€ Nova.jl               Main module
β”‚   β”œβ”€β”€ Server/               HTTP server & routing
β”‚   β”œβ”€β”€ Rendering/            HTML, styles & assets
β”‚   β”œβ”€β”€ DevTools/             Hot reload system
β”‚   └── Utils/                Helpers & utilities
β”‚
β”œβ”€β”€  test/                    Test suite (18 tests)
β”œβ”€β”€  examples/                Example applications
└──   nova                    CLI tool

Architecture details: ARCHITECTURE.md


Status: Version 0.1.0 Milestone βœ…

Nova.jl has reached its first major release milestone with all initial objectives achieved:

Feature Status Details
File-based Routing βœ… Complete Automatic route mapping from pages/ directory
Hot Reload βœ… Complete Instant feedback with julia nova dev
Error Handling βœ… Complete Semantic HTTP errors with beautiful pages (404, 400, 500)
Input Validation βœ… Complete Schema-based validation with custom validators
Static Assets βœ… Complete Automatic favicon detection and serving
CI/CD Pipeline βœ… Complete GitHub Actions testing on Julia 1.10, 1.11, 1.12
Docker Support βœ… Complete Production-ready Docker + nginx setup
Benchmarking βœ… Complete Performance tracking framework
Test Coverage βœ… Complete 36+ tests with 100% pass rate
Documentation βœ… Complete Comprehensive guides and API docs

Production Ready

Nova.jl is production-ready with all core functionality implemented and thoroughly tested. The framework is suitable for building:

  • Fast API servers
  • Full-stack web applications
  • Static site generators
  • Real-time applications (with extensions)

Documentation

Getting Started

Deployment

Project Info


Why Nova.jl?

⚑ Fast

Hot reload in development
Optimized for production
Minimal overhead

Simple

File-based routing
Zero configuration
Clean, modular code

Ready

Production builds
Easy deployment
Complete tooling


Testing

julia test/runtests.jl

Tests Coverage

All core modules are tested: Server, Routing, Rendering, Hot Reload, Utils


Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing)
  3. Add tests for your changes
  4. Ensure tests pass (julia test/runtests.jl)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing)
  7. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.


License

Nova.jl is released under the MIT License.


⭐ Show Your Support

If you find Nova.jl useful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs via GitHub Issues
  • πŸ’‘ Suggesting features
  • πŸ“– Improving documentation
  • 🀝 Contributing code

Built with ⚑ and ❀️ using Julia

Website β€’ Documentation β€’ Examples β€’ Changelog

About

A Julia web framework

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published