Giter Site home page Giter Site logo

cljs-rum-realworld-example-app's Introduction

SWUbanner

Hey ๐Ÿ‘‹ I'm software engineer, doing web UIs at work, 3D graphics programming and Blender hobbyist, diggin LLMs, but not too much

Twitter | YouTube

If you like what I do, consider supporting my work via donation

cljs-rum-realworld-example-app's People

Contributors

foopang avatar lavgl avatar mjmeintjes avatar roman01la avatar yanisurbis avatar yanzaytsev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cljs-rum-realworld-example-app's Issues

Unit testing

RealWorld frontend spec requires the app to have at least one unit test for demonstration purpose. There could be tests for controllers at least.

Assert failed: Circular dependency detected, conduit.components.root -> conduit.components.home -> conduit.core -> conduit.components.root

$ rlwrap lein figwheel dev
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - dev
Compiling "resources/public/js/compiled/conduit.js" from ["src"]...
Failed to compile "resources/public/js/compiled/conduit.js" in 3.862 seconds.
----  Could not Analyze  src/conduit/components/root.cljs  ----

  Assert failed: Circular dependency detected, conduit.components.root -> conduit.components.home -> conduit.core -> conduit.components.root
(every? (fn* [p1__2308#] (not (contains? *cljs-dep-set* p1__2308#))) deps)

----  Analysis Error : Please see src/conduit/components/root.cljs  ----
Figwheel: initial compile failed - outputting temporary helper application to resources/public/js/compiled/conduit.js

To fix this from core.clj move the routes def, which is i.e.:

(def routes
  ["/" [["" :home]
        [["page/" :page] :home]
        [["tag/" :id] [["" :tag]
                       [["/page/" :page] :tag]]]
        [["article/" :id] :article]
        ["editor" [["" :editor]
                   [["/" :slug] :editor]]]
        ["login" :login]
        ["register" :register]]])

to a separate namespace conduit.routes, as follows:

(ns conduit.routes)

(def routes
  ["/" [["" :home]
        [["page/" :page] :home]
        [["tag/" :id] [["" :tag]
                       [["/page/" :page] :tag]]]
        [["article/" :id] :article]
        ["editor" [["" :editor]
                   [["/" :slug] :editor]]]
        ["login" :login]
        ["register" :register]]])

and change core.clj and components/home.clj requires as follows:

(ns conduit.core
  (:require [rum.core :as rum]
            [citrus.core :as citrus]
            [goog.dom :as dom]
            [conduit.effects :as effects]
            [conduit.routes :refer [routes]]
            [conduit.router :as router]
            [conduit.controllers.articles :as articles]
            [conduit.controllers.tags :as tags]
            [conduit.controllers.tag-articles :as tag-articles]
            [conduit.controllers.article :as article]
            [conduit.controllers.comments :as comments]
            [conduit.controllers.router :as router-controller]
            [conduit.controllers.user :as user]
            [conduit.controllers.profile :as profile]
            [conduit.components.root :refer [Root]]
            [conduit.components.home :as home]
            [conduit.components.article :refer [Article]]))
(ns conduit.components.home
  (:require [rum.core :as rum]
            [citrus.core :as citrus]
            [bidi.bidi :as bidi]
            [conduit.mixins :as mixins]
            [conduit.routes :refer [routes]]
            [conduit.components.grid :as grid]
            [conduit.components.base :as base]))

to fix (seems to work) cyclic dependency issue.

Add authorization

I'd like to implement auth as a next part. This covers:

  • 'Sign in' page
  • 'Sign up' page
  • Differentiating navigation menu for logged and non-logged users
  • 'Log out' button on 'Settings' page
  • Storing user info and jwt token

I suppose this functionality will be covered by several PRs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.