A toy project to teach myself/explore Clojurescript
An idea:
- All "business logic" happens via
core.async
pub/sub - Views only react to database changes
This may be too convoluted and I might rethink the approach, but why not :)
Datascript. Read the author's own blog posts on it to see what is going on (all of them backed up by source code):
Using Datascript's d/listen!
we re-render the app when database is updated
core.async Pub Sub.
A core.async
channel is acting as a message queue. You can publish messages
to a topic in this queue. You can subscribe to the queue and listen to messages
in a topic. Yes, this works even in the browser.
Got this idea from Chatting cats use DataScript for fun
This way you can implement the entire Redux architecture in ten lines of code.
Copy profiles.clj.sample
to profiles.clj
and edit :env
values to your
liking.
Note: This is a client-side only app. So any secrets you define there will be injected into the page and visible to anyone with access to the page's Javascript.
To get an interactive development environment run:
lein figwheel
or
rlwrap lein figwheel
for a better REPL
Open your browser at localhost:3449.
MIT, see LICENSE