No description https://unilayer.dev
  • HTML 76.9%
  • C# 16.4%
  • CSS 5.2%
  • JavaScript 1.2%
  • Dockerfile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
ferociousbyte f66e2d7269
Some checks failed
/ build (push) Successful in 28s
/ push (push) Successful in 11s
/ deploy (push) Failing after 1m14s
Add target="_blank" and rel="noopener noreferrer" to external links for improved security
2026-09-30 20:27:54 +02:00
.forgejo/workflows Refactor and migrate BlzrtailTemplate to unilayer.dev 2026-09-30 12:46:46 +02:00
libs Refactor and migrate BlzrtailTemplate to unilayer.dev 2026-09-30 12:46:46 +02:00
src Add target="_blank" and rel="noopener noreferrer" to external links for improved security 2026-09-30 20:27:54 +02:00
.gitignore Initial commit 2026-09-30 09:56:11 +00:00
.gitmodules Initial commit 2026-09-30 09:56:11 +00:00
README.md Refactor and migrate BlzrtailTemplate to unilayer.dev 2026-09-30 12:46:46 +02:00
unilayer.dev.sln Refactor and migrate BlzrtailTemplate to unilayer.dev 2026-09-30 12:46:46 +02:00

unilayer.dev

The website of unilayer, the self-hosted backend layer from Talaryon Labs. Built with Blazor on blzrtail (submodule in libs/blzrtail), Tailwind CSS, daisyUI and Alpine.js.

Projects

Project Description
src/Website The public site: home (/), documentation (/docs), API reference (/api) and contact form (/contact). The content is static for now.
src/Website.Admin The admin. Empty for now; it will edit the website's content in Unilayer.
src/Website.Shared Shared hosting code: KestrelTasks (endpoint, TLS, rate limiting, compression, security headers) and HttpConfiguration.

Both hosts start through Talaryon.Toolbox.Tasks.TaskScheduler: Program.cs registers the startup tasks (KestrelTasks, WebsiteTasks / AdminTasks) and the configuration comes from TalaryonConfiguration.

Getting started

git clone --recurse-submodules <repository>   # or: git submodule update --init
cd src/Website
npm ci
npx @tailwindcss/cli -i Styles/app.css -o wwwroot/css/app.generated.css --watch
dotnet run                                    # http://localhost:5158

Configuration

Nothing is read from the project itself. Pass a YAML file with --config <path> (see appsettings.example.yaml of each project); environment variables and command line arguments take priority over it. The launch profiles use the example files, which carry the Content-Security-Policy the site needs (Alpine.js from jsdelivr, which evaluates with new Function); their other settings are commented out, so locally the contact form is off unless you pass mail settings.

Key Environment Description
unilayer:url UNILAYER_URL Unilayer instance of the content. Read but not used yet.
unilayer:token UNILAYER_TOKEN Token for that instance. Read but not used yet.
mail:connectionString MAIL_CONNECTION_STRING SMTP server of the contact form, e.g. smtp://user:password@smtp.example.com:587?ssl=true.
mail:from / mail:to MAIL_FROM / MAIL_TO Sender and recipient of the contact requests. The form is on when all three mail settings are set.
mail:enabled MAIL_ENABLED false switches the contact form off even with complete mail settings.
http:endpoint – Listen address, e.g. 0.0.0.0:80. Without it the host's addresses apply (--urls, ASPNETCORE_URLS).
http:securityPolicy:* – Additional origins of the Content-Security-Policy.

CI/CD

.forgejo/workflows/website.yaml and admin.yaml run on pushes to preview and stable that touch the project (or Website.Shared). They build the CSS and publish the project, push the image code.talaryon.dev/<owner>/unilayerdev-website (or -admin), and deploy it with stackmgr into the stack unilayer.dev: preview to the dev environment on the DEV remote, stable to web on the PROD remote.

They need the same repository settings as talaryonlabs.com: the variables PACKAGE_USERNAME, STACK_URL, STACK_REMOTE_{DEV,PROD}_NAME and STACK_REMOTE_{DEV,PROD}_URL, and the secrets PACKAGE_APIKEY, STACK_APIKEY and STACK_REMOTE_{DEV,PROD}_APIKEY. The stack unilayer.dev with the services website and admin has to exist in the stack repository.

Moving the content to Unilayer

The Unilayer settings are already read (SiteConfiguration, AdminConfiguration). To switch over, reference Unilayer.Client, register the client in WebsiteTasks.BuildAsync (the spot is marked with TODO(unilayer)) and load the page content from it, as talaryonlabs.com does.

Styling

Styles/app.css defines the daisyUI theme unilayer-dark and the unilayer palette (ink-* surfaces, lime-* brand) next to the component classes of the docs (.doc, .ep, .toc, .callout, ...). The fonts (Space Grotesk, JetBrains Mono) are self-hosted in wwwroot/fonts.