# Geta Checkout

**Building blocks for checkouts at Geta.**<br>
Includes an API-layer and a UI library.

```bash
npm install --save geta-checkout
```

> **[See the demo](https://geta.github.io/checkout/demo)**<br>
**[Read the tutorial](https://geta.github.io/checkout/docs/tutorial/readme.html)**

## UI

> **[Write custom UI components](src/render/readme.md)**<br>
**[Create a custom CSS theme using Sass](src/ui/css.md)**

This package includes a set of UI components.
<br>
Use them directly, or as boilerplates for creating your own, custom UI.
<br>
If using them as boilerplates, you will need to run [React](https://facebook.github.io/react/).

> **[AddToCart](src/ui/components/add-to-cart/add-to-cart.md)**<br>
**[Cart](src/ui/components/cart/cart.md)**<br>
**[Coupon](src/ui/components/coupon/coupon.md)**<br>
**[CartTotal](src/ui/components/cart-total/cart-total.md)**<br>
**[CustomerProfile](src/ui/components/customer-profile/customer-profile.md)**<br>
**[Login](src/ui/components/login/login.md)**<br>
**[OrderButton](src/ui/components/order-button/order-button.md)**<br>
**[Payment](src/ui/components/payment/payment.md)**<br>
**[Registration](src/ui/components/registration/registration.md)**<br>
**[Shipment](src/ui/components/shipment/shipment.md)**<br>
**[Total](src/ui/components/total/total.md)**

## API

> **[How to configure API services](src/api/readme.md)**<br>
**[How to add a custom API](src/api/readme.md#add-a-custom-api)**

If you need direct access to data from the server-side, check out these APIs.
<br>
Also, if you're implementing the back-end or the UI, have a look at these pages.

> **[Address](src/api/address/readme.md)**<br>
**[Cart](src/api/cart/readme.md)**<br>
**[CartItem](src/api/cart-item/readme.md)**<br>
**[Customer](src/api/customer/readme.md)**<br>
**[Language](src/api/language/readme.md)**<br>
**[Image](src/api/image/readme.md)**<br>
**Order**<br>
**[Payment](src/api/payment/readme.md)**<br>
**[Price](src/api/price/readme.md)**<br>
**[Shipment](src/api/shipment/readme.md)**<br>
**[WishList](src/api/wish-list/readme.md)**

## Project structure

<br>
<pre>
+-- gulpfile.js                     Automated tasks for linting, building, documentation and more.
|
+-- /docs                           Generated GitHub pages. Do not edit manually.
|                                   Contains html generated from src/**/*.{md,html}.
|                                   Includes js and css for tests and examples.
|
+-- /gulp-tasks                     Used by gulpfile.js.
|
+-- /src                            All source files, includiong documentation and demo.
    |
    +-- index.js                    The main entry file.
    |                               Exposes api, render, server and ui.
    |
    +-- tests.js                    All mocha tests to be run in the browser.
    |
    +-- /api                        Built-in APIs.
    |
    +-- /demo                       Everything needed for the demo page and the UI examples.
    |                               Demonstrates various possibilities.
    |
    +-- /docs                       Documentation-specific source files.
        |
        +-- /template               Includes a simple html template for the docs.
        |
        +-- /test                   A html page for running mocha tests.
    |
    +-- /render                     The render() function.
    |
    +-- /server                     The mock server.
        |
        +-- /fixtures               The dummy data displayed in the demo.
    |
    +-- /ui                         The user interface.
        |
        +-- default-theme.scss      The default theme.
        |                           Can be used as a boilerplate for new projects.
        |
        +-- index.scss              All sass mixins for the UI components.
        |
        +-- /components             Public user interface components.
        |                           All files named container.jsx are made public through index.js.
        |
        +-- /layouts                Used internally by the ui components.
        |
        +-- /scss                   Sass helper mixins.

</pre>

## Unit tests

> **[Run all tests](src/test/index.html)**

## MVP Roadmap

> **[Jira board](https://getano.atlassian.net/secure/RapidBoard.jspa?rapidView=151&projectKey=GFF&view=detail)**
