DEV Community

Cover image for A Beginner's journey inside the Clojure/ClojureScript Web Dev Ecosystem 1
kurama 002
kurama 002

Posted on

A Beginner's journey inside the Clojure/ClojureScript Web Dev Ecosystem 1

I want to share with you my progress while i’m working on a web app, this project is mainly for (my) learning purposes, and by sharing this with you i’m aiming to get your help, advices or criticism, or maybe you are trying to build something similar, in the other side you may be just curious about creating something with the mentioned technologies and willing to see a (somehow) beginner trying his best to find the way through.

I’m still learning and experimenting and trying to get comfortable in the Clojure ecosystem, which is really awesome, but has a significant lack of documentations, and you can tell what does that mean for a beginner.
So, this will be a series of articles, in which i will talk about problems i face, and good things i discover or build.

The project is about a news social network “O2SN”, that will have the following features :

  • Getting news by location.
  • News will be ranked using various criteria : author’s honesty, objectivity … all those will be calculated automatically.
  • Seeing a (nearly) real time news ranks changes (highly ranked news get higher)
  • Everyone can post a story (which should be true and objective, otherwise the writer’s reputation will be affected, and his future news won’t rank well)
  • In case you want to post a story but a similar one already exists, you can claim it, the two stories (or more) will be merged (their ranks…), and people can see all the versions of (the newly) one story
  • People can mark a story as truth or lie (which will impact its ranking)
  • When a person marks a story as truth or lie its properties change according to the person’s reputation, and geographical distance between him and the story’s or event’s occurrence location.
  • And more ...

I created this project using luminus template, but i added some other libraries as well, so this is my current toolbox :

 :dependencies [[org.clojure/clojure "1.9.0"]
                 [org.clojure/clojurescript "1.10.238" :scope "provided"]
                 [org.clojure/tools.cli "0.3.6"]
                 [org.clojure/tools.logging "0.4.0"]
                 [org.clojure/data.json "0.2.6"]
                 [org.clojure/tools.trace "0.7.9"]
                 [org.clojure/tools.namespace "0.2.11"]
                 [org.clojure/test.check "0.10.0-alpha2"]
                 [buddy "2.0.0"]
                 [ch.qos.logback/logback-classic "1.2.3"]
                 [cider/cider-nrepl "0.15.1"]
                 [clj-oauth "1.5.5"]
                 [clj-time "0.14.3"]
                 [cljs-ajax "0.7.3"]
                 [compojure "1.6.0"]
                 [cprop "0.1.11"]
                 [funcool/struct "1.2.0"]
                 [luminus-aleph "0.1.5"]
                 [luminus-nrepl "0.1.4"]
                 [luminus/ring-ttl-session "0.3.2"]
                 [markdown-clj "1.0.2"]
                 [metosin/compojure-api "1.1.12"]
                 [metosin/muuntaja "0.5.0"]
                 [metosin/ring-http-response "0.9.0"]
                 [mount "0.1.12"]
                 [org.webjars.bower/tether "1.4.3"]
                 [cljsjs/semantic-ui-react "0.79.1-0"]
                 [cljsjs/react-transition-group "2.3.0-0"]
                 [cljsjs/react-motion "0.5.0-0"]
                 [re-frame "0.10.5"]
                 [reagent "0.7.0"]
                 [ring-webjars "0.2.0"]
                 [ring/ring-core "1.6.3"]
                 [ring/ring-defaults "0.3.1"]
                 [secretary "1.2.3"]
                 [selmer "1.11.7"]
                 [com.arangodb/arangodb-java-driver "4.3.4"]
                 [day8.re-frame/http-fx "0.1.6"]
                 [com.draines/postal "2.0.2"]]

At the end this the only working part right now ^ ^

signup form without errors

signup form with errors

It's just the beginning, and i hope i can end up with something that works (maybe few months later), and your help will be highly appreciated after two months or so, until i finish the backbone of the project and clean it up.

Finally, this is the project repository on Github : O2SN

Top comments (4)

Collapse
 
greencoder profile image
Vincent Cantin

When a person marks a story as truth or lie its properties change according to the person’s reputation, and geographical distance between him and the story’s or event’s occurrence location.

Why not simply mark the story as annotated by a person and let the viewers decide for themselves the value it has, based or the reported situation of that person at that time?

(it sounds like a good use case for Datomic!)

Collapse
 
kurama002 profile image
kurama 002

i'm not sure i understand what do you mean by "annotated", as i said, every one can review a piece of news, however, the impact of each person on that piece of news won't be the same, and the purpose of that, is to reduce biases and the possibility of taking down a post just because people from another part of the world marked it as a lie.
well, i'm still trying to find the best way to do that.

I'm planning to save all the locations inside that database as a graph, so that the user can subscribe to locations as big as a country or as small as a city, do you think this can be done with Datomic ?!

Collapse
 
greencoder profile image
Vincent Cantin • Edited

What I wanted to say is basically that from people's perspective, there is no 'one truth'. By that, I mean that people's beliefs are in the general case always conflicting.

As soon as you design a system that is judging a story's credibility, you are dividing your audience between people who agree your system and people who don't.

Each person has his own weighted trust network, you can't go against that as trust is not something you can force onto people.

I was suggesting to keep the original story and attach additional information to it, and let people decide by themselves (knowing the full data) what credibility they give to a story marked by some as a lie and by others as a truth.

In other words, I was suggesting to keep your app's data immutable and append only - which is what Datomic (among other things) does.

Thread Thread
 
kurama002 profile image
kurama 002

i think you've got a point, i will take that into consideration, thank you very much ^