Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkabdelrahman/snippetbox
server rendered web application using go + htmx
https://github.com/mkabdelrahman/snippetbox
Last synced: about 1 month ago
JSON representation
server rendered web application using go + htmx
- Host: GitHub
- URL: https://github.com/mkabdelrahman/snippetbox
- Owner: MKAbdElrahman
- Created: 2024-03-23T17:40:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-09T06:53:16.000Z (9 months ago)
- Last Synced: 2024-04-16T08:59:26.499Z (9 months ago)
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Application architecture
A technically partitioned closed layer architectural style.
```mermaid
graph LR
handler[HTTP handler] -- uses --> service[Service]
service -- use --> db[Database access code]
db -- uses --> mysql[(MySQL)]
handler -- renders --> View[View Components]
```* HTTP Handler
* Processes HTTP requests
* Does not contain application logic itself
* Uses `service` that carry out application logic
* Takes the responses from `service` and uses `view` to render HTML
* Creates HTTP responses
* Services
* Carries out application logic such as orchestrating API calls, or making database calls
* Does not do anything related to HTML or HTTP
* Is not aware of the specifics of database calls
* Database access code
* Handles database activity such as inserting and querying records
* Ensures that the database representation (`records`) doesn't leak to the service layer## Dev Environment
- VSCode as IDE
- Templ for static rendering
- Taskfile for automation
- wgo for live reloading
- migrate for database migrations
- docker compose for dev dependancies
- MySQL for storage