GithubHelp home page GithubHelp logo

vinicius-ianni / rustgpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitswired/rustgpt

0.0 0.0 0.0 18.43 MB

RustGPT is a ChatGPT UI built with Rust + HTMX: the power of Rust coupled with the simplicity of HTMX πŸ’š

License: GNU Affero General Public License v3.0

Shell 0.48% JavaScript 0.23% Rust 55.71% CSS 0.90% HTML 40.14% Dockerfile 1.57% Just 0.98%

rustgpt's Introduction

RustGPT πŸ¦€βœ¨

RustGPT.Blog.Post.mp4

Welcome to the RustGPT repository! Here, you'll find a web ChatGPT clone entirely crafted using Rust and HTMX, where technology meets simplicity and performance. πŸš€

Introduction

RustGPT is my latest experiment in cloning the abilities of OpenAI's ChatGPT. It represents the fourth iteration in a series of clones, each built with different tech stacks to evaluate their functionality in creating a ChatGPT-like application.

In this repository, you will find a Rust-based server leveraging the Axum framework combined with HTMX, providing a Rusty web development experience. From database operations to streaming responses, this project covers a broad spectrum of backend functionalities and real-time web interactions.

So, for Rust enthusiasts and web developers alike, dive in to explore a world where web development is redefined with the power of Rust!

Features 🌟

  • Rust with Axum Framework: A fast and reliable server that's all about performance and simplicity.
  • SQLite: A lightweight yet powerful database for all your data persistence needs.
  • Server Sent Events (SSE): Real-time streaming made easy to bring life to the ChatGPT interactions.
  • HTMX: No hefty JavaScript frameworks neededβ€”HTMX keeps interactions snappy with simple HTML attributes.

Tech Stack πŸ› οΈ

  • sqlx: Direct and type-safe SQL queries and migrations.
  • tera: A templating engine inspired by Jinja2, for rendering the HTML views.
  • axum: A web application framework that's easy to use and incredibly fast.

For those eyeing some client-side WASM magic, you might also want to check out Yew or Leptos for more complex applications.

Quickstart 🏁

Jump right into it by following these steps:

  1. Clone the repository.
  2. Create a .env
MIGRATIONS_PATH=db/migrations
TEMPLATES_PATH=templates
DATABASE_URL=sqlite:db/db.db
DATABASE_PATH=db/db.db
OPENAI_API_KEY=<api-key> (only necessary for tests, users will add their own keys)
  1. Install TailwindCSS Standalone in this repository: https://tailwindcss.com/blog/standalone-cli.
  2. cargo install just: install Just
  3. just init: install additional tools and migrate the db
  4. just dev: concurrently run tailwind and cargo run in watch mode
  5. Open your browser and enjoy chatting with your Rust-powered ChatGPT clone (port 3000 by default)

Contributing 🀝

Contributions are what make the open-source community an incredible place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make RustGPT better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thank you again!

Acknowledgments πŸŽ“

Hats off to the wonderful crates and libraries that made RustGPT possible!


Created with πŸ’š by a Rustacean who believes in the power of Rust for the web! Follow the journey on Bitswired.

rustgpt's People

Contributors

jimzer avatar

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.