Welcome! Please see the About page for a little more info on how this works.

+11 votes
in Libs by

If you would have to start a new project (web-app) from scratch (naturally in #Clojure) what would be your stack? (Backend, Frontend, and everything in-between).

The initial questions was asked here: https://twitter.com/JacekSchae/status/1155852483270459392

7 Answers

+11 votes
by
edited by

fulcro3[1] + crux[2]

Both fulcro3 and crux are currently alpha so it's definitely a risky choice over standard re-frame + postgres apps but I love the ambitious ideas behind them.

It's basically data-driven, time-travel enabled CQRS full-stack that promises unprecedented productivity once this tech matures.

Fulcro is what lured me into Clojure in the first place. It would be incredibly difficult to build it in any other language - JS world had attempts with Apollo or Meteor but IMHO Fulcro makes better design decisions (choosing Clojurescript is one of them).

[1] http://fulcro.fulcrologic.com/
[2] https://juxt.pro/crux/index.html
[3] https://github.com/souenzzo/graph-demo example with react native support

by
Fulcro3 is still in alpha but Fulcro 2 is not. The latter has been around for years and is not riskier than re-frame
+3 votes
by

I'd use RUM for HTML templating and rendering, because it has nice support for server-side rendering that can hook up later to a React component, or simply revert to plain old HTML, and thus work in Clojure and ClojureScript.

I'd use React with ClojureScript and RUM on the client side for fancier JS components if needed.

I might try Datomic Cloud for my server side persistent state and Datascript for my client side transient state.

And I think I'd give a go to reitit for routing and http-kit as my html client/server. Feel like the speed of reitit might be worth it, also it now supports ring and pedestal, and has nice support for Swagger using Clojure Spec. http-kit gives me a Clojure only HTML client/server which I like.

+2 votes
by

reagent, re-frame, spec, bidi, ring, netty, aleph

+1 vote
by
edited by

I updated my answer, because I added features.

I'm using hoplon for front-end. Chord for RPC to backend. Connecting to CouchBD using a REST interface.

I have a 300 lines CLI tools and figwheel-main based project that I start out from:
https://github.com/rpompen/mkproj-demo

It's generated by the following shell script:
https://github.com/rpompen/mkproj

I'm keeping things as simple as can be to start out with. It offers a CRUD example to a CouchDB backend.

0 votes
by

On the frontend I've been experimenting with hx and have really been enjoying some of the modern react APIs (hooks in particular). For state management I've always enjoyed re-frame so I ended up starting a port of it that works with hx (hx-frame - very early stages, has most of the re-frame API - doesn't support subscription signal functions and a lot of the logging that exists in re-frame so experimental to say the least). Server side I've been experimenting with AWS and the serverless patterns that have been emerging. So that's what mine would look like but it's definitely not out of the experimental phase.

0 votes
by

Frontend: Reagent+Reframe
Backend: Pedestal
Database: Datomic Cloud

0 votes
by

For my current project I'm using:

  • Fulcro 3
  • Pathom
  • Datomic
  • Pedestal
  • Lacinia
  • Deps.edn
  • Shadow-CLJS

The server has two graph API endpoints:
/api is read/write EQL [1], handled by Pathom resolvers
/grapqhl is read-only GraphQL, handled by Lacinia resolvers
both of which are auto-generated from a single EDN definition.

As great as Lacinia is at making GraphQL easy in Clojure, I've enjoyed so much more working with the EQL API via Fulcro and Pathom.

[1] https://edn-query-language.org/eql/1.0.0/what-is-eql.html

...