Skip to content

Commit c595d4e

Browse files
committed
chore: initialize project with Astro, Docker, and GitHub Actions
Add initial project setup for LLMHorrors.com static site including: - Astro configuration with Tailwind CSS and Svelte components - Docker build setup with multi-stage Dockerfile and .dockerignore - GitHub Actions workflow for automated Docker builds and Coolify deployment - Development dependencies and package configuration with Bun - Environment configuration template and documentation - Project structure with source files and public assets
0 parents  commit c595d4e

File tree

123 files changed

+6159
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+6159
-0
lines changed

.dockerignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# build output
2+
dist/
3+
4+
# dependencies
5+
node_modules/
6+
.snowpack/
7+
8+
# logs
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
13+
# environment variables
14+
.env
15+
.env.production
16+
17+
# macOS-specific files
18+
.DS_Store
19+
20+
# Local Netlify folder
21+
.netlify
22+
netlify
23+
24+
.astro
25+
.idea
26+
.vercel

.env.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Site's URI or base URL
2+
SITE_URI=
3+
4+
# Git credentials used by Git based apps like Decap Admin
5+
OAUTH_GITHUB_CLIENT_ID=
6+
OAUTH_GITHUB_CLIENT_SECRET=
7+
8+
# DB service details for views counter
9+
10+
## Redis
11+
REDIS_URI=
12+
13+
# Turso
14+
TURSO_DB_URL=
15+
TURSO_DB_AUTH_TOKEN=

