Skip to content

Commit 035b01b

Browse files
author
Timothy Dodd
committed
chore: add rd-ui submodule and update .gitmodules
1 parent 38bf98e commit 035b01b

22 files changed

Lines changed: 3198 additions & 3321 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "src/RoboDodd.OrmLite"]
22
path = src/RoboDodd.OrmLite
33
url = https://github.com/timothydodd/RoboDodd.OrmLite
4+
[submodule "src/LogMkWeb/src/rd-ui"]
5+
path = src/LogMkWeb/src/rd-ui
6+
url = https://github.com/timothydodd/rd-ui.git

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ LogMk consists of three main components:
8585

8686
#### 1. **Clone and Build**
8787
```bash
88-
git clone <repository-url>
88+
# Clone with submodules (includes rd-ui shared component library)
89+
git clone --recurse-submodules <repository-url>
8990
cd LogMk2/src
9091

92+
# Or if already cloned, initialize submodules
93+
git submodule update --init --recursive
94+
9195
# Build entire solution
9296
dotnet build LogMk.sln
9397
```
@@ -123,9 +127,13 @@ cd src/LogMkWeb
123127
# Install dependencies
124128
npm install
125129

126-
# Start development server
130+
# Start development server (automatically builds rd-ui library first)
127131
npm start
128132
# Web app available at: http://localhost:6200
133+
134+
# Or build and run separately:
135+
npm run lib:build # Build rd-ui shared component library
136+
npm run serve # Start Angular dev server
129137
```
130138

131139
#### 5. **Deploy Agent (Kubernetes)**

src/LogMkApi/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ RUN dotnet restore "./LogMkApi/LogMkApi.csproj"
1515
# Install Node.js and Angular CLI
1616
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
1717
&& apt-get install -y nodejs \
18-
&& npm install -g @angular/cli@20
18+
&& npm install -g @angular/cli@21
1919

2020

2121
COPY . .
22+
23+
# Build rd-ui library before main app build
24+
WORKDIR "/src/LogMkWeb"
25+
RUN npm install
26+
RUN npm run lib:build
27+
WORKDIR "/src"
2228
RUN chmod +x ./LogMkApi/replace_vars.sh
2329
RUN ./LogMkApi/replace_vars.sh ./LogMkWeb/src/environments
2430

src/LogMkWeb/README.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ A modern Angular 20 web application for real-time log monitoring and analysis. B
3939

4040
## 📦 Dependencies
4141

42+
### Shared Component Library (rd-ui)
43+
This project uses **rd-ui**, a shared Angular component library included as a git submodule at `src/rd-ui/`. The library provides reusable UI components with consistent theming.
44+
45+
**Included Components:**
46+
- `rd-dropdown`: Multi-select dropdown with search, tri-state support
47+
- `rd-modal`: Service-based modal system with layout slots
48+
- `rd-toast`: Animated toast notifications
49+
- `rd-tabs`: Signal-based tab navigation
50+
- `rd-checkbox`: Custom styled checkbox
51+
- `rd-input-switch`: Toggle switch component
52+
- `rd-skeleton`: Loading skeleton placeholders
53+
- `rd-spinner`: Loading spinner overlay
54+
- `rd-progress-bar`: Progress indicator
55+
4256
### Core Dependencies
4357
- `@angular/core`: Angular framework
4458
- `@angular/common`: Common Angular modules
@@ -52,17 +66,22 @@ A modern Angular 20 web application for real-time log monitoring and analysis. B
5266
### Development Dependencies
5367
- `@angular/cli`: Build system and development tools
5468
- `@angular-eslint/builder`: Linting and code quality
69+
- `ng-packagr`: Angular library packaging (for rd-ui)
5570
- `typescript`: TypeScript compiler
5671
- `sass`: CSS preprocessing
5772

5873
## 🚀 Development
5974

6075
### **Quick Start**
6176
```bash
77+
# Ensure submodules are initialized (from repo root)
78+
git submodule update --init --recursive
79+
6280
# Install dependencies
6381
npm install
6482

6583
# Start development server (port 6200)
84+
# This automatically builds the rd-ui library first
6685
npm start
6786

6887
# Navigate to http://localhost:6200
@@ -71,16 +90,24 @@ npm start
7190
### **Available Scripts**
7291
```bash
7392
# Development
74-
npm start # Start dev server
75-
npm run dev # Alias for start
93+
npm start # Build rd-ui library + start dev server with watch
94+
npm run serve # Start dev server only (library must be built)
95+
npm run serve:local # Start with local environment config
96+
97+
# Library Build (rd-ui shared components)
98+
npm run lib:build # One-time build of rd-ui library
99+
npm run lib:watch # Build rd-ui in watch mode
100+
101+
# App Building
102+
npm run build # Development build
103+
npm run prod # Optimized production build
76104

77-
# Building
78-
npm run build # Production build
79-
npm run prod # Optimized production build
105+
# Testing & Quality
106+
npm test # Unit tests with Karma
107+
npm run lint # ESLint code analysis
80108

81-
# Testing
82-
npm test # Unit tests with Karma
83-
npm run lint # ESLint code analysis
109+
# Maintenance
110+
npm run clean # Remove dist folders
84111

85112
# Code Generation
86113
ng generate component _components/my-component
@@ -92,8 +119,7 @@ ng generate pipe _pipes/my-pipe
92119
```
93120
src/
94121
├── app/
95-
│ ├── _components/ # Reusable UI components
96-
│ │ ├── dropdown/ # Multi-select dropdown with search
122+
│ ├── _components/ # App-specific UI components
97123
│ │ ├── modal/ # Template-based modal system
98124
│ │ ├── context-menu/ # Right-click context menus
99125
│ │ └── ...
@@ -108,6 +134,10 @@ src/
108134
│ │ └── ...
109135
│ ├── _pipes/ # Data transformation
110136
│ └── styles/ # Global styling system
137+
├── rd-ui/ # Git submodule - shared component library
138+
│ └── projects/rd-ui/ # Library source code
139+
├── environments/ # Environment configurations
140+
└── styles.scss # Global styles with rd-ui CSS variable mappings
111141
```
112142

113143
## 🎨 Styling Architecture

src/LogMkWeb/angular.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6+
"rd-ui": {
7+
"projectType": "library",
8+
"root": "src/rd-ui/projects/rd-ui",
9+
"sourceRoot": "src/rd-ui/projects/rd-ui/src",
10+
"prefix": "rd",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular/build:ng-packagr",
14+
"options": {
15+
"project": "src/rd-ui/projects/rd-ui/ng-package.json"
16+
},
17+
"configurations": {
18+
"production": {
19+
"tsConfig": "src/rd-ui/projects/rd-ui/tsconfig.lib.prod.json"
20+
},
21+
"development": {
22+
"tsConfig": "src/rd-ui/projects/rd-ui/tsconfig.lib.json"
23+
}
24+
},
25+
"defaultConfiguration": "production"
26+
}
27+
}
28+
},
629
"LogMk": {
730
"projectType": "application",
831
"schematics": {

0 commit comments

Comments
 (0)