__________________________________________________________________
                                                    ___
                                               _ya@@@@@@$g
                    _yy_gg@@E$@@a@@gygg==g@@@@@@@@@@@$@@$@@w
              _y 4@$g@@@@y@P@$Z@@@BP$@@@@@@y@@@$@@@@@PPP@` `
          _.gR`~  g@@$@$y@@yg@y@@~A@@$g@@@P@@@y@@$a~
       __aF `   yQ@@y@$Z@ya@PF~@@@@E4@@yR@@@@$@yg@
   y*gL7~ _yygg@R@@F@E~@@B~`   ~~4@@@T$@@@yay~@@R@yy_
 =MF~~ _y@@='~~~`g$g@@M@@F         ~~FF~ '~``~FF`"~M@__
    a@@~ `    ___E@@@@F~                         yg@~`@s
           ya@@@PF~~                             "~   `R
          ygP~~
         a@F
         4@r

###### #####  ###### ###### #####    ##    ####   ####    ##   #
#      #    # #      #      #    #  #  #  #      #    #  #  #  #
#####  #    # #####  #####  #    # #    #  ####  #      #    # #
#      #####  #      #      #####  ######      # #      ###### #
#      #   #  #      #      #      #    # #    # #    # #    # #
#      #    # ###### ###### #      #    #  ####   ####  #    # ###

__________________________________________________________________

  Let's face it, the www has become a  disgusting cesspool of
  horrible corporate excrement. As such, when we needed a web
  store to sell our art,  the only viable option seemed to be
  to build a site completely from scratch.

  Shopify  is  a terrible company,  firing employees  for not
  using AI (1),  as is pretty  much every other off-the-shelf
  platform out there.

  Now, I absolutely loathe web development with the fury of a
  thousand suns. To make the experience slightly less painful,
  I decided to implement the entire back-end of the website in
  pascal - a programming language I am quite fond of.

  The  pascal-side  of the webdev  experience has  been  quite
  pleasant,  with the horrible bits, naturally remaining to be
  js/css.

  I  made  a  wee  video  on  how  web development  is done in
  FreePascal -  I tried to give a birds-eye view of how it all
  works, and it still ended up being an hour-long video.  That
  probably is more because I suck at brevity when it comes  to
  stuff I am passionate about :)

  In any event,- here's the video:

  https://toobnix.org/w/416YvuMh8okVhgTXzBPmNy

  In the video I forgot to give an example  of how the thing is
  configured  with  the ini file,  so below  is an  example ini
  configuration file:

__________________________________________________________________

[Database]
Host = "127.0.0.1"
Password = "photronic"
Port = "5432"
Name = "photronic"
User = "photronic"

[Daemon]
PidFile = /var/run/photronic.pid
Port = 8008
User = photronic
Group = photronic

[Email]
From = "[email protected]"
Host = "mail.example.com"
Password = "changeme"
Port = "587"
User = "[email protected]"

[Paths]
; Following paths are url paths, not filesystem paths.
CssPath = "/assets/css"
FontPath = "/assets/fonts"
ImagePath = "/assets/img"
JsPath = "/assets/js"
ShippingLabelUri = "/assets/shippingLabels"
; These are filesystem paths.
ProductPath = "./assets/products"
ShippingLabelDirectory = "./assets/shippingLabels"
Templates = "./templates"
ProductImagePath = "./assets/products/thumbnails"

[Paypal]
ApiUrl = "https://api-m.sandbox.paypal.com"
ClientId = "changeme"
ClientSecret = "changeme"
JsApiUrl = "https://sandbox.paypal.com"

[Session]
TimeoutMinutes = 240

[ShipStation]
ApiKey = "TEST_changeme"
ApiUrl = "https://api.shipstation.com"
StoreId = "TEST1234"

[Shipping]
FromAddress1 = "13 Elm Street"
FromAddress2 = "suite 23"
FromCity = "Champaign"
FromCountry = "US"
FromPostalCode = "61821"
FromStateProvince = "Illinois"
ShipsInDays = 3

[Site]
BaseUri = "/"
Domain = "example.com"
Port = 80
Protocol = "http"
ProductImageUri = "/assets/products/thumbnails"

[Tasks]
MailerInterval = 600
ShippingUpdateInterval = 14400

[Taxes]
TaxableStates = "Illinois=6.25"

[USPS]
AccountNumber = "1000315338"
ApiUrl = "https://apis.usps.com"
ConsumerKey = "example"
ConsumerSecret = "example"
CRID = "53403854"
MID = "903956241"

__________________________________________________________________

I did my best to make most stuff configurable, so I think if some-
one were to want to re-use this code, they'd probably just have to
rename photronicsite to whateversite :P  I'm not 100% sure though,
I  may have the name  'photronic'  in other places  -  nothing you
wouldn't be able to find with a quick grep.

If you're interested in a copy of this, you can register on my git
gitea interface (2) which should get you access.

(1) https://tech.slashdot.org/story/25/04/08/1518213/
(2) https://linkerror.com/git/