.github/workflows/docker-build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-24.04-arm
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v5
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Log in to the Container registry
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ${{ env.REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Extract metadata (tags, labels) for Docker
33+
id: meta
34+
uses: docker/metadata-action@v5
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
tags: |
38+
type=ref,event=branch
39+
type=ref,event=pr
40+
type=semver,pattern={{version}}
41+
type=semver,pattern={{major}}.{{minor}}
42+
type=sha
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v6
46+
with:
47+
context: .
48+
platforms: linux/aarch64
49+
push: ${{ github.event_name != 'pull_request' }}
50+
tags: ${{ steps.meta.outputs.tags }}
51+
labels: ${{ steps.meta.outputs.labels }}
52+
cache-from: type=gha,scope=build-aarch64
53+
cache-to: type=gha,mode=max,scope=build-aarch64
54+
55+
- name: Deploy to Coolify
56+
run: |
57+
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# build output
2+
dist/
3+
4+
# dependencies
5+
node_modules/
6+
.snowpack/
7+
8+
# logs
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
13+
# environment variables
14+
.env
15+
.env.production
16+
17+
# macOS-specific files
18+
.DS_Store
19+
20+
# Local Netlify folder
21+
.netlify
22+
netlify
23+
24+
.astro
25+
.idea
26+
.vercel

CLAUDE.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# LLMHorrors.com
2+
3+
Astro static site (Tailwind CSS, Svelte components) deployed on Vercel.
4+
5+
## Adding a New LLM Horror Story
6+
7+
### 1. Create the post file
8+
9+
Create `src/content/blog/{service}-{summary}.md` (e.g. `chatgpt-hallucination.md`).
10+
11+
Frontmatter schema:
12+
13+
```yaml
14+
---
15+
title: Short descriptive title # Max 100 chars
16+
description: Short summary of the horror story...
17+
tags:
18+
- chatgpt # Service name + relevant tags (hallucination, cost, etc.)
19+
- hallucination
20+
author: Andras Bacsai
21+
authorTwitter: heyandras
22+
date: "2026-02-10T12:34:56.789Z" # ISO date string
23+
image: /assets/{service}-{summary}.{ext} # Local image in public/assets/
24+
category: development
25+
isNew: true # Shows "New" badge on homepage
26+
---
27+
```
28+
29+
### 2. Add the post image
30+
31+
Save the screenshot/image to `public/assets/{service}-{summary}.{ext}` (png/jpg/webp).
32+
33+
All images must be local — never use external URLs in frontmatter `image:` fields. The `BaseHead.astro` component automatically converts relative paths to absolute URLs for `og:image` and `twitter:image` meta tags.
34+
35+
### 3. Write the post body
36+
37+
Follow this pattern:
38+
39+
```markdown
40+
---
41+
42+
[Original post](https://x.com/user/status/123456)
43+
44+
Conclusion: Brief takeaway.
45+
46+
---
47+
48+
__tldr: One-sentence summary of what happened.__
49+
```
50+
51+
Optional sections: Fun Fact with `<img>` (use local paths), extended quotes/context.
52+
53+
### 4. Update the previous "new" post
54+
55+
Find the previous post with `isNew: true` and set it to `isNew: false`.
56+
57+
### 5. No other config needed
58+
59+
Astro automatically handles routing (`/all/{slug}`), RSS feed, and homepage listing sorted by date.
60+
61+
## Project Structure
62+
63+
- `src/content/blog/*.md` — Blog posts (Astro Content Collections)
64+
- `src/content/config.ts` — Content schema
65+
- `src/config.ts` — Site metadata (name, URL, author, default image)
66+
- `src/components/BaseHead.astro` — Meta tags (og:image, twitter:image)
67+
- `src/pages/index.astro` — Homepage
68+
- `src/pages/all/[slug].astro` — Individual post pages
69+
- `src/layouts/post.astro` — Post layout
70+
- `public/assets/` — All local images (post images, blog cover, etc.)

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Build stage
2+
FROM oven/bun:1 AS builder
3+
4+
WORKDIR /app
5+
COPY package*.json ./
6+
RUN bun install --frozen-lockfile
7+
COPY . .
8+
RUN bun run build
9+
10+
# Production stage
11+
FROM nginx:alpine
12+
13+
# Copy nginx configuration if you have any custom settings
14+
# COPY nginx.conf /etc/nginx/conf.d/default.conf
15+
16+
# Copy built static files from builder stage to nginx public directory
17+
COPY --from=builder /app/dist /usr/share/nginx/html
18+
19+
EXPOSE 80
20+
CMD ["nginx", "-g", "daemon off;"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 coolLabs Solutions Kft.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LLM Horrors

astro.config.mjs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import path, { dirname } from 'path';
2+
import { fileURLToPath } from 'url';
3+
import svelte from '@astrojs/svelte';
4+
import tailwind from '@astrojs/tailwind';
5+
import sitemap from '@astrojs/sitemap';
6+
import mdx from '@astrojs/mdx';
7+
import { defineConfig } from "astro/config";
8+
import markdoc from "@astrojs/markdoc";
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = dirname(__filename);
11+
import remarkCodeTitles from 'remark-code-titles'
12+
// import decapCmsOauth from "astro-decap-cms-oauth";
13+
14+
// Full Astro Configuration API Documentation:
15+
// https://docs.astro.build/reference/configuration-reference
16+
17+
// https://astro.build/config
18+
export default defineConfig( /** @type {import('astro').AstroUserConfig} */{
19+
output: 'static',
20+
site: 'https://llmhorrors.com',
21+
server: {
22+
// port: 4321, // The port to run the dev server on.
23+
},
24+
markdown: {
25+
syntaxHighlight: 'shiki',
26+
shikiConfig: {
27+
theme: 'css-variables',
28+
},
29+
remarkPlugins: [
30+
remarkCodeTitles
31+
]
32+
},
33+
integrations: [
34+
mdx(),
35+
markdoc(),
36+
svelte(),
37+
tailwind({
38+
applyBaseStyles: false,
39+
}),
40+
sitemap(),
41+
],
42+
vite: {
43+
plugins: [],
44+
resolve: {
45+
alias: {
46+
$: path.resolve(__dirname, './src')
47+
}
48+
},
49+
optimizeDeps: {
50+
allowNodeBuiltins: true
51+
}
52+
},
53+
});

biome.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": true
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)