Skip to content

Commit d459943

Browse files
authored
Merge pull request #13 from Open-STEM/kq-vite
Kq vite
2 parents f0994b5 + 74525ed commit d459943

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2588
-596
lines changed

XRP Software Architecture.pdf

490 KB
Binary file not shown.

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To export the Markdown file, these are the tools need to be installed on your sy
1414
- [plantuml](https://plantuml.com/)
1515

1616
```
17-
pandoc docs/XRP\ Software\ Architecture.md -t pdf -F pandoc-plantuml -o "XRP Software Architecture".pdf
17+
pandoc docs/XRP\ Software\ Architecture.md --pdf-engine=xelatex -V "mainfont:DejaVu Sans" -V "monofont:DejaVu Sans Mono" -t pdf -F pandoc-plantuml -o "XRP Software Architecture".pdf
1818
```
1919

2020
## References

docs/XRP Software Architecture.md

Lines changed: 124 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,13 @@ The application components manages the core functionality of the following featu
282282
@startuml
283283
class AppMgr
284284
class ConnectionMgr
285-
class FilesysMgr
285+
class CommandToXRPMgr
286286
class EditorMgr
287287
class StreamWorker
288288
289289
StreamWorker *-- ConnectionMgr
290+
CommandToXRPMgr *-- ConnectionMgr
290291
ConnectionMgr *-- AppMgr
291-
FilesysMgr *-- AppMgr
292292
EditorMgr *-- AppMgr
293293
294294
@enduml
@@ -383,6 +383,128 @@ The XRP Web Development application is developed and meet the following quality
383383

384384
XRP Web Development application is hosted in a server farm at WPI. Https secured protocol is used. A valid server HTTP server certificate is configured for the XRPCode subdomain.
385385

386+
## Coding Standards
387+
388+
Every organization has its own software development standard. The following is some of the recommend best practices.
389+
390+
### Naming Convention
391+
392+
The goal of of having a standard naming convention in the code base is to provide the following attributes of software engineering principles.
393+
394+
- Readability
395+
- Maintainability
396+
- Organization
397+
- Communication
398+
399+
These attributes help create a cohesive and structure codebase that is easier to work with and to help reduce errors and to promote collaboration among developers. Readability and Maintainability attributes contribute the overal software development styles and consistency in the codebase. The last two attributes create a collaborative environment and froster transparency and improve healthy organization interactions.
400+
401+
The following list some popular naming conventions.
402+
403+
- PascalCase
404+
- camelCase
405+
- kebab-case
406+
- SCREAMING_SNAKE_CASE
407+
408+
#### Pascal Case
409+
410+
Pascal Case refers to the convention of writing compound words in which the first letter of each word is capitalized. There is no space or punctuation between words. The typical use case is class name or component name. See the below example.
411+
412+
```
413+
// React Component
414+
const NewFile = () => {
415+
// ...
416+
}
417+
418+
// Enumeration
419+
export enum ConnectionType {
420+
USB,
421+
BLUETOOTH
422+
}
423+
424+
// types
425+
export type ListItem {
426+
label: string,
427+
image: string
428+
}
429+
```
430+
431+
#### camelCase
432+
433+
Camel Case refers to the convention of writing compound words or phrases where each word begin with a capital letter except the first word. This convention always starts with a lower case letter of the first word.
434+
435+
```
436+
// Variable Name
437+
const [filename, setFileName] = useState('')
438+
439+
// Function Name
440+
const getFilename = () {
441+
return this.filename;
442+
}
443+
444+
// Object properties
445+
const userOptions: ListItem[] = [
446+
{
447+
label: 'Kevin',
448+
image: blocklyIcon,
449+
},
450+
{
451+
label: 'Frank',
452+
image: pythonIcon,
453+
},
454+
{
455+
label: 'Kathy',
456+
image: pythonIcon,
457+
},
458+
];
459+
460+
// Custom Hooks
461+
const useFile = () => {
462+
// ...
463+
}
464+
```
465+
466+
#### Kebab Case
467+
468+
Kebab case refers to the convention of writing compound words in lowercase name with a hyphens ("-") between the words. Kebab case is popular for using in CSS class names. Since this architecture specified Tailwind CSS as the CSS utility framework, all of the Tailwind CSS styling are specified inline with CSS utility classes. Kebab case is used sparingly.
469+
However, this convention can be used in naming source files.
470+
471+
### Folder Structure
472+
473+
A clear and organized folder structure provides easy navigation of the source tree and grouping of all related components in the subtree. A well-designed folder structure is essential for code maintainance and for codebase scalability. An example of the folder structure is shown below.
474+
475+
```
476+
src/ // Root folder for the source code
477+
├── features/ // Grouping features of the application
478+
│ └── ... // Other feature folders (e.g., authentication, dashboard)
479+
├── components/ // Reusable components
480+
│ ├── ... // Component folders (e.g., Button, Header)
481+
├── utils/ // Utility functions
482+
│ ├── ... // Helper functions or services (e.g., dateUtils, apiUtils)
483+
├── assets/ // Storing static assets
484+
│ ├── images/ // Storing image files (e.g., logos, icons)
485+
│ ├── fonts/ // Storing font files (e.g., custom fonts)
486+
│ └── ... // Other asset types (e.g., videos, audio)
487+
├── styles/ // Global styles
488+
│ └── ... // Style files (e.g., global.css, themes)
489+
├── App.tsx // Entry point of the application
490+
└── ... // Other necessary files and folders (e.g., index.tsx, routes.tsx)
491+
```
492+
493+
## Development Environment
494+
495+
This software architecture is based on all open-source software and tools. It leverages existing React components publish via npm. Visual Studio Code (VSCode) is the recommended developer integrated development environment (IDE). This IDE provides many helpful extensions to ease software development. Github repository is used to maintain the codebase.
496+
497+
### Recommended VSCode plug-ins
498+
499+
- ESLint
500+
- React Extension Pack
501+
- Tailwind CSS Intellisense
502+
- Vitest
503+
- Git Graph
504+
- PlantUML
505+
- Prettier
506+
- Github Copilot Chat
507+
386508
## Ricks
387509

388510
The following list a potential list of risks.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
6-
<link id="flexlayout-stylesheet" rel="stylesheet" href="./node_modules/flexlayout-react/style/light.css" />
6+
<link vite-ignore id="flexlayout-stylesheet" rel="stylesheet" href="./node_modules/flexlayout-react/style/light.css" />
77
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
88
<title>XRP Web App</title>
99
</head>

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
["os-path", "latest"]
3232
],
3333
"version": "1.0.3"
34-
}
34+
}

