composer install
npm install
- Install Virtual Box
- Install homestead with
php vendor/bin/homestead make
- Start up server with
vagrant up
- Set up default env variables
cp .env.example .env
- Generate a key for Laravel
php artisan key:generate
- Run Migrations with
php artisan migrate
- You need to tunnel into vagrant for this with
vagrant ssh
- You need to tunnel into vagrant for this with
- Set up storefront enviroment in
\storefront
- Access dev site through
homestead.app
Samwise is built on Laravel/PHP in the backend with Elasticsearch for running search-as-you-type features, and Vue.js with Vuex and Vue Router to build a Single Page Application on the frontend. It also uses the Stripe and Easypost APIs for E-Commerce services.
View a launched storefront at Pangolin4x4.com.
Samwise exposes a static page management interface for maintaining simple static content without diving into the actual codebase. Using the interface, users can write an escaped version of HTML for their pages. Also enhanced by Vue.js components users can write code as simple as <catalog limit="15" />
to generate complex components such as a catalog of all items limited to 15 items per page using the code just provided.
The code editor interface is implamented in a seperate page so that custom css can be added to allow for previewing the page without leaving the interface or saving.
Using interfaces generated off of custom-item schemas Samwise eases and abstracts customized item management. This allows for handling any type of item, from T-Shirts to used car parts on the same platform.
Example Schema:
"offer" => [
"auto" => [
"Application" => [
[
"name" => "sI",
"type" => "boolean"
],
[
"name" => "other_applications",
"type" => "string",
"hint" => "Comma separated list."
],
...
],
"Wheelbase" => [
[
"name" => "base_80",
"display_name" => "80\"",
"type" => "boolean"
]
...
]
]
],
'item' => [
'auto' => [
[
"name" => "part_number",
"display_name" => "Part Number(s)",
"type" => "string",
"hint" => "Comma separated list."
],
[
"name" => "ss_part_number",
"display_name" => "S/S Part Number(s)",
"type" => "string",
"hint" => "Comma separated list."
]
...
]
]
Here we define two schema's, one for the parent offer
model, and another for the child item
model (Note: offer
s have-many item
s). Both define the type of auto
. Notice the offer model allows for multiple catagories of additional info because as much information as possible should be relegated to the parent offer
model.
The resulting panels are seen below.
Offer-Panel:
Item-Panel: