@brezel/installer 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc.json +20 -0
- package/dist/index.js +209 -0
- package/install.sh +41 -0
- package/package.json +43 -0
- package/src/index.ts +538 -0
- package/task.md +77 -0
- package/tsconfig.json +13 -0
package/task.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Build the Brezel Installer
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Complete the Brezel installer. The installer should be able to install Brezel
|
|
5
|
+
on a user's system, including all necessary dependencies and configurations. The installer should be user-friendly and
|
|
6
|
+
provide clear instructions throughout the installation process. It should also include options for customizing the
|
|
7
|
+
installation, such as choosing the installation directory and selecting which components to install.
|
|
8
|
+
|
|
9
|
+
The docs are here: /Users/keanu/Dev/kibro/brezel/wiki/src/content/docs.
|
|
10
|
+
The getting started guide is here: /Users/keanu/Dev/kibro/brezel/wiki/src/content/docs/start_here/getting_started.mdx
|
|
11
|
+
The current guide is the manual installation guide because no installer is available yet.
|
|
12
|
+
|
|
13
|
+
SPA is here: /Users/keanu/Dev/kibro/brezel/spa
|
|
14
|
+
API is here: /Users/keanu/Dev/kibro/brezel/api
|
|
15
|
+
Instance skeleton is here: /Users/keanu/Dev/kibro/brezel/brezel
|
|
16
|
+
|
|
17
|
+
## Installer technology
|
|
18
|
+
- Fast-track bash script install, like ´curl -sL brezel.io/install | bash`
|
|
19
|
+
- The installer itself: TypeScript
|
|
20
|
+
|
|
21
|
+
## Installation modes
|
|
22
|
+
- Interactive mode: The installer prompts the user for input and guides them through the installation process step by step.
|
|
23
|
+
- Non-interactive mode: The installer can be run with command-line arguments to specify installation options
|
|
24
|
+
|
|
25
|
+
## Installation source control mode
|
|
26
|
+
The user should have the option to either
|
|
27
|
+
- clone the skeleton repo **without git history** or
|
|
28
|
+
- fork and clone the skeleton repo.
|
|
29
|
+
|
|
30
|
+
## Installation manner
|
|
31
|
+
- Bare metal: The installer sets up Brezel on a fresh server or local machine, including all necessary dependencies and configurations.
|
|
32
|
+
- Containerized: The installer sets up Brezel in a containerized environment, such as Docker, to simplify deployment and ensure consistency across different environments.
|
|
33
|
+
|
|
34
|
+
## Installation target
|
|
35
|
+
- Linux: The installer must work on Linux-based systems, which are commonly used for server deployments.
|
|
36
|
+
- macOS: The installer must also work on macOS for local development purposes.
|
|
37
|
+
- Windows: The installer should ideally support Windows, but it can be a secondary priority due to the complexities of Windows environments. A separate installer or script may be needed for Windows.
|
|
38
|
+
|
|
39
|
+
## Optional components
|
|
40
|
+
- Database: The installer can include an option to set up a database (must be strictly MariDB) for Brezel.
|
|
41
|
+
- Web server: The installer can include an option to set up a web server (e.g., Nginx) to serve the Brezel application.
|
|
42
|
+
- SSL: The installer can include an option to set up SSL certificates for secure communication.
|
|
43
|
+
- Cron jobs: The installer can include an option to set up cron jobs for scheduled tasks in Brezel.
|
|
44
|
+
- Brezel services
|
|
45
|
+
- @kibro/brezel-export-installer a sub installer for the export service, which is a separate service that needs to be installed and configured.
|
|
46
|
+
- more to come
|
|
47
|
+
|
|
48
|
+
## About Brezel: a quick overview
|
|
49
|
+
Brezel is an ERP system that is designed to be easy to use and customizable.
|
|
50
|
+
It is built on top of Laravel and Vue/Vite.
|
|
51
|
+
A standalone Brezel **instance** looks like the skeleton https://github.com/brezelio/brezel.
|
|
52
|
+
It uses @kibro/brezel-spa for the SPA and brezel/api as the Laravel-based API backend.
|
|
53
|
+
|
|
54
|
+
In the backend, Brezel provides a framework for building modules, which are the
|
|
55
|
+
building blocks of a Brezel application.
|
|
56
|
+
A module defines the data schema for a specific feature (e.g., Blog Posts, Products, Users).
|
|
57
|
+
A module has fields, which are the individual data points that make up the module (e.g., title, description, price).
|
|
58
|
+
A module also has an index layout, which defines how the module's data is displayed in a list view, and a detail layout, which defines how the module's data is displayed in a view/create/edit form.
|
|
59
|
+
Business logic is defined in JSON-based workflow files.
|
|
60
|
+
|
|
61
|
+
### Instances, Systems, and Clients
|
|
62
|
+
A Brezel **instance** encapsulates the complete configuration inside one or more **systems** (i.e. tenants).
|
|
63
|
+
|
|
64
|
+
Each **system** is defined in `systems/<system>` and has its own database.
|
|
65
|
+
Usually, a Brezel instance will have one system, but it can support multiple systems if needed.
|
|
66
|
+
A brezel **system** needs a standard set of modules: clients, users, roles, and files.
|
|
67
|
+
|
|
68
|
+
A **client** is a tenant inside a system, used to separate entities from each other. For example, if you are building a CRM for multiple companies, each company would be a client in the same system. Clients share the same database and modules, but their data is separated by a `client_id` field.
|
|
69
|
+
|
|
70
|
+
### Main CLI interface after installation:
|
|
71
|
+
- `php bakery system create <system-name>`: Creates a new system with the specified name.
|
|
72
|
+
- `php bakery init`: Bootstraps and migrates the meta database and creates the necessary tables for managing systems.
|
|
73
|
+
- `php bakery migrate`: Runs the database migrations for the current system, ensuring that the database schema is up to date with the latest Brezel version.
|
|
74
|
+
- `php bakery apply`: Plans the configuration from the `.bake` files to the database, creating tables, fields, and default data as defined in the configuration files.
|
|
75
|
+
- `php bakery apply`: Applies the configuration from the `.bake` files to the database, creating tables, fields, and default data as defined in the configuration files.
|
|
76
|
+
- `php bakery load`: Loads workflows into the database.
|
|
77
|
+
- `npm run dev`: Starts the development server for the SPA, allowing you to access the Brezel application in your browser and see changes in real-time as you develop.
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"outDir": "./dist"
|
|
11
|
+
},
|
|
12
|
+
"include": ["src/**/*"]
|
|
13
|
+
}
|