How To Build a Full Stack Clojure Project
Kelvin Mai
Posted on August 3, 2020
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
- Manage dependencies with deps.edn
- Set up a ring server with http-kit and reitit
- Add middlewares and test routes
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
Posted on August 3, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.