gacelita / ventas

Clojure ecommerce platform
Eclipse Public License 1.0
124 stars 14 forks source link
clojure clojure-spec clojurescript datomic ecommerce elasticsearch help-wanted http-kit re-frame reactjs reagent semantic-ui-react ventas-ecommerce websockets

ventas

Build Status Clojars Project License

ventas was a WIP ecommerce platform written entirely in Clojure.

Documentation

Motivation

No open source ecommerce project satisfies me. I've been working with most of them for years and I think they suck. I won't name any, but this is roughly what I think about the available solutions:

Note that these points don't mean that ventas does not or will not commit the same sins. I just try not to.

Getting started

At the moment, ventas is unfit for its purpose. However, if you are a developer and just want to see the project in action, read on.

You need to have git and leiningen installed. You also need access to a Datomic database and an Elasticsearch instance. (See Setting up a local environment with docker-compose if you feel comfortable with Docker)

First clone the project and cd into it:

$ git clone https://github.com/JoelSanchez/ventas
$ cd ventas

Now you can start the REPL:

$ lein repl

When the REPL is ready, execute init:

user=> (init)
:reloading (ventas.common.utils ventas.utils ventas.config ventas.database ventas.database.schema ventas.database.entity ventas.entities.product-variation ventas.database.generators ventas.entities.i18n ventas.entities.brand ventas.plugin ventas.database.seed ventas.entity-test ventas.events repl ventas.entities.image-size ventas.paths ventas.entities.file ventas.server.ws ventas.logging ventas.server ventas.server-test ventas.auth ventas.entities.user ventas.test-tools ventas.database-test ventas.entities.product-taxonomy ventas.server.pagination ventas.utils.images ventas.server.api ventas.entities.configuration ventas.entities.address ventas.entities.product-term client ventas.plugins.featured-categories.core ventas.plugins.slider.core ventas.entities.order-line ventas.entities.order ventas.common.utils-test ventas.entities.resource ventas.entities.category ventas.entities.product ventas.entities.country ventas.entities.tax ventas.entities.state ventas.plugins.blog.core ventas.plugins.featured-products.core user)
INFO [ventas.database:27] - Starting database, URL: datomic:dev://localhost:4334/ventas
INFO [ventas.server:99] - Starting server
INFO [ventas.server:102] - Starting server on 0.0.0.0:3450
INFO [client:28] - Starting Figwheel
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - app
Compiling "resources/public/files/js/compiled/ventas.js" from ["src/cljs" "src/cljc" "test/cljs" "test/cljc"]...
Successfully compiled "resources/public/files/js/compiled/ventas.js" in 8.252 seconds.
Figwheel: Starting CSS Watcher for paths  ["resources/public/files/css"]
INFO [client:42] - Starting SASS
:done

Then, execute the setup! function, which will migrate the database, install fixtures, etc.:

(ventas.core/setup!)

Now you can open localhost:3450/admin to see the administration. A frontoffice is not included, but you can check out ventas-demo for an example.

To enter the backoffice you'll need to create an admin user for yourself:

(entity/create :user {:first-name "Admin"
                      :email "your@email.com"
                      :password "yourpassword"}

To do frontend development in the backoffice:

lein sass4clj auto
shadow-cljs watch :admin

You can connect to the nREPL server created by shadow-cljs to get a CLJS RPEL:

lein repl :connect localhost:4002
user=> (shadow.cljs.devtools.api/nrepl-select :admin)

Setting up a local environment with Docker Compose

A docker-compose.yaml file is included:

docker-compose up -d

Overview

Backend

Frontend

Contributing

I'd appreciate help in any part of the project.

Please read CONTRIBUTING.md