package.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
2-
"name": "vite-monaco",
2+
"name": "xrpweb",
3+
"description": "XRP Web Development Environment",
4+
"homepage": "https://experientialrobotics.org/",
5+
"license": "GPL-2.0-only",
36
"private": true,
4-
"version": "0.0.0",
7+
"version": "2.0.0",
58
"type": "module",
69
"scripts": {
710
"dev": "vite",
811
"build": "tsc -b && vite build",
912
"lint": "eslint .",
10-
"preview": "vite preview",
13+
"preview": "vite preview --base=./ --open",
1114
"test": "vitest"
1215
},
1316
"dependencies": {
@@ -20,29 +23,33 @@
2023
"@codingame/monaco-vscode-textmate-service-override": "^11.1.2",
2124
"@codingame/monaco-vscode-theme-defaults-default-extension": "^11.1.2",
2225
"@codingame/monaco-vscode-theme-service-override": "^11.1.2",
23-
"@ramonak/react-progress-bar": "^5.3.0",
2426
"@typefox/pyright-browser": "^1.1.299",
2527
"@xterm/addon-attach": "^0.11.0",
2628
"@xterm/addon-fit": "^0.10.0",
2729
"@xterm/xterm": "^5.5.0",
30+
"file-saver": "^2.0.5",
2831
"flexlayout-react": "^0.8.1",
2932
"i18next": "^24.2.1",
3033
"jszip": "^3.10.1",
3134
"mitt": "^3.0.1",
35+
"moment": "^2.30.1",
3236
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^11.1.2",
3337
"monaco-languageclient": "^9.1.0",
3438
"pino": "^9.6.0",
3539
"pino-pretty": "^13.0.0",
36-
"radix-ui": "^1.1.2",
3740
"react": "^18.3.1",
3841
"react-arborist": "^3.4.0",
3942
"react-blockly": "^9.0.0",
43+
"react-customizable-progressbar": "^2.0.1",
4044
"react-dom": "^18.3.1",
45+
"react-hotkeys-hook": "^4.6.1",
4146
"react-i18next": "^15.4.0",
4247
"react-icons": "^5.4.0",
4348
"react-xtermjs": "^1.0.9",
4449
"use-file-picker": "^2.1.2",
4550
"use-resize-observer": "^9.1.0",
51+
"usehooks-ts": "^3.1.1",
52+
"uuid": "^11.0.5",
4653
"vscode": "npm:@codingame/monaco-vscode-api@^11.1.2",
4754
"vscode-ws-jsonrpc": "^3.4.0"
4855
},
@@ -52,6 +59,8 @@
5259
"@testing-library/jest-dom": "^6.6.3",
5360
"@testing-library/react": "^16.2.0",
5461
"@testing-library/user-event": "^14.6.1",
62+
"@types/file-saver": "^2.0.7",
63+
"@types/moment": "^2.11.29",
5564
"@types/node": "^22.10.7",
5665
"@types/react": "^18.3.18",
5766
"@types/react-dom": "^18.3.5",
@@ -68,12 +77,13 @@
6877
"postcss": "^8.5.1",
6978
"prettier": "^3.4.2",
7079
"prettier-plugin-tailwindcss": "^0.6.11",
80+
"rollup-plugin-visualizer": "^5.14.0",
7181
"tailwindcss": "^3.4.17",
7282
"tailwindcss-debug-screens": "^2.2.1",
7383
"typescript": "~5.6.2",
7484
"typescript-eslint": "^8.18.2",
7585
"vite": "^6.0.5",
76-
"vite-bundle-visualizer": "^1.2.1",
86+
"vite-plugin-static-copy": "^2.3.0",
7787
"vitest": "^3.0.0"
7888
}
7989
}
432 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)