Giter VIP home page Giter VIP logo

htmx-bun-login's Introduction

HTMX-Bun Login

Introduction

Welcome to the HTMX-Bun Login Project! This project demonstrates how to build a login system using a modern web development stack consisting of HTMX, JSX (as a templating engine), Bun, and Elysia.js. The focus is on simplicity and clarity to help beginners understand the fundamentals of web application development with these technologies.

Project Structure

  • src/app.tsx: The server setup, route definitions, and authentication handling.
  • src/layouts.tsx: Contains JSX-based layout templates used throughout the application.

Technologies Used

  • HTMX: An extension to HTML, enabling advanced features directly in HTML.
  • JSX: Used as a templating engine to describe the UI components in a more readable format.
  • Bun: A fast all-in-one JavaScript runtime with a built-in package manager and bundler.
  • Elysia.js: A JavaScript framework for building efficient, scalable Node.js server-side applications.

Setup and Installation

  1. Clone the Repository: git clone https://github.com/cindersax/htmx-bun-login.
  2. Install Dependencies: Run bun install to install the required packages.
  3. Starting the Server:
    • For development: Run bun run dev for a hot-reload development server.
    • For production: Run bun run start to start the application.

Understanding the Code

src/app.tsx

  • Main server setup and entry point.
  • Defines routes and handles HTTP requests.
  • Implements authentication using @elysiajs/jwt for JWT tokens and cookies.

layouts.jsx

  • Defines JSX-based layout templates for consistent look and feel across different pages.

Contributing

Contributions are welcome! If you have suggestions or want to improve the code, please feel free to create a pull request or open an issue.

htmx-bun-login's People

Contributors

cindersax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rodriguegratian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.