aboutsummaryrefslogtreecommitdiff
path: root/CLAUDE.md
blob: c62d16ee09e69c9cc3a753d34108d15320dbcb18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Personal landing page website for 256phi.eu - a self-hosted portfolio/hub with blog, guestbook, art gallery, music recommendations, and contact pages. Features a synthwave/retro terminal aesthetic with an animated 3D WebGL background.

## Tech Stack

- **Frontend**: HTML5, CSS3, JavaScript ES6 modules
- **3D Graphics**: Three.js v0.160.0 (CDN import)
- **Backend**: PHP 8.4 with Parsedown for markdown parsing
- **Web Server**: Caddy with PHP-FPM
- **Data Storage**: JSON file (guestbook entries)

## Development

No build system - files are served directly by Caddy. No npm, no bundler.

**Local development requires:**
- Caddy web server
- PHP 8.4 with PHP-FPM
- Site root configured at `/var/www/html/src` (or adjust Caddyfile)

## Architecture

```
src/
├── index.html              # Landing page
├── Background/             # Three.js 3D scene (main.js imports sun.js, mountains.js)
├── Style/style.css         # Global synthwave styling
├── Pages/
│   ├── blog/
│   │   ├── blog.php        # Renders post list or individual post
│   │   ├── posts/          # Markdown files: YYYY-MM-DD-slug.md
│   │   └── Parsedown.php   # Markdown parser library
│   ├── guestbook/
│   │   ├── guestbook.php   # Form + JSON CRUD
│   │   └── guestbook.json  # Persistent storage
│   ├── art/portfolio.html  # Gallery with lightbox
│   ├── commissions/
│   │   └── commissions.php # Commission info + email form
│   ├── contact.html
│   └── music.html
└── Assets/art/             # Art portfolio images
```

## URL Routing (Caddyfile)

| URL | File |
|-----|------|
| `/home` | `index.html` |
| `/blog` | `Pages/blog/blog.php` |
| `/blog/{slug}` | `Pages/blog/blog.php?post={slug}` |
| `/guestbook` | `Pages/guestbook/guestbook.php` |
| `/portfolio` | `Pages/art/portfolio.html` |
| `/commissions` | `Pages/commissions/commissions.php` |
| `/contact` | `Pages/contact.html` |
| `/music` | `Pages/music.html` |

## Adding Blog Posts

Create a markdown file in `src/Pages/blog/posts/` with naming convention: `YYYY-MM-DD-slug.md`