2023-01-25 19:37:47 +00:00
|
|
|
# PizzaDashboard
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
View orders made with my demo pizza ordering phone system (not yet public)
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
Written in Svelte+Vite with Appwrite as the backend.
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
## Get this running
|
|
|
|
### Requirements
|
|
|
|
You'll need an Appwrite server with the following:
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
One DB called `pizza_shop`, containing one tables called `orders`, with the following attributes:
|
|
|
|
* `id` - int
|
|
|
|
* `status` - int
|
|
|
|
* `total` - double (aka float)
|
|
|
|
* `order` - string
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
You'll need to create Indexes for `id`, `$id` and `status`.
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
Permissions on the table should be:
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
* Any - Read
|
|
|
|
* Users - Read, Update
|
|
|
|
* `team:create` - Create, Read, Update, Delete
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
Create a team called `create`. Users in this team can delete orders. In the future they might also be able to create orders.
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
I plan to put up the DB file at some point.
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
### Steps
|
2023-01-25 19:16:49 +00:00
|
|
|
|
2023-01-25 19:37:47 +00:00
|
|
|
1. Create a `.env` file in the root:
|
2023-01-25 19:16:49 +00:00
|
|
|
```
|
2023-01-25 19:37:47 +00:00
|
|
|
APPWRITE_ENDPOINT=...
|
|
|
|
APPWRITE_PROJECT=...
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Install dependancies - `npm install`
|
|
|
|
3. Run - `npm run dev`, or build - `npm run build`
|