Skip to content

Latest commit

 

History

History
114 lines (99 loc) · 6.03 KB

README.md

File metadata and controls

114 lines (99 loc) · 6.03 KB

My App (my-app)

My App is a continuously updated personal service collection.

Technologies

Technology Role Sources
Go Backend programming language https://pkg.go.dev/std
TypeScript Frontend programming language https://typescriptlang.org/
Sass/Scss Frontend CSS extension language https://sass-lang.com/dart-sass
Vite Next Generation Frontend Tooling https://vitejs.dev/
Vue 3 Progressive JavaScript Framework https://vuejs.org/
Wails Build cross-platform desktop applications using Go https://wails.io/
UPX Ultimate packer for executables https://upx.github.io/
Systray A cross platfrom system tray using Go https://github.com/getlantern/systray
Gin A HTTP web framework using Go https://gin-gonic.com/
Gin Swagger Gin middleware for API documentation with Swagger 2.0 https://github.com/swaggo/gin-swagger
Swaggo Converts Go annotations to Swagger Documentation 2.0 https://github.com/swaggo/swag
Air Live reload and test for API service https://github.com/cosmtrek/air
GORM ORM library for Go https://gorm.io/
SQLite GORM sqlite driver https://github.com/go-gorm/sqlite
SVG To Font Generator of fonts from SVG icons https://github.com/jaywcjlove/svgtofont

Setup

Prepare and install environment for development in Window 10/11?

Setup VS Code by installing recommended extensions. To do this, enter in @recommended while searching for extensions.

Run command go env -w CGO_ENABLED=1 to prepare for CGO enabled packages

Run command pnpm install at project root directory to setup.

NPM Scripts

$ pnpm wails:dev # run wails in development mode
$ pnpm wails:build # build wails application
$ pnpm upx:compress # compress the generated executable by `wails:build` script
$ pnpm air:dev # test web service individually
$ pnpm swag:docs # generate/update swagger docs
$ pnpm docs:dev # test vitepress docs individually
$ pnpm docs:build # generate/update vitepress docs
$ pnpm icons:build # build frontend/packages/icons
$ pnpm design:build # build frontend/packages/design
$ pnpm ... # install/preinstall scripts trigger during project setup

Project Structure

.
├── .tools # auto-generated, development tools/CLIs
├── .vscode # extensions for VS Code
├── air # sources related to air hot reload tool
│   ├── bin # auto-generated, try script `air:dev`
│   ├── .air.toml # air config
│   └── main.go # run web service individually w/o wails and tray
├── backend # sources related to backend code
│   ├── app # app module, business layer
│   │   ├── app.go # contain global state and resources
│   │   ├── config.go # load application options from database
│   │   ├── env.go # load os environment variable
│   │   ├── logger.go # setup loggers
│   ├── model # model module, data layer
│   │   ├── model # database setup
│   │   └── my_option.go # define application options for app config storage
│   ├── pkg # pkg module, cross cutting
│   │   ├── i18n # manage locale/translation strings for backend
│   │   ├── log # define loggers for backend
│   │   └── utils # helper functions
│   ├── tray # tray module, presentations & services layer
│   │   ├── icons # tray icons
│   │   ├── menus # tray menus
│   │   ├── listeners.go # listen to tray menu-item click events
│   │   └── tray.go # system tray
│   └── web # web module, presentations & services layer
│       ├── api # API services
│       ├── auth # Auth services
│       ├── middleware # custom gin middlewares
│       ├── static # static websites and sources
│       │   ├── certs # auto-generated for localhost TLS, try script `install:certs`
│       │   ├── docs # auto-generated, try script `docs:build`
│       │   ├── swagger # auto-generated, try script `swag:docs`
│       │   ├── static.go # manage static sources
│       │   └── ... # other static sources
│       ├── air.go # special function for air to run web service individually
│       ├── router.go # entry point of swaggo docs generator, manage routes for API
│       └── web.go # web service
├── build # sources to use during wails build process
│   ├── bin # auto-generated, try script `wails:dev` or `wails:build`
│   └── ... # wails related sources
├── diagrams # diagrams about 4+1 view model
├── docs # vitepress documentation
├── frontend # sources related to frontend code, workplace managed by PNPM
│   ├── packages # frontend components, icons, etc.
│   └── ... # wails frontend related sources
├── main.go # wails main application, presentations & services layer
├── wails_life_cycle.go # wails life cycle
├── wails.json # wails CLI config
└── ...

Development View

Package Diagram