<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ceres/server.go, branch step-re-ordering</title>
<subtitle>Recipe server for your favorite dishes</subtitle>
<id>https://cgit.xengineering.eu/ceres/atom/server.go?h=step-re-ordering</id>
<link rel='self' href='https://cgit.xengineering.eu/ceres/atom/server.go?h=step-re-ordering'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/'/>
<updated>2026-08-13T19:15:49Z</updated>
<entry>
<title>WIP: Add JSON-based API under `/api`</title>
<updated>2026-08-13T19:15:49Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-08-13T18:53:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=60bdc926dd7235fd55930ebd5b30c2e346f8ca59'/>
<id>urn:sha1:60bdc926dd7235fd55930ebd5b30c2e346f8ca59</id>
<content type='text'>
TODO: Not all the information is provided there.

This commit provides an unstable JSON API for communication with an
upcoming Dart frontend.

Later it might be part of the public interface for integration into
other services. For this step it has to be ensured the semantics are not
changing a lot in the future which is currently out of scope.
</content>
</entry>
<entry>
<title>Introduce Dart infrastructure for frontend</title>
<updated>2026-08-11T09:22:48Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-08-11T09:14:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=40b3272f5660517a4c97f97afcc9c3ed787465a4'/>
<id>urn:sha1:40b3272f5660517a4c97f97afcc9c3ed787465a4</id>
<content type='text'>
The Dart programming language is excellent for frontend use. It is
suitable to write command line programs, web interfaces with the builtin
JavaScript transpiler and cross-platform applications with Flutter.

To focus on a small number of languages Dart should now be used for
frontend purposes as Go is used for backend purposes.

Thus it is a valid option to start the migration for Ceres from Go +
JavaScript to Go + Dart.

This commit sets up the infrastructure. A `view/dart/ceres.dart` file is
added together with tooling to transpile to JavaScript, embed it into
the Go executable and serve it. Furthermore the script which just prints
a message to the console is added to every page.

Further commits can move existing code to Dart or add new code in Dart.
</content>
</entry>
<entry>
<title>Switch to http.Handler</title>
<updated>2024-10-23T18:34:57Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T18:34:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=e66691083a2455c29b50a2970c0aba1d6afca753'/>
<id>urn:sha1:e66691083a2455c29b50a2970c0aba1d6afca753</id>
<content type='text'>
The used `func(http.ResponseWriter, *http.Request)` return values made
the HTTP handler factory functions quite unreadable. Thus it is switched
to the http.Handler type.
</content>
</entry>
<entry>
<title>Remove github.com/gorilla/mux dependency</title>
<updated>2024-10-22T19:53:30Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-22T19:17:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=dbc874e2b9f300bea7a18deda32e784afb0ab89a'/>
<id>urn:sha1:dbc874e2b9f300bea7a18deda32e784afb0ab89a</id>
<content type='text'>
The reason for the introduction of this dependency was that it was easy
to setup routes with HTTP method restrictions.

Since Go 1.22 this feature is part of the standard library. Method
restrictions are part of the patterns used to register routes [1].

[1]: https://pkg.go.dev/net/http#hdr-Patterns-ServeMux
</content>
</entry>
<entry>
<title>Simplify Server type</title>
<updated>2024-10-13T18:01:27Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T18:01:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=4b1bddd92318e9a1d102b3e06c7925ba32422510'/>
<id>urn:sha1:4b1bddd92318e9a1d102b3e06c7925ba32422510</id>
<content type='text'>
It is not required to create a struct definition with only one member.
The new solution is more elegant.
</content>
</entry>
<entry>
<title>model: Replace global db variable by custom type</title>
<updated>2024-10-13T17:55:38Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T17:52:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=473052ed8f2c83052ed5b47a7f4cec68ac2621a6'/>
<id>urn:sha1:473052ed8f2c83052ed5b47a7f4cec68ac2621a6</id>
<content type='text'>
Reducing global variables makes it easier to understand functions
independently of the rest of the code.

Adding the new model.DB type as a custom variant of the sql.DB type
makes it possible to write methods for the database which makes the code
way more readable.
</content>
</entry>
<entry>
<title>Remove default recipe name</title>
<updated>2024-05-09T10:19:30Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-23T15:42:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=2704cb76554b02f546bf3f9d2d11be98f2854b7b'/>
<id>urn:sha1:2704cb76554b02f546bf3f9d2d11be98f2854b7b</id>
<content type='text'>
To avoid not clickable recipes on the /recipes page a default name used
to be inserted on recipe creation.

This was not a proper fix for the problem and also was annoying that the
user first had to remove the default recipe name.

