Skip to content

BerkeleyTrue/conduit-clj-htmx

Repository files navigation

Real World App

The mother of all demo apps

License: MIT

Clojure/Hiccup/HTMX/XTDB codebase containing RealWorld examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec as much as possible while sticking to HATEOAS principals.

This codebase was created to demonstrate a fully fledged backend application built with Clojure/HTMX including CRUD operations, authentication, routing, pagination, and more.

How it works

Getting started

The app listens and serves on 0.0.0.0:3000.

Do drop into a nix shell (you will need the nix package manager installed)

nix develop

This will install the binaries needed as well as display useful information to get started developing.

Project status

In Progress...

Todo

  • Docker Build

    a build to let non-nix users run server

Doing

  • switch to libsql

Done

  • refactor to xtdb
    • swap out datalevin for xtdb
    • swap session to xtdb or some kv store other then datalevin
  • Auth
    • Add is authed middleware
    • Return and list errors from form
    • Login
      • Post to Login
      • Add user to session
      • Add user data to layout
      • Flash message on success
    • Sign Up
      • Post
      • Create user
      • Flash message on success
      • Sign out
      • Can re-login
  • Settings page
    • Get settings page
    • make errors dynamic
    • add post for form
    • add logout handler
    • Update settings
      • image
      • username
      • bio
      • email
      • password
  • Get new/edit articles page
    • edit tags
    • /editor/slug - edit
      • Load article and prefill page
      • update links to patch
    • /editor - new
  • Home
    • Render Page
    • load global articles
    • Load tags
    • load user feed articles
    • pagination
    • load tags from article preview (FE only)
  • Views
    • add banners
    • add error message on htmx 500
  • Comments
    • API
      • create comment on article
      • delete comment from article
      • get article comment by slug
    • Repo
      • create
      • read by id
      • list by article id
      • delete
    • Service
      • create
      • delete
      • mark if owner
  • Get Article page
    • delete if owner
    • Follow/Unfollow author
    • Favorite/Unfavorite article
    • comments
      • Get on load
      • mark if owner
      • delete comment if owner
    • /article/:slug
  • Articles
    • Repo
      • create
      • get by id
      • get by slug
      • list by favorited
      • update
      • favorite
      • unfavorite
      • delete
    • Service
      • create
      • find
      • update
      • favorite
      • unfavorite
      • delete article
    • Api
      • Filter articles
        • by author
        • by tag
        • by favorites
        • by author
      • Favorite
      • Unfavorite
      • Insert tags
      • Get popular tags
      • delete article
  • Profile page
    • Get profile page
    • link to settings
    • hide follow if own profile
    • Make content live
    • follow author
    • show favorited articles
  • Add seed data import
    • Add xtdb
    • Add init script
    • Add users
    • Add articles
    • Add default user on cli flag
    • Add author details
    • Add comments

About

A RealWorld example app built with Clojure, HTMX, and XTDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •