No description
Find a file
Ethosa 8c3fad7181
Merge pull request #400 from zivoslav/master
openArray, enableLiveViews, modelName => corrected capitalization
2025-10-02 19:21:54 +07:00
.github update tests.yml 2024-12-11 00:20:47 +07:00
bindings fix: language bindings 2025-01-17 12:57:58 +07:00
examples openArray, enableLiveViews, modelName => corrected capitalization 2025-10-02 12:42:35 +02:00
src openArray, enableLiveViews, modelName => corrected capitalization 2025-10-02 12:42:35 +02:00
tests fix: issue #395 2025-01-29 13:48:02 +07:00
.editorconfig add .editorconfig 2024-05-03 21:00:23 +07:00
.gitignore try to improve python bindings 2024-01-13 16:54:41 +07:00
build_java.cmd update JVM bindings (#209) 2023-12-09 19:24:00 +07:00
build_py.cmd changed happyxpy to happyx 2024-07-24 20:18:31 +07:00
build_py_debug.cmd changed happyxpy to happyx 2024-07-24 20:18:31 +07:00
Dockerfile add dockerfile 2024-01-13 14:28:58 +07:00
happyx.nimble chore: switch version 2025-01-24 15:16:30 +07:00
LICENSE Change LICENSE to MIT License 2023-07-21 16:48:48 +07:00
README.md changed happyxpy to happyx 2024-07-24 20:18:31 +07:00

Macro-oriented asynchronous full-stack web-framework written in Nim with ♥

Nim language Python language

JavaScript language TypeScript language

wakatime Testing

Documentation Tutorials

VS Code Plugin

Python Bindings NodeJS Bindings

Why HappyX? 💁‍♀️

HappyX is a web framework with asynchronous, macro-oriented, full stack support.

In HappyX you can write single page, static site generation and server side rendering applications 💡

You can write Rest API with HappyX also 🔌

HappyX is very simple to use. Keep your peace of mind 🙂

Why Not Jester/Karax? 🤔

Jester and Karax have many features, but Jester is a backend web framework, and Karax is a frontend web framework. HappyX is a full-stack web framework that combines the features of Jester and Karax and slightly improves them 🛠

With HappyX you mustn't learn new libraries/frameworks to switch between frontend and backend. You can switch between them easily using HappyX ✌

HappyX is macro-oriented web framework so you mustn't write a lot of code

Features

  • Multiple options for HTTP server! Happyx use asynchttpserver as default HTTP server (httpx via -d:happyxHttpx, httpbeast via -d:happyxBeast and microhttpserver via -d:happyxMicro as alternative HTTP servers).
  • Support SPA on JS backend and SSR on other backends.
  • Build HTML, CSS and pure JS with buildHtml, buildStyle and buildJs macros.
  • Request models that supports JSON/XML/Form-Data/x-www-form-urlencoded with model macro.
  • Routing and powerful path params.
  • Assignment path params with pathParams macro.
  • Powerful mounting sub-applications with mount macro.
  • Logging with -d:debug.
  • Automatic translate with -d:hpxTranslate or -d:translate flags.
  • CLI tool for creating, serving and building your projects.
  • Hot code reloading (only for SPA projects as of now).
  • Python bindings
  • NodeJS bindings

Minimal Example 👩‍💻

SPA SSR
import happyx
appRoutes "app":
  "/":
    "Hello, world!"

import happyx

serve "127.0.0.1", 5000:
  "/":
    "Hello, world!"

Get Started 👨‍🔬

Installing 📥

Nimble

nimble install happyx@#head

Nimble via Git

nimble install https://github.com/HapticX/happyx

PyPI

pip install happyx

Usage ▶

SSR

hpx create --name ssr_project --kind SSR
cd ssr_project/src

Main script will be able in /ssr_project/src/main.nim

Run 💻

HTTP Server Flag
Default no flags
Httpx -d:httpx
MicroAsyncHttpServer -d:micro
HttpBeast -d:beast

SPA

hpx create --name spa_project --kind SPA --path-params
cd spa_project

Main script will be able in /spa_project/src/main.nim

Run 💻

Just run this command and see magic

hpx dev --reload

Have A Question? 👀

StackOverflow

Have A Nice Idea? 🍍

Open issue or contact us hapticx.company@gmail.com

Contributing 🌀

See Contributing.md for more information

Donate 💰

Tinkoff

Star History

Star History Chart