This commit removes this default name.
</content>
</entry>
<entry>
<title>Rename gitDescribe to version</title>
<updated>2024-05-08T18:59:41Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-08T18:59:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=5a09313066f5594ca9e3917c00821e443dcba7bc'/>
<id>urn:sha1:5a09313066f5594ca9e3917c00821e443dcba7bc</id>
<content type='text'>
This variable will be the only used representation for version
information. It can trivially be used for an equality check. Further
data as semantic versioning must be parsed from this string.
</content>
</entry>
<entry>
<title>Move HTTP server code to new server.go file</title>
<updated>2024-05-07T18:54:33Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-07T18:54:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=ebb446f6115b4ca690ea354fa4275e33a0d9976b'/>
<id>urn:sha1:ebb446f6115b4ca690ea354fa4275e33a0d9976b</id>
<content type='text'>
This separates the main control flow and HTTP-related high-level code.

Furthermore the new main.Server type makes the related methods and
function more like the functions from the standard library with a
NewServer() function and methods with only one word as name.
</content>
</entry>
<entry>
<title>Remove complete implementation</title>
<updated>2023-09-17T09:07:08Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-09-17T09:07:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=ea54de7d32e6b576ccfb430e7e57811b7c4587fe'/>
<id>urn:sha1:ea54de7d32e6b576ccfb430e7e57811b7c4587fe</id>
<content type='text'>
Restarting from scratch seems to be the fastest approach to switch to
sqlite and get rid of some other structural mistakes from the past.
</content>
</entry>
<entry>
<title>Introduce routing table</title>
<updated>2023-04-28T08:44:29Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-04-25T15:39:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=f456fa1a6d3a6633af3b420f1eddbc1a96ffcdf1'/>
<id>urn:sha1:f456fa1a6d3a6633af3b420f1eddbc1a96ffcdf1</id>
<content type='text'>
This removes a lot of repetative code.
</content>
</entry>
<entry>
<title>Switch to unnested config</title>
<updated>2023-04-12T16:50:34Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-04-12T16:50:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=4eacd5f54074c6cd73eaef4178c56843ce742445'/>
<id>urn:sha1:4eacd5f54074c6cd73eaef4178c56843ce742445</id>
<content type='text'>
This is now just not needed.
</content>
</entry>
<entry>
<title>Implement recipe deletion</title>
<updated>2023-04-01T16:21:27Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-04-01T14:03:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=88107366bce6b7f7c788171a18c40ad102904ff4'/>
<id>urn:sha1:88107366bce6b7f7c788171a18c40ad102904ff4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove image functionality</title>
<updated>2023-03-31T17:47:55Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-03-31T17:47:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=f1308a436040f3a72e058e10ec2693cfb599da30'/>
<id>urn:sha1:f1308a436040f3a72e058e10ec2693cfb599da30</id>
<content type='text'>
Recipe images are currently complicated to implement and have little
use. Probably they will not be covered in the next release.
</content>
</entry>
<entry>
<title>Apply go fmt *.go</title>
<updated>2023-02-11T17:19:30Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-02-11T17:19:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=ced1e404bd762abb114321334a3812805dee7059'/>
<id>urn:sha1:ced1e404bd762abb114321334a3812805dee7059</id>
<content type='text'>
This auto-applies the recommended Go codestyle.
</content>
</entry>
<entry>
<title>Rework logging</title>
<updated>2023-02-11T17:06:52Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-02-11T17:06:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=4c36742ec8072e645f0b755cdf5e9582ac2a6887'/>
<id>urn:sha1:4c36742ec8072e645f0b755cdf5e9582ac2a6887</id>
<content type='text'>
Logging during a request is at the moment not really needed. Printing
the config to the log was a stupid idea too.
</content>
</entry>
<entry>
<title>Make multiplexer regular handlers</title>
<updated>2023-02-11T12:51:21Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-02-11T12:51:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=06a09ecebb3e7631044963e374671edf15d61213'/>
<id>urn:sha1:06a09ecebb3e7631044963e374671edf15d61213</id>
<content type='text'>
Multiplexer functions used to return closures which are able to handle
HTTP requests for historc reasons. Now the multiplexers can be regular
HTTP handlers which is simpler.
</content>
</entry>
<entry>
<title>Switch to global database pointer</title>
<updated>2023-02-11T12:46:45Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-02-11T12:46:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=6b52b4bbc81c64b29daff043b83e21c38f332052'/>
<id>urn:sha1:6b52b4bbc81c64b29daff043b83e21c38f332052</id>
<content type='text'>
Passing the database pointer around is a lot of text and has no benefit.
</content>
</entry>
<entry>
<title>Switch webserver to global config struct</title>
<updated>2023-02-11T12:02:41Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-02-11T12:02:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=7e517ada827abc2658bb07347bc656c10860e091'/>
<id>urn:sha1:7e517ada827abc2658bb07347bc656c10860e091</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename router.go to server.go</title>
<updated>2023-02-11T11:32:36Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-02-11T11:32:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=817f15a79f2960101644cd282703e9439aef082f'/>
<id>urn:sha1:817f15a79f2960101644cd282703e9439aef082f</id>
<content type='text'>
This fits better because this file is the central entry point of the
Ceres webserver.
</content>
</entry>
</feed>
