<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ceres, branch main</title>
<subtitle>Recipe server for your favorite dishes</subtitle>
<id>https://cgit.xengineering.eu/ceres/atom</id>
<link rel='self' href='https://cgit.xengineering.eu/ceres/atom'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/'/>
<updated>2024-11-03T16:45:07Z</updated>
<entry>
<title>Add `-version` suffix to VERSION.txt</title>
<updated>2024-11-03T16:45:07Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T16:45:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=99cff9a3102c64cd146d524524001bd6ecb246c4'/>
<id>urn:sha1:99cff9a3102c64cd146d524524001bd6ecb246c4</id>
<content type='text'>
This follows the process described in RELEASE.md to make sure the
development versions are not mixed up with the released ones.
</content>
</entry>
<entry>
<title>Set version to 0.5.0</title>
<updated>2024-11-03T15:54:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T15:38:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=110affc48491d3fd06296a6609abcd763fc29da0'/>
<id>urn:sha1:110affc48491d3fd06296a6609abcd763fc29da0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update CHANGELOG.md for version 0.5.0</title>
<updated>2024-11-03T15:54:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T15:37:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=f1718b860e5a4cd6918b6af37650417a228a84dc'/>
<id>urn:sha1:f1718b860e5a4cd6918b6af37650417a228a84dc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix RELEASE.md</title>
<updated>2024-11-03T15:54:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T15:40:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=cc655af4d6efaf2b3b0ac50b7f7c044c6bc3b15d'/>
<id>urn:sha1:cc655af4d6efaf2b3b0ac50b7f7c044c6bc3b15d</id>
<content type='text'>
The changelog should be changed before updating the version to make sure
changing the version is the commit which is tagged.

Furthermore there was a mistake that the suffix `-devel` should be
removed after release. Instead it should be added.
</content>
</entry>
<entry>
<title>Fix version string</title>
<updated>2024-11-03T15:54:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T15:53:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=6c8ac2b906d8d42d3765c4821ebbafc72c43663b'/>
<id>urn:sha1:6c8ac2b906d8d42d3765c4821ebbafc72c43663b</id>
<content type='text'>
This contained an unwanted newline.
</content>
</entry>
<entry>
<title>view: Implement favorite recipes</title>
<updated>2024-11-03T15:06:58Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T14:50:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=c1b976edd0c27fdc488da7ff4c1b7551df0323cd'/>
<id>urn:sha1:c1b976edd0c27fdc488da7ff4c1b7551df0323cd</id>
<content type='text'>
This marks favorite recipes with a `⭐` emoticon. The favorite flag
value can be set on the recipe edit page. Favorite recipes are listed
first on the recipe list view.

Furthermore as a second priority the created time stamp is used in the
recipe list so that more recent recipes are listed first.
</content>
</entry>
<entry>
<title>model: Implement favorite recipes</title>
<updated>2024-11-03T15:05:55Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T14:49:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=7cd3a096a975801a07fb3ff06b6fac70e17234ce'/>
<id>urn:sha1:7cd3a096a975801a07fb3ff06b6fac70e17234ce</id>
<content type='text'>
This adds the ability to store a flag `is_favorite` inside the database.
The corresponding SQL migration is part of this commit.

Furthermore the Go code in the model package is adapted.
</content>
</entry>
<entry>
<title>Add file extension to LICENSE</title>
<updated>2024-11-03T14:45:46Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-11-03T14:45:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=7361801b45640ead9db82769434eb181c31e57e6'/>
<id>urn:sha1:7361801b45640ead9db82769434eb181c31e57e6</id>
<content type='text'>
This makes it easier for humans and software to detect that this is a
plain text file.
</content>
</entry>
<entry>
<title>view: Display URL content on recipe page</title>
<updated>2024-10-24T18:24:46Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-24T18:24:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=43ed47bf3d51e25d3195870241bbe6619c43e459'/>
<id>urn:sha1:43ed47bf3d51e25d3195870241bbe6619c43e459</id>
<content type='text'>
This makes the recipe page less pretty. Nevertheless the URL is more
visible to the user which makes it more likely that errors in the URL
are detected.

This change is based on user feedback. Invalid URLs were added which led
effectively to data loss.
</content>
</entry>
<entry>
<title>view: Order ingredient summary by ingredient name</title>
<updated>2024-10-24T18:14:14Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-24T15:24:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=9422e8194245c9cdbfa09b38c20173964349e2a2'/>
<id>urn:sha1:9422e8194245c9cdbfa09b38c20173964349e2a2</id>
<content type='text'>
This makes it easier to write a shopping list for the required
ingredients.
</content>
</entry>
<entry>
<title>Rework error handling of model.DB.Transaction()</title>
<updated>2024-10-24T15:01:24Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-24T15:01:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=dc37aaceea903fcc84144c7566a14b3c5378dcaf'/>
<id>urn:sha1:dc37aaceea903fcc84144c7566a14b3c5378dcaf</id>
<content type='text'>
The functions in the sub-packages model, view and controller should not
log too much. Instead they should return errors which can be extended by
fmt.Errorf("&lt;some mesage&gt;: %w", err).
</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>tools: Add unit tests to check.sh</title>
<updated>2024-10-23T16:43:02Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T16:43:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=9d14fee31507551149dcdf31c59798624330f3f3'/>
<id>urn:sha1:9d14fee31507551149dcdf31c59798624330f3f3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix unit tests</title>
<updated>2024-10-23T16:42:20Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T16:41:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=9704fcb5e98ff4cfee39b9754b8fb112998e4194'/>
<id>urn:sha1:9704fcb5e98ff4cfee39b9754b8fb112998e4194</id>
<content type='text'>
API changes were not adopted in the unit tests.
</content>
</entry>
<entry>
<title>Explain package structure in README.md</title>
<updated>2024-10-23T16:17:44Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T16:17:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=e8f52156bf07a7668fb434eadb0e22f3e7dad648'/>
<id>urn:sha1:e8f52156bf07a7668fb434eadb0e22f3e7dad648</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Apply go fmt</title>
<updated>2024-10-23T16:02:06Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T16:02:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=98d6bc5dda57146cdf26de4adc5b2cf747d81934'/>
<id>urn:sha1:98d6bc5dda57146cdf26de4adc5b2cf747d81934</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove Makefile and update README.md accordingly</title>
<updated>2024-10-23T15:56:35Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T15:56:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=649684b3b735f50ea33241286d231f977b8d0a89'/>
<id>urn:sha1:649684b3b735f50ea33241286d231f977b8d0a89</id>
<content type='text'>
This drops the build dependency GNU Make. The resulting build steps are
typical for Go repositories and thus more familiar for Go developers.
</content>
</entry>
<entry>
<title>Inject version with embed instead of build flags</title>
<updated>2024-10-23T14:04:22Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-23T14:01:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=2195cfce131ee599c71d0c426a7eea70ed52345f'/>
<id>urn:sha1:2195cfce131ee599c71d0c426a7eea70ed52345f</id>
<content type='text'>
The build flags made the basic build and debug calls quite complex and
bound this strictly to Git repositories which is a problem if the source
code is passed around as tar archive.

Embedding this via Go's embed package and a VERSION.txt file makes this
way easier. A simple `go build` command is sufficient to build ceres.

To make sure the version string is extended by a `-devel` marker and
that this marker is removed before a release a RELEASE.md file was added
as a checklist for releases.
</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>Use `-race` for debug runs</title>
<updated>2024-10-22T18:26:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-22T18:26:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=38115772ff49bffe6d428c857ca345ee1087a5e7'/>
<id>urn:sha1:38115772ff49bffe6d428c857ca345ee1087a5e7</id>
<content type='text'>
This option for the go tool activates a race condition detector. It
makes building the executable slower. Nevertheless it is worth it since
it detects a lot of race conditions and race conditions should be
avoided as much as possible.
</content>
</entry>
<entry>
<title>Run go mod tidy</title>
<updated>2024-10-21T19:43:11Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-21T19:43:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=f175701d9ba499c2df0fdc6a3025c1bcc71b1832'/>
<id>urn:sha1:f175701d9ba499c2df0fdc6a3025c1bcc71b1832</id>
<content type='text'>
</content>
</entry>
<entry>
<title>model: Rename to db.go</title>
<updated>2024-10-21T19:37:54Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-21T19:37:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=f917bc9e1973bfc1c6ab56bf1362295f89d687c3'/>
<id>urn:sha1:f917bc9e1973bfc1c6ab56bf1362295f89d687c3</id>
<content type='text'>
The old name database.go did not match the type name DB.
</content>
</entry>
<entry>
<title>model: Refactor public API of DB</title>
<updated>2024-10-21T19:34:31Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-21T19:30:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=72601b87ef040a3c6882368ac85c12c1ae705cd2'/>
<id>urn:sha1:72601b87ef040a3c6882368ac85c12c1ae705cd2</id>
<content type='text'>
This commit makes not externally needed methods private and adds error
return values since something like log.Fatal() should be called outside
this package since it is control-flow-related.
</content>
</entry>
<entry>
<title>model: Save int-based schema version in DB</title>
<updated>2024-10-21T19:34:26Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-15T19:23:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=118e1c69057e4e7b6ab3e730d5628b4822ed4c4d'/>
<id>urn:sha1:118e1c69057e4e7b6ab3e730d5628b4822ed4c4d</id>
<content type='text'>
Ceres v0.4.0 used the `git describe` output as database schema and
enforced exactly matching versions between the database and the
executable.

This turned out to be not flexible enough. It is way easier to version
the database separately with a simple integer and require the same
database schema version integer between the application and the
database.

This commit implements this new approach.
</content>
</entry>
<entry>
<title>model: Handle schema versions internally by integers</title>
<updated>2024-10-15T18:25:38Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T18:34:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=1904f50084660ce587a67d49939fd0734fd8a582'/>
<id>urn:sha1:1904f50084660ce587a67d49939fd0734fd8a582</id>
<content type='text'>
This references the database schemas known from the past with integer
values internally. 0 is used for an empty database and 1 for what was
used in ceres version 0.4.0.

The old approach to write the `git describe` output into the database
worked well for released versions but was problematic during
development. A numerical and separate database schema versioning is
easier to handle.
</content>
</entry>
<entry>
<title>model: Simplify DB method signatures</title>
<updated>2024-10-13T18:21:00Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T18:21:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=5ca945112b5cd7c92eb3b9da81597fcba5256b56'/>
<id>urn:sha1:5ca945112b5cd7c92eb3b9da81597fcba5256b56</id>
<content type='text'>
</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>Introduce xengineering.eu/ceres/model/migrations</title>
<updated>2024-10-13T16:54:18Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T12:08:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=ed19b82335345833c5b8f5446237d559a3657a35'/>
<id>urn:sha1:ed19b82335345833c5b8f5446237d559a3657a35</id>
<content type='text'>
This new package is only for database migrations. All data for Ceres
should be stored inside the SQLite3 database. Thus migrations can always
be executed with functions with the following signature.

    func(tx *sql.Tx) error

Those migration functions should be stored inside the new package.
Bigger SQL code can be stored in *.sql files for better syntax
highlighting. This code is embedded into the final Go executable by
using the embed package.
</content>
</entry>
<entry>
<title>model: Fix direct access to database</title>
<updated>2024-10-12T13:24:33Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-05-17T20:49:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=9d3a5fb85dc02e87fab879855c4c3bace5f753f2'/>
<id>urn:sha1:9d3a5fb85dc02e87fab879855c4c3bace5f753f2</id>
<content type='text'>
Instead a database transaction has to be used. Each database interaction
should be wrapped into a transaction to make sure any possible change
(even side-effects) can be rolled back in case of errors.
</content>
</entry>
</feed>
