Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 7 additions & 41 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go CI & Docs Deployment
name: Go CI & Site Deployment

on:
push:
Expand Down Expand Up @@ -40,8 +40,8 @@ jobs:
- name: Run Go Tests
run: go test -v ./...

deploy-docs:
name: Build and Deploy Documentation
deploy-site:
name: Build and Deploy Site
runs-on: ubuntu-latest
needs: lint-test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand All @@ -66,52 +66,18 @@ jobs:
go install github.com/xlc-dev/nova@latest
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: Setup Rust and mdBook
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache mdBook and mdbook-mermaid
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/mdbook
~/.cargo/bin/mdbook-mermaid
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-mdbook-mermaid
- name: Install mdBook
run: |
if ! command -v mdbook &> /dev/null
then
cargo install mdbook --locked
fi
- name: Install mdbook-mermaid
run: |
if ! command -v mdbook-mermaid &> /dev/null
then
cargo install mdbook-mermaid --locked
fi

- name: Generate Nova Documentation
run: |
echo "Running nova gendoc..."
nova gendoc
echo "Nova docs generated."

- name: Build mdBook
- name: Run fssg
run: |
echo "Building mdBook..."
cd docs
mdbook build
cd ..
echo "mdBook build complete."
cd ./www
./fssg -n -j 50

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./docs/"
path: "./www/dist/"

- name: Deploy to GitHub Pages
id: deployment
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Thumbs.db
*.venv
*.db
novarun
dist/
30 changes: 0 additions & 30 deletions Makefile

This file was deleted.

73 changes: 53 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,21 @@ 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.

## Features
## Features

- 🛠️ **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.
- **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.

## 🚀 Getting Started
## Getting Started

### Prerequisites

- Go 1.23 or later
- Make (optional, does _make_ life easy ;) – pun intended)

### Installation

Expand Down Expand Up @@ -74,29 +73,63 @@ go install github.com/xlc-dev/nova@latest

```sh
# Build the binary
go build

# Or, if you enabled Makefile during `nova new`
# make build
go build -o novarun

# Run the application
./myproject
./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.

## 📚 Documentation
### Common Go Commands

Here are some common Go commands you might use for development:

- **Build the application:**

```sh
go build -o novarun
```

This command compiles your Go application and creates an executable named `novarun` in the current directory.

- **Run the application:**

```sh
./novarun
```

Executes the built application.

- **Format Go source code:**

```sh
goimports -w .
go fmt ./...
```

These commands format your Go code according to Go's standard style. `goimports` also adds/removes necessary imports.

- **Run tests:**
```sh
go test ./... -v
```
This command runs all tests in your project and its subdirectories, with verbose output.

## Documentation

Documentation is available to guide you through Nova's features and usage, including how the binary and library work together. The docs are created and built using [mdBook](https://github.com/rust-lang/mdBook). All documentation can be found in the `docs/src` folder written in Markdown.
Documentation is available to guide you through Nova's features and usage. The docs are created and built using [ffsg](https://xlc-dev.github.io/fssg/).
A fast static site generator written by yours truely.
All documentation can be found in the `docs/src` folder written in Markdown.

➡️ **[Read the full documentation here](https://xlc-dev.github.io/nova/book)**
**[Read the full documentation here](https://xlc-dev.github.io/nova/docs)**

## 🤝 Contributing
## Contributing

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](./CONTRIBUTING.md) for guidelines.

## 📜 License
## License

This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
6 changes: 6 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Package main implements a Fullstack HTTP Web Framework called Nova.

See https://xlc-dev.github.io/nova for more information about Nova.
*/
package main // import "github.com/xlc-dev/nova/nova"
33 changes: 0 additions & 33 deletions docs/book.toml

This file was deleted.

1 change: 0 additions & 1 deletion docs/book/.nojekyll

This file was deleted.

Loading
Loading