crs-front

module
v0.0.0-...-0d5229f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: Apache-2.0

README

CRS-Front

Go Version

Table of Contents

Description

This is a front-end project built with Golang and HTMX, following a Domain-Driven Design (DDD) architecture. The project maintains a clear separation between the different layers of the application, ensuring scalability, testability, and ease of maintenance.

Inspired by Bill Kennedy’s structure for Go projects, this repository implements best practices in Go development and architecture. more info

Features

  • Domain-Driven Design (DDD) architecture
  • Modular and scalable code structure
  • Clear separation of concerns
  • Frontend developed with HTMX

Licensing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Installation

To clone the project, create a folder and use the git clone command. Then please read the Makefile to learn how to install all the tooling and Docker images.

$ cd $HOME
$ mkdir code
$ cd code
$ git clone https://github.com/David-Kalashir/crs-front.git
$ cd crs-front

Create Your Own Version

If you want to create a version of the project for your own use, use the new gonew command.

$ go install golang.org/x/tools/cmd/gonew@latest

$ cd $HOME
$ mkdir code
$ cd code
$ gonew github.com/David-Kalashir/crs-front github.com/mydomain/myproject
$ cd myproject
$ go mod vendor

Now you have a copy with your own module name. All you need to do is initialize the project for git.

Running The Project

To run the project, use the following commands:

Install Tooling
$ make dev-gotooling
$ make dev-brew
$ make dev-docker
Run Tests
$ make test
Shutdown Tests
$ make test-down
Run Project
$ make dev-up
$ make dev-update-apply
$ make token
$ export TOKEN=<COPY TOKEN>
$ make users
Run Load
$ make load
Run Tooling
$ make grafana
$ make statsviz
Shut Project
$ make dev-down

Credits

This project draws significant inspiration from Bill Kennedy’s work on structuring Go projects with Domain-Driven Design. His books and talks were instrumental in shaping the architecture of this repository.


