Skip to content
/ trak Public

Playing around with Spotify APIs in Clojurescript

License

Notifications You must be signed in to change notification settings

dmitriid/trak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trak

A toy project to teach myself/explore Clojurescript

Overview

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 :)

What database?

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

What pub/sub?

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.

What/how?

Setup

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.

License

MIT, see LICENSE

About

Playing around with Spotify APIs in Clojurescript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published