# @omes/admin

> Admin UI for Spree

Latest version **0.0.10** (published 2022-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @omes/admin
pnpm add @omes/admin
yarn add @omes/admin
bun add @omes/admin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2022-10-28 |
| First published | 2022-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 21 |
| Unpacked size | 3.3 MB |
| Known vulnerabilities | 0 (+21 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Matthew Kennedy |
| Maintainers | matthewkennedy |

## Links

- npm: https://www.npmjs.com/package/@omes/admin
- Repository: https://github.com/matthewkennedy/spree_admin
- Homepage: https://github.com/matthewkennedy/spree_admin.git
- Issues: https://github.com/matthewkennedy/spree_admin/issues
- npm.io page: https://npm.io/package/@omes/admin

## Dependencies (21)

- [jsuri](https://npm.io/package/jsuri.md) ^1.3.1
- [tinymce](https://npm.io/package/tinymce.md) ^6.0.2
- [bootstrap](https://npm.io/package/bootstrap.md) ^5.2.0
- [cleave.js](https://npm.io/package/cleave.js.md) ^1.6.0
- [dompurify](https://npm.io/package/dompurify.md) ^2.3.8
- [flatpickr](https://npm.io/package/flatpickr.md) 4.6.9
- [sortablejs](https://npm.io/package/sortablejs.md) ^1.15.0
- [tom-select](https://npm.io/package/tom-select.md) ^2.2.0
- [animate.css](https://npm.io/package/animate.css.md) ^4.1.1
- [stimulus-use](https://npm.io/package/stimulus-use.md) ^0.51.0
- [gridtable.css](https://npm.io/package/gridtable.css.md) ^1.0.0
- [@popperjs/core](https://npm.io/package/@popperjs/core.md) ^2.11.5
- [bootstrap-icons](https://npm.io/package/bootstrap-icons.md) ^1.9.0
- [@rails/request.js](https://npm.io/package/@rails/request.js.md) ^0.0.6
- [stimulus-sortable](https://npm.io/package/stimulus-sortable.md) ^3.1.0
- [@hotwired/stimulus](https://npm.io/package/@hotwired/stimulus.md) ^3.1.0
- [stimulus-flatpickr](https://npm.io/package/stimulus-flatpickr.md) ^3.0.0-0
- [stimulus-form-state](https://npm.io/package/stimulus-form-state.md) ^0.1.1
- [deserialize-json-api](https://npm.io/package/deserialize-json-api.md) ^1.4.0
- [@hotwired/turbo-rails](https://npm.io/package/@hotwired/turbo-rails.md) ^7.2.0
- [stimulus-checkbox-select-all](https://npm.io/package/stimulus-checkbox-select-all.md) ^5.1.0

## Recent versions

- 0.0.10 (latest) — 2022-10-28
- 0.0.9 — 2022-10-26
- 0.0.8 — 2022-10-26
- 0.0.7 — 2022-10-26
- 0.0.6 — 2022-10-24
- 0.0.5 — 2022-10-24
- 0.0.4 — 2022-09-24
- 0.0.3 — 2022-09-13
- 0.0.2 — 2022-09-13

## README

[![CI](https://github.com/MatthewKennedy/spree_admin/actions/workflows/ci.yml/badge.svg)](https://github.com/MatthewKennedy/spree_admin/actions/workflows/ci.yml)
[![Standard RB](https://github.com/MatthewKennedy/spree_admin/actions/workflows/standardrb.yml/badge.svg)](https://github.com/MatthewKennedy/spree_admin/actions/workflows/standardrb.yml)
[![Standard JS](https://github.com/MatthewKennedy/spree_admin/actions/workflows/standardjs.yml/badge.svg)](https://github.com/MatthewKennedy/spree_admin/actions/workflows/standardjs.yml)

# Omes Admin

An alternative Admin UI for Spree.

## Tech Stack Benefits

- jQuery Free
- SASS/SCSS and JavaScript all compiled by modern processors, not Sprockets.
- Uses Stimulus and Turbo


## User Benefits

- Product Images can be tagged to the applicable options
- New order process, more akin to building an invoice than attempting to replicate a shopping cart in an admin UI (WIP)
- Modern UI


### What Is The Difference Between Omes Admin and Spree Backend?

Omes Admin is a fresh take on an Admin UI for Spree, it is currently intended to be experimental in the early stages, free from any legacy dependencies, being locked-into
working with old Spree extensions, old Rails versions, or large Spree apps that rely heavily on Spree Backend.

The goal is that we can move fast and fluid find new intuitive ways of using Spree Admin.


### What About The Javascript?
You might be pleased to know we have completely stripped out all the old JavaScript, reducing the dependency on 3rd party libraries to a minimum,
no more jQuery, no more Select2.

All new JavaScript is written in Stimulus controllers so it is all Hotwire/Turbo friendly.


## Installation

Starting with a freshly generated Rails 7 app using esbuild simply add the following gems to your gem file:
```ruby
# USE THESE TEMP
gem 'spree', github: 'MatthewKennedy/spree', branch: 'custom/spree_admin'
gem 'spree_admin', github: 'MatthewKennedy/spree_admin'
gem 'spree_auth_devise', github: 'MatthewKennedy/spree_auth_devise', branch: 'custom/spree_admin'
```

From the command line run the following commands to:

Install Spree
```bash
   bin/rails g spree:install --user_class=Spree::User
```

Install Spree Auth Devise
```bash
   bin/rails g spree:auth:install
```

Install Spree Admin
```bash
   bin/rails g spree:backend:install
```

### Use @omes/admin NPM - OPTIONAL
If you are using NPM to manage your javascript and want to import the javascript via node_modules run:
```bash
   yarn add "@omes/admin"
```
And then create a new file in `app/javascript` called `spree_admin.js` and then import `import '@omes/admin'`.

### Development Setup (JavaScript, SCSS)

When working locally on the JavaScript or CSS you will need to yarn link your local development copy of `@omes/admin`, to the Rails app you are working in, so that your changes are picked up and represented live in the view.

From the root of `spree_admin` run:

```bash
yarn link
```

Next, from the root of the Rails app you are using to develop run:

```bash
yarn link "@omes/admin"
```

Once your local Spree Dashboard is linked with the Rails app you are using for development you will need two terminal tabs open,
one at the root of your Rails app, and one at the root of `spree_admin`.

In the terminal window at the root of the `spree_admin` run:

```bash
yarn watch
```

And from the Rails app you are using to run Spree and develop in run the following:

```bash
bin/dev
```

Any changes made to the JavaScript files in `spree_admin` will be processed by yarn and picked up in the Rails app you are running for development.


### Local setup

1. Fork it!
2. Clone the repository
3. Create test application:

   ```bash
   cd spree_admin
   bundle install
   bundle exec rake test_app
   ```

### Running tests

Entire test suite (this can take some time!)

```bash
bundle exec rspec
```

Single test file:

```bash
bundle exec rspec spec/features/admin/users_spec.rb
```

[ChromeDriver](https://chromedriver.chromium.org/) is required for feature tests. On MacOS you can install it by running:

```bash
brew install chromedriver
```

---
_Source: https://npm.io/package/@omes/admin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
