Build Powerful Web Applications in Go, Faster.
Nova is a Go framework designed to help you build robust and scalable web applications with ease. It leverages the power of Go's standard library while providing convenient tools and abstractions to accelerate your development workflow.
Nova consists of two main components:
- The Nova Binary: A command-line tool (installed via
go install
) that handles project generation, scaffolding, and database migrations. It's perfect for setting up new projects quickly and managing some boilerplate. - The Nova Library: The library that provides the functionality for building web applications, including REST APIs, middleware, and more. Your generated projects with the binary import this library.
- CLI Tooling: Integrated command-line tooling to build any CLI for your application.
- Project Scaffolding: Quickly generate new projects with a sensible default structure using
nova new
. - Database Migrations: Manage database migrations effortlessly with the
nova
binary. - Streamlined REST APIs: Simplified routing, request handling, and response generation.
- Validation & OpenAPI: Built-in support for request validation and OpenAPI (Swagger) spec generation.
- Middleware Support: Easily add and manage middleware for enhanced functionality.
- Templating Engine: Built-in support for building HTML templates within Go files.
- Go 1.24 or later
Install the Nova binary globally to get started with a Nova project quickly:
go install github.com/xlc-dev/nova@latest
-
Create a new Nova project: Follow the interactive prompts to set up your application.
nova new myproject
-
Navigate to your project directory:
cd myproject
-
Build and run your application: The generated project includes the Nova library, so building it will handle the web application logic.
# Build the binary go build -o novarun # Run the application ./novarun
Your application should now be running on
http://localhost:8080
. From here, you can explore the library's features like REST APIs and middleware.
Here are some common Go commands you might use for development:
-
Build the application:
go build -o novarun
This command compiles your Go application and creates an executable named
novarun
in the current directory. -
Run the application:
./novarun
Executes the built application.
-
Format Go source code:
goimports -w . go fmt ./...
These commands format your Go code according to Go's standard style.
goimports
also adds/removes necessary imports. -
Run tests:
go test ./... -v
This command runs all tests in your project and its subdirectories, with verbose output.
Documentation is available to guide you through Nova's features and usage. The docs are created and built using ffsg. A fast static site generator written by yours truely.
Read the full documentation here
Contributions are welcome! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please feel free to open an issue or submit a pull request.
Please read the CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.