An attempt to port/rebuild Spree, an open source e-commerce solution, with Phoenix.
Spree is an excellent product however, for several reasons, it started to show some limits:
- being written in Ruby and Rails requires a lot of hosting resources
- it became a big, monolithic piece of software, really hard to customize
- it slowed down the development pace (perhaps because of the point above)
So here's the deal: why not to port/rebuild Spree with Elixir and Phoenix? The main idea is to take inspiration from the many Spree's good parts and build a new generation ecommerce for the next years.
See TODO for more details, meanwhile, here there are some intentions:
The first short term goal is to quickly build a bare-bones MVP with the core models (eg: Product
, Variant
, Order
, LineItem
, ...) and the necessary code to glue them through isolated, well defined commands. Then, at a very high level:
- get a monolithic app, for now
- as a Customer (say a guest user for the first iteration), I want to purchase products (add to cart -> do checkout)
- as an Admin, I want to manage products and orders through an HTTP-JSON API
Once we get an initial, working, very basic product, we can start to split the whole app into components. Very similar to Spree:
core
: contains the core models and their basic integrations (queries, commands, ...);api
: all actions should be done from an HTTP-JSON API, so anyone can build its custom frontend (eg: a Single Page App, command line, mobile app, ...), especially for admins;frontend
: uses plain old server-rendered HTML pages;admin
: not a top priority. it's likefrontend
, for admins;- extensions: everything that doesn't strictly fit into the above components, should be done in a dedicated package. After all, some features are very specific to certain needs, we don't want another monolithic piece of software.
Don't know right now, world domination™? :-)
- Be nice with others
- Check issues or, if your prefer kanban boards, we have waffle too
- Fork this repo
- Write code (and tests)
- Open a PR
- Copy
.env-example.exs
to.env.exs
, then edit it to set secret configs - Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Run tests with
mix test
- Install npm dependencies with
npm install
- Start Phoenix endpoint with
mix phoenix.server
- Visit
localhost:4000
from your browser
- Nebulab for the support.
- Contributors.
- @olistik because he solved the issue #1 :-)