DEV Community

loading...
Cover image for How To Build a Full Stack Clojure Project

How To Build a Full Stack Clojure Project

kelvinmai profile image Kelvin Mai ・2 min read

This is a video series that covers building a simple full stack CRUD application with clojure and clojurescript.

What you will learn

The main focus here is the language of clojure itself, and the libraries used isn't as important. There is a small assumption that you are already a javascript/react developer and so some technologies have been chosen should be familiar, like the usage of VS Code instead of emacs. This is also the reason why helix was chosen instead of something more popular like reagent, because if you already know modern React, I didn't want that knowledge to be thrown away. If you don't know modern react however, it shouldn't be difficult to follow along.

Reitit Ring Set Up

Database Configuration

  • Use hugsql to connect to a postgresql database
  • Write SQL to generate CRUD functions

API endpoints

  • Create api routes and endpoints for each of the CRUD operations

Front End Preparation

  • Set up shadow-cljs for front end dev server and dependencies
  • Use Helix to add React to our front end
  • Add Taliwind CSS for styling and theming
  • Connect to the backend api we've built

React Components

  • Create react components by using the helix library

State Management

  • Set up a redux style state management system using react context
  • Introduction to clojure multimethods

Final Integration

  • Integrating our state management with api requests
  • A little bit of styling with tailwind css

Follow and support me

Discussion (2)

pic
Editor guide
Collapse
seanthegreat profile image
Sean Antony Brunton

I am facing a moral crisis.. IntelliJ IDEA (with Cursive plugin for Clojure) or VSCode?, Damn it look nice with this Insomnia API. Still face a moral dilemma here, as I want to avoid Emacs to be different. LoL..

Collapse
seanthegreat profile image
Sean Antony Brunton

Wanted advice, not a reaction. Judging on this, I will surpass you in your skills in Clojure very quickly. Watch out! 🤣 Thanks anyway. I'll still watch your and follow your lessons though. I'll quickly surpass you because of it.