2 min read
Rust + Htmx Todo App

ACTIX HTMX TODO APP

Simple Actix(Rust) web app that utilizes HTMX and Akshama templates on frontend. It uses Diesel to interact with Postgres database.

Why?

I could lie and make up some bs reasons but to be honest I just wanted to make one HTMX app so I can label myself as “Ceo of HTMX”. Also flexing that it was written in Rust was a plus. App serves no real purpose, it was just an experiment.

Featgures

  • Google login
  • Viewing current tasks
  • Adding task
  • Deleting task
  • Marking task as complete
  • Viewing completed task in history tab

Installation

First you need to go to Google Cloud Console and make OAuth Client ID. You can find the documentation here. After cloning and navigating to the project, make .env file with values:

DATABASE_URL=postgres://postgres:postgres@localhost/your_database
GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
GOOGLE_REDIRECT_URI=http://localhost:42069/google_callback

Make sure you add http://localhost:42069/google_callback as whitelisted domain in Google Cloud Console.

Then run:

cargo run

Open the http://localhost:42069/ to the it in action.