All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
api
cmd/services/auth/build/all
Package all binds all the routes into the specified app.
Package all binds all the routes into the specified app.
cmd/services/crsfront/build/all
Package all binds all the routes into the specified app.
Package all binds all the routes into the specified app.
cmd/services/metrics/collector
Package collector is a simple collector for
Package collector is a simple collector for
cmd/services/metrics/publisher
Package publisher manages the publishing of metrics.
Package publisher manages the publishing of metrics.
cmd/services/metrics/publisher/datadog
Package datadog provides support for publishing metrics to DD.
Package datadog provides support for publishing metrics to DD.
cmd/services/metrics/publisher/expvar
Package expvar manages the publishing of metrics to stdout.
Package expvar manages the publishing of metrics to stdout.
cmd/services/metrics/publisher/prometheus
Package prometheus provides suppoert for sending metrics to prometheus.
Package prometheus provides suppoert for sending metrics to prometheus.
cmd/services/sales/build/all
Package all binds all the routes into the specified app.
Package all binds all the routes into the specified app.
cmd/services/sales/build/crud
Package crud binds the crud domain set of routes into the specified app.
Package crud binds the crud domain set of routes into the specified app.
cmd/services/sales/build/reporting
Package reporting binds the reporting domain set of routes into the specified app.
Package reporting binds the reporting domain set of routes into the specified app.
cmd/tooling/admin
This program performs administrative tasks for the garage sale service.
This program performs administrative tasks for the garage sale service.
cmd/tooling/admin/commands
Package commands contains the functionality for the set of commands currently supported by the CLI tooling.
Package commands contains the functionality for the set of commands currently supported by the CLI tooling.
cmd/tooling/logfmt
This program takes the structured log output and makes it readable.
This program takes the structured log output and makes it readable.
domain/http/authapi
Package authapi maintains the web based api for auth access.
Package authapi maintains the web based api for auth access.
domain/http/checkapi
Package checkapi maintains the web based api for system access.
Package checkapi maintains the web based api for system access.
domain/http/homeapi
Package homeapi maintains the web based api for home access.
Package homeapi maintains the web based api for home access.
domain/http/oauthapi
Package oauthapi maintains the web based api for oauth support.
Package oauthapi maintains the web based api for oauth support.
domain/http/productapi
Package productapi maintains the web based api for product access.
Package productapi maintains the web based api for product access.
domain/http/rawapi
Package rawapi provides an example of using a raw handler.
Package rawapi provides an example of using a raw handler.
domain/http/tranapi
Package tranapi maintains the web based api for tran access.
Package tranapi maintains the web based api for tran access.
domain/http/userapi
Package userapi maintains the web based api for user access.
Package userapi maintains the web based api for user access.
domain/http/vproductapi
Package vproductapi maintains the web based api for product view access.
Package vproductapi maintains the web based api for product view access.
sdk/http/apitest
Package apitest provides support for excuting api test logic.
Package apitest provides support for excuting api test logic.
sdk/http/debug
Package debug provides handler support for the debugging endpoints.
Package debug provides handler support for the debugging endpoints.
sdk/http/mid
Package mid contains the set of values the middleware handlers for using the http protocol.
Package mid contains the set of values the middleware handlers for using the http protocol.
sdk/http/mux
Package mux provides support to bind domain level routes to the application mux.
Package mux provides support to bind domain level routes to the application mux.
app
domain/checkapp
Package checkapp maintains the app layer api for the check domain.
Package checkapp maintains the app layer api for the check domain.
domain/homeapp
Package homeapp maintains the app layer api for the home domain.
Package homeapp maintains the app layer api for the home domain.
domain/productapp
Package productapp maintains the app layer api for the product domain.
Package productapp maintains the app layer api for the product domain.
domain/tranapp
Package tranapp maintains the app layer api for the tran domain.
Package tranapp maintains the app layer api for the tran domain.
domain/userapp
Package userapp maintains the app layer api for the user domain.
Package userapp maintains the app layer api for the user domain.
domain/vproductapp
Package vproductapp maintains the app layer api for the vproduct domain.
Package vproductapp maintains the app layer api for the vproduct domain.
sdk/auth
Package auth provides authentication and authorization support.
Package auth provides authentication and authorization support.
sdk/authclient
Package authclient provides support to access the auth service.
Package authclient provides support to access the auth service.
sdk/errs
Package errs provides types and support related to web error functionality.
Package errs provides types and support related to web error functionality.
sdk/metrics
Package metrics constructs the metrics the application will track.
Package metrics constructs the metrics the application will track.
sdk/mid
Package mid provides app level middleware support.
Package mid provides app level middleware support.
sdk/query
Package query provides support for query paging.
Package query provides support for query paging.
business
domain/homebus
Package homebus provides business access to home domain.
Package homebus provides business access to home domain.
domain/homebus/stores/homedb
Package homedb contains home related CRUD functionality.
Package homedb contains home related CRUD functionality.
domain/productbus
Package productbus provides business access to product domain.
Package productbus provides business access to product domain.
domain/productbus/stores/productdb
Package productdb contains product related CRUD functionality.
Package productdb contains product related CRUD functionality.
domain/uiloginbus/templs/logintempl
templ: version: v0.2.778
templ: version: v0.2.778
domain/uinavbarbus/templs/navbartempl
templ: version: v0.2.778
templ: version: v0.2.778
domain/uinavbarbus/templs/profiletempl
templ: version: v0.2.778
templ: version: v0.2.778
templ: version: v0.2.778
domain/userbus
Package userbus provides business access to user domain.
Package userbus provides business access to user domain.
domain/userbus/stores/usercache
Package usercache contains user related CRUD functionality with caching.
Package usercache contains user related CRUD functionality with caching.
domain/userbus/stores/userdb
Package userdb contains user related CRUD functionality.
Package userdb contains user related CRUD functionality.
domain/vproductbus
Package vproductbus provides business access to view product domain.
Package vproductbus provides business access to view product domain.
domain/vproductbus/stores/vproductdb
Package vproductdb provides access to the product view.
Package vproductdb provides access to the product view.
sdk/dbtest
Package dbtest contains supporting code for running tests that hit the DB.
Package dbtest contains supporting code for running tests that hit the DB.
sdk/delegate
Package delegate provides the ability to make function calls between different domain packages when an import is not possible.
Package delegate provides the ability to make function calls between different domain packages when an import is not possible.
sdk/migrate
Package migrate contains the database schema, migrations and seeding data.
Package migrate contains the database schema, migrations and seeding data.
sdk/order
Package order provides support for describing the ordering of data.
Package order provides support for describing the ordering of data.
sdk/page
Package page provides support for query paging.
Package page provides support for query paging.
sdk/sqldb
Package sqldb provides support for access the database.
Package sqldb provides support for access the database.
sdk/sqldb/dbarray
Package dbarray provides support for database array types.
Package dbarray provides support for database array types.
sdk/unitest
Package unitest provides support for excuting unit test logic.
Package unitest provides support for excuting unit test logic.
types/hometype
Package hometype represents the home type in the system.
Package hometype represents the home type in the system.
types/name
Package name represents a name in the system.
Package name represents a name in the system.
types/role
Package role represents the role type in the system.
Package role represents the role type in the system.
foundation
docker
Package docker provides support for starting and stopping docker containers for running tests.
Package docker provides support for starting and stopping docker containers for running tests.
keystore
Package keystore implements the auth.KeyLookup interface.
Package keystore implements the auth.KeyLookup interface.
logger
Package logger provides support for initializing the log system.
Package logger provides support for initializing the log system.
otel
Package otel provides otel support.
Package otel provides otel support.
web
Package web contains a small web framework extension.
Package web contains a small web framework extension.
worker
Package worker manages a set of registered jobs that execute on demand.
Package worker manages a set of registered jobs that execute on demand.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL