Welcome
Hi! Thanks for checking out my dev page.
Codespirals is a small solo (for now) software company from Switzerland and my goal is to create a solid foundation of code libraries and modules to build interesting and helpful projects on top of.
I'll make whatever catches my fancy at the moment. I try to stick with the bigger projects, but sometimes I accidentally make a playable blackjack game because I get distracted by poker card unicode characters.
I do not use AI generated code in my projects*. I believe it makes code sloppy and unmaintainable over time. I'm not a luddite, I sometimes use it to google when google doesn't deliver, but I don't trust AI enough to use code it makes.
Since I can't afford an artist and I dislike AI "art" even more than AI code, I drew the logo myself. It's not very good, but at least it was made by a human and that's good enough for me.
Libraries:
A codespirals library module is a set of mostly abstract code made for a specific purpose, which is usually described by the module's name and README.
These modules are denoted with the name "Codespirals.[Module name]".
At the root of them all is the "Codespirals.Base" Module. This module contains interfaces, attributes and classes used in pretty much all other projects, like an implementation for the Result Pattern (seen below) which I like to use a lot.
public class Result<T>
{
public bool Success { get; }
public TErrorCode? ErrorCode { get; }
public string Error { get; }
public T Data { get; }
}
Since libraries here are more abstract, they only contain a few concrete methods that I know I'd use in multiple projects but don't want to implement again and again.
Solutions:
Solution modules are next-to-fully implemented programs that can be attached to other projects to expedite frequently required functionalities like payment processing or mailing.
A solution has the name "Codespirals.Solution.[Solution name]" and build on the code in library modules.
They contain the following:
Services
A set of [...]Service classes and interfaces that implement the functionality of the solution, which can be used via dependency injection. These services are defined by an interface of the same name.
public class AbcService : IAbcService
{
[Custom functions]
}
Via the service collection of the application builder, this service is then registered (usually in a file named Programm or Startup).
builder.Services.AddService<IAbcService, AbcService>();
Usually a custom extension method for IServiceCollection is provided to make that step easier.
And finally, any class in the application that needs methods this service provides it can be used through common Dependency Injection
OtherClass(IAbcService abcService)
The Options Pattern
A class that contains all the options that can be individualised in a project, which are required to use the solution. This is a POGO class that mirrors the options set in the appsettings.json file (or similar), which would look a bit like this:
{
AbcOptions:{
Name:"AbcService",
Version:"1.0.1"
}
}
Just like the services, we then have to register these options in the applications builder
builder.Services.Configure<AbcOptions>(builder.Configuration.GetSection(nameof(AbcOptions));
This options class will be used to inject settings into other services and classes via
Service(IOptions<AbcOptions> options)
Other interfaces, models and extensions
The simple models and exceptions that make sure the solution is as self contained as possible.
Current generic codespirals libraries:
- Base - A few basic interfaces that simplify some basic actions and classes. ☭🔑 ●
- Users - Unified user handling for smaller projects. ☭🔑 ●
- Common - A collection of frequently used items like currency, languages or countries ☭🔑 ●
Codespirals solutions:
Projects these modules are used in:
Misc
Symbols
- ☭ - is, or will be released with a CC0 licence, free for anyone to use, modify and use for anyone however they wish
- 🔓 - open source, but with an attribution licence
- 🔑 - private until fully tested and released
- 🔒 - private with no current plans to release publicly
Sources
Footnotes
- Very occasionally, I let AI make one shot scripts in, like one I used to download tables from wikipedia. Such entirely non-critical, throw away scripts are the limit of what I trust AI to do, where my laziness to write the script is greater than my disdain for AI.