aboutsummaryrefslogtreecommitdiff
path: root/WINDOWS.md
blob: 6ea2e3fd71b44082c077d82e12f75765bd020e0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

   

BeepZone Setup Guide for Windows

Windows-specific setup instructions for BeepZone Inventory System using PowerShell.

what you need

install these tools (download from official websites, winget is unreliable):

required dependencies:

  1. Podman Desktop (for containers) - download from: https://podman-desktop.io/downloads - includes podman CLI and WSL2 machine - after install, open Podman Desktop and initialize the machine

  2. Rust & Cargo (for building binaries) - download rustup from: https://rustup.rs/ - run the installer and follow prompts - open Visual Studio Installer via Windows menu - select modify - make sure "Desktop Developement with C++" and "Linux, Mac, and Embedded Developement with C++" are checked - press the modify button with windows shield of deceipt - restart terminal after installation

  3. Git (for cloning repositories) - download from: https://git-scm.com/download/win - use default settings during installation other than default editor ... i recommend nano as vim is for more advanded linux nerds id say

  4. MariaDB Client (for database access)

    • download from: https://mariadb.org/download/
    • during install make sure to not install database instance lol unless you want to run a database on your laptop
    • script auto-detects at: C:\Program Files\MariaDB *\bin\mysql.exe

how to use

  1. open PowerShell in the BeepZone directory
  2. allow script execution (one-time): powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  3. run the helper script: powershell .\beepzone-helper.ps1

what the script does

provides an interactive menu for: - running a podman container with mariadb and - letting you configure access details - importing the schema - managing users and roles in the db (create/delete both with bcrypt password hashing) - optionally import some seeding data - compiling and setting up SeckelAPI as a podman container - uses proper port mapping 5777:5777 and host gateway for db access - auto-configures database connection settings - compiling the desktop client natively on Windows - produces native .exe binary for Windows

setup workflow

  1. configure & run mariadb container - set database credentials - creates and starts mariadb:12 container - exposes port 3306

  2. import database schema - choose between:

    • full dump (includes live dev sample data, admin:admin123 are the logins btw)
    • clean schema (empty tables)
    • automatically creates database and imports
  3. create admin user & role - create a role with power level 100 (admin) - create your first adminier user - experience me compiling a fucking bcrypt tool that ive embedded into the powershell code because windows is stinky and wont let me encrypt the passwords for use in the db bruh

  4. setup SeckelAPI backend - automatically clones SeckelAPI source from https://git.teleco.ch/crt/seckelapi.git - auto updates config for container networking (once, after that it dont for some reason on my computer) - builds container image and starts on port 5777

  5. build desktop client - clones client source from https://git.teleco.ch/crt/beepzone-client-egui-emo.git - compiles native Windows binary with cargo - executable location: frontend\desktop-client\sources\target\release\ (ignore the debug terminal that opens along with the app, will be removed someday tm)