Corset Webserver#
once again, making a corset pattern generateor website with golang this time this time, for sure!
todo#
-
add user routes:
- delete user
- list all users
-
add basic text output (make it not json)
-
add basic auth for users:
- login
- logout
- auth del user path
- auth show single user
- set up echo api for testing
- debug the issues
-
add the corset routes:
- corset storage
- show all corset
- save corset
- show corsets for user
- show single corset
- edit corset details
- debug errors
-
set up sql
-
check & create tables
-
insert record
-
select user by email
-
select all users/corsets
-
select users/corsets by id
-
select corset by user id
-
delete corset/user
-
update corset/user
-
add user/pattern id to struct
-
link with other code
-
debug
-
-
add middleware
- logging
- auth
- secret third thing
-
templ with unstyled html
-
deployment some how
-
daisy ui edit in the browser dev tools, copy to file
learning intentions#
- basic web server
- basic login
- test app
- add the corset routes
- sql, sqlite? mysql?
not done yet
-
middleware (auth, logging, )
-
templ, basic html templates
-
deployment, docker, make?
-
basecoat ui, shoelace, daisy ui? - we can use a cdn + plain html for this
-
theming, shadcdn ui design
-
pattern calculation
-
webcomponent for pattern display
-
pdf download
-
pattern route, htmx?
-
sso, bsky, google
Steps#
- basic webserver + testing, live storage, return json
- sql storage
- middleware
- ui + templ
- pattern gen + pdf maker
- oAuth (google + blueSky)
Primary actions#
- add/remove/edit pattern
- show all users
- login/logout/register
- show patterns from a user
- show 10 latest patterns & who they are by
Data#
Users#
- id
- password
- createdOn
Pattern#
- id
- bust
- waist
- inbetween
- userId
- createdOn
- updatedOn
- name
Routes#
- /: home page, explains the api
- /login, /logout, /register
- /corset: get:: last top 10 patterns, post:: creates pattern if logged in
- /corset/{id}: show that pattern, post:: if auth, can edit/delete
- /users: last top 10 registered users & how many patterns they have (also id)
- /users/{id} shows that users detail, if auth shows full details
- /users/{id}/corsets: shows all patterns for that user