docs: update README for custom backend replacing Directus
All checks were successful
Build and Push Backend Image / build (push) Successful in 17s
Build and Push Frontend Image / build (push) Successful in 17s

Replace all Directus references with the new Fastify + GraphQL Yoga
stack, update CI/CD references to dev.pivoine.art Gitea Actions,
add DB schema overview, auth flow, image transform presets table,
and fix all links to use https and correct registry URLs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 22:01:46 +01:00
parent 662e3e8fe2
commit 741e0c3387

303
README.md
View File

@@ -13,10 +13,10 @@
Built with passion, technology, and the fearless spirit of sexual empowerment Built with passion, technology, and the fearless spirit of sexual empowerment
[![Build Status](https://img.shields.io/github/actions/workflow/status/valknarxxx/sexy.pivoine.art/docker-build-push.yml?style=for-the-badge&logo=docker&logoColor=white&color=FF69B4&labelColor=8B008B)](https://github.com/valknarxxx/sexy.pivoine.art/actions/workflows/docker-build-push.yml) [![Build Frontend](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdev.pivoine.art%2Fvalknar%2Fsexy.pivoine.art%2Factions%2Ftasks.json&query=%24.workflow_runs%5B0%5D.status&style=for-the-badge&logo=docker&logoColor=white&label=Frontend&color=FF69B4&labelColor=8B008B)](https://dev.pivoine.art/valknar/sexy.pivoine.art/actions)
[![Security Scan](https://img.shields.io/github/actions/workflow/status/valknarxxx/sexy.pivoine.art/docker-scan.yml?style=for-the-badge&logo=security&logoColor=white&label=Security&color=DA70D6&labelColor=8B008B)](https://github.com/valknarxxx/sexy.pivoine.art/actions/workflows/docker-scan.yml) [![Build Backend](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdev.pivoine.art%2Fvalknar%2Fsexy.pivoine.art%2Factions%2Ftasks.json&query=%24.workflow_runs%5B0%5D.status&style=for-the-badge&logo=fastify&logoColor=white&label=Backend&color=DA70D6&labelColor=8B008B)](https://dev.pivoine.art/valknar/sexy.pivoine.art/actions)
[![License](https://img.shields.io/badge/License-For_Pleasure-FF1493?style=for-the-badge&logo=heart&logoColor=white&labelColor=8B008B)](LICENSE) [![License](https://img.shields.io/badge/License-For_Pleasure-FF1493?style=for-the-badge&logo=heart&logoColor=white&labelColor=8B008B)](LICENSE)
[![Made with Love](https://img.shields.io/badge/Made_with-💜_Love-FF69B4?style=for-the-badge&labelColor=8B008B)](http://sexy.pivoine.art) [![Made with Love](https://img.shields.io/badge/Made_with-💜_Love-FF69B4?style=for-the-badge&labelColor=8B008B)](https://sexy.pivoine.art)
</div> </div>
@@ -24,20 +24,23 @@ Built with passion, technology, and the fearless spirit of sexual empowerment
## 👅 What Is This Delicious Creation? ## 👅 What Is This Delicious Creation?
Welcome, dear pleasure-seeker! This is **sexy.pivoine.art** — a modern, sensual platform combining the elegance of **SvelteKit**, the power of **Directus CMS**, and the intimate connection of **Buttplug.io** hardware integration. Welcome, dear pleasure-seeker! This is **sexy.pivoine.art** — a modern, sensual platform built from the ground up with full control over every intimate detail. A **SvelteKit** frontend caresses a purpose-built **Fastify + GraphQL** backend, while **Buttplug.io** hardware integration brings the experience into the physical world.
Like Beate Uhse breaking barriers in post-war Germany, we believe in the freedom to explore, create, and celebrate sexuality without shame. This platform is built for **models**, **creators**, and **connoisseurs** of adult content who deserve technology as sophisticated as their desires. Like Beate Uhse breaking barriers in post-war Germany, we believe in the freedom to explore, create, and celebrate sexuality without shame. This platform is built for **models**, **creators**, and **connoisseurs** of adult content who deserve technology as sophisticated as their desires.
### ♉ Features That'll Make You Blush ♊ ### ♉ Features That'll Make You Blush ♊
- 💖 **Sensual SvelteKit Frontend** with Tailwind CSS 4 styling - 💖 **Sensual SvelteKit Frontend** with Tailwind CSS 4 styling
- 🗄️ **Headless CMS** powered by Directus for content liberation - **Purpose-built GraphQL Backend** — lean, fast, no CMS overhead
- 🔐 **Session-based Auth** with Redis & Argon2 — discretion guaranteed
- 🖼️ **Smart Image Transforms** via Sharp (WebP, multiple presets, cached)
- 🎮 **Hardware Integration** via Buttplug.io (yes, really!) - 🎮 **Hardware Integration** via Buttplug.io (yes, really!)
- 🌐 **Multi-Platform Support** (AMD64 + ARM64) — pleasure everywhere
- 🔒 **Session-Based Authentication** — discretion guaranteed
- 📱 **Responsive Design** that looks sexy on any device - 📱 **Responsive Design** that looks sexy on any device
- 🌍 **Internationalization** — pleasure speaks all languages - 🌍 **Internationalization** — pleasure speaks all languages
- 🏆 **Gamification** — achievements, leaderboards, and reward points
- 💬 **Comments & Social** — build your community
- 📊 **Analytics Integration** (Umami) — know your admirers - 📊 **Analytics Integration** (Umami) — know your admirers
- 🐳 **Self-hosted CI/CD** via Gitea Actions on `dev.pivoine.art`
<div align="center"> <div align="center">
@@ -48,15 +51,21 @@ Like Beate Uhse breaking barriers in post-war Germany, we believe in the freedom
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ 💋 Frontend Layer │ │ 💋 Frontend Layer │
│ ├─ SvelteKit 2.0 → Smooth as silk │ │ ├─ SvelteKit 2 → Smooth as silk │
│ ├─ Tailwind CSS 4 → Styled to seduce │ │ ├─ Tailwind CSS 4 → Styled to seduce │
│ ├─ bits-ui Components → Building blocks of pleasure │ │ ├─ bits-ui Components → Building blocks of pleasure │
│ ├─ graphql-request v7 → Whispering to the backend │
│ └─ Vite → Fast and furious │ │ └─ Vite → Fast and furious │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ 🍷 Backend Layer │ │ 🍷 Backend Layer │
│ ├─ Directus CMS → Content with no limits │ ├─ Fastify v5 → The fastest penetration
│ ├─ Custom Extensions → Bespoke pleasures │ ├─ GraphQL Yoga v5 → Flexible positions
─ PostgreSQL → Data deep and secure ─ Pothos (code-first) → Schema with intention
│ ├─ Drizzle ORM → Data with grace │
│ ├─ PostgreSQL 16 → Deep and persistent │
│ ├─ Redis → Sessions that never forget │
│ ├─ Sharp → Images transformed beautifully │
│ └─ Argon2 → Passwords hashed with passion │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ 🎀 Hardware Layer │ │ 🎀 Hardware Layer │
│ ├─ Buttplug.io → Real connections │ │ ├─ Buttplug.io → Real connections │
@@ -65,8 +74,8 @@ Like Beate Uhse breaking barriers in post-war Germany, we believe in the freedom
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ 🌸 DevOps Layer │ │ 🌸 DevOps Layer │
│ ├─ Docker → Containerized ecstasy │ │ ├─ Docker → Containerized ecstasy │
│ ├─ GitHub Actions → Automated seduction │ ├─ Gitea Actions Self-hosted seduction │
│ └─ GHCR → Images served hot │ └─ dev.pivoine.art → Our own pleasure palace
└─────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────┘
``` ```
@@ -74,23 +83,23 @@ Like Beate Uhse breaking barriers in post-war Germany, we believe in the freedom
## 🔥 Quick Start — Get Intimate Fast ## 🔥 Quick Start — Get Intimate Fast
### 💕 Option 1: Using Docker (Recommended) ### 💕 Option 1: Using Docker Compose (Recommended)
```bash ```bash
# Pull the pleasure # Clone the repository
docker pull ghcr.io/valknarxxx/sexy:latest git clone https://dev.pivoine.art/valknar/sexy.pivoine.art.git
cd sexy.pivoine.art
# Run with passion # Configure your secrets
docker run -d -p 3000:3000 \ cp .env.example .env
-e PUBLIC_API_URL=https://api.your-domain.com \ # Edit .env with your intimate details
-e PUBLIC_URL=https://your-domain.com \
ghcr.io/valknarxxx/sexy:latest # Awaken all services (postgres, redis, backend, frontend)
docker compose up -d
# Visit your creation at http://localhost:3000 💋 # Visit your creation at http://localhost:3000 💋
``` ```
See [QUICKSTART.md](QUICKSTART.md) for the full seduction guide.
### 💜 Option 2: Local Development ### 💜 Option 2: Local Development
**Prerequisites:** **Prerequisites:**
@@ -98,22 +107,25 @@ See [QUICKSTART.md](QUICKSTART.md) for the full seduction guide.
1. Node.js 20.19.1 — *the foundation* 1. Node.js 20.19.1 — *the foundation*
2. `corepack enable`*unlock the tools* 2. `corepack enable`*unlock the tools*
3. `pnpm install`*gather your ingredients* 3. `pnpm install`*gather your ingredients*
4. Rust + `cargo install wasm-bindgen-cli`*forge the connection* 4. PostgreSQL 16 + Redis — *the data lovers*
**Start your pleasure journey:** **Start your pleasure journey:**
```bash ```bash
# Awaken all services # Awaken data services
pnpm dev pnpm dev:data
# Or tease them one by one # Start the backend (port 4000)
pnpm dev:data # The foundation pnpm dev:backend
pnpm dev:directus # The content
pnpm --filter @sexy.pivoine.art/frontend dev # The face # Start the frontend (port 3000, proxied to :4000)
pnpm --filter @sexy.pivoine.art/frontend dev
``` ```
Visit `http://localhost:3000` and let the experience begin... 💋 Visit `http://localhost:3000` and let the experience begin... 💋
GraphQL playground is available at `http://localhost:4000/graphql` — explore every query.
--- ---
## 🌹 Project Structure ## 🌹 Project Structure
@@ -123,98 +135,116 @@ This monorepo contains three packages, each serving its purpose:
``` ```
sexy.pivoine.art/ sexy.pivoine.art/
├─ 💄 packages/frontend/ → SvelteKit app (the seduction) ├─ 💄 packages/frontend/ → SvelteKit app (the seduction)
├─ 🎭 packages/bundle/ Directus extensions (the power) ├─ packages/backend/Fastify + GraphQL API (the engine)
└─ 🎮 packages/buttplug/ → Hardware control (the connection) └─ 🎮 packages/buttplug/ → Hardware control (the connection)
``` ```
--- ### 💄 Frontend (`packages/frontend/`)
## 📚 Documentation — Your Guide to Pleasure SvelteKit 2 application with server-side rendering, i18n, and a clean component library.
Communicates with the backend exclusively via GraphQL using `graphql-request`.
Assets served via `/api/assets/:id?transform=<preset>` — no CDN, no Directus, just raw power.
<div align="center"> ### ⚡ Backend (`packages/backend/`)
| Document | Purpose | Emoji | Purpose-built Fastify v5 + GraphQL Yoga server. All business logic lives here:
|----------|---------|-------| auth, file uploads, video processing, comments, gamification, and analytics.
| [QUICKSTART.md](QUICKSTART.md) | Get wet... I mean, get started! | 💦 | Files stored as `<UPLOAD_DIR>/<uuid>/<filename>` with on-demand WebP transforms cached on disk.
| [COMPOSE.md](COMPOSE.md) | Docker Compose setup guide | 🐳 |
| [DOCKER.md](DOCKER.md) | Standalone Docker deployment | 🐋 |
| [CLAUDE.md](CLAUDE.md) | Architecture & development | 🤖 |
| [.github/workflows/README.md](.github/workflows/README.md) | CI/CD workflows | ⚙️ |
</div> ### 🎮 Buttplug (`packages/buttplug/`)
Hybrid TypeScript/Rust package for intimate hardware control via WebBluetooth.
Compiled to WebAssembly for browser-based Bluetooth device communication.
--- ---
## 🎨 Building — Craft Your Masterpiece ## 🗃️ Database Schema
### Build All Packages Built with Drizzle ORM — clean tables, no `directus_` prefix, full control:
```bash
# Prepare everything
pnpm install
# Build the WASM foundation
pnpm --filter @sexy.pivoine.art/buttplug build:wasm
# Build the packages
pnpm --filter @sexy.pivoine.art/buttplug build
pnpm --filter @sexy.pivoine.art/frontend build
pnpm --filter @sexy.pivoine.art/bundle build
``` ```
users → profiles, roles (model/viewer/admin), auth tokens
### Build Docker Image files → uploaded assets with metadata and duration
videos → content with model junctions, likes, plays
```bash articles → magazine / editorial content
# Quick build recordings → user-created content with play tracking
./build.sh comments → threaded by collection + item_id
achievements → gamification goals
# Manual control user_points → points ledger
docker build -t sexy.pivoine.art:latest . user_stats → cached leaderboard data
# Multi-platform pleasure
docker buildx build --platform linux/amd64,linux/arm64 -t sexy.pivoine.art:latest .
``` ```
--- ---
## 🚀 Deployment — Share Your Creation ## 🔐 Authentication Flow
```
POST /graphql (login mutation)
→ verify argon2 password hash
→ nanoid(32) session token
→ SET session:<token> <user JSON> EX 86400 in Redis
→ set httpOnly cookie: session_token
→ return CurrentUser
Every request:
→ read session_token cookie
→ GET session:<token> from Redis
→ inject currentUser into GraphQL context
```
---
## 🖼️ Image Transforms
Assets are transformed on first request and cached as WebP:
| Preset | Size | Fit | Use |
|--------|------|-----|-----|
| `mini` | 80×80 | cover | Avatars in lists |
| `thumbnail` | 300×300 | cover | Profile photos |
| `preview` | 800px wide | inside | Video teasers |
| `medium` | 1400px wide | inside | Full-size images |
| `banner` | 1600×480 | cover | Profile banners |
---
## 🚀 Deployment
### Production with Docker Compose ### Production with Docker Compose
```bash ```bash
# Configure your secrets # Configure your secrets
cp .env.production.example .env.production cp .env.example .env.production
# Edit .env.production with your intimate details # Edit .env.production — set DB credentials, SMTP, cookie secret, CORS origin
# Deploy with grace (uses Traefik for routing) # Deploy
docker-compose -f compose.production.yml --env-file .env.production up -d docker compose --env-file .env.production up -d
``` ```
### Production without Docker Key environment variables for the backend:
```bash ```env
# Build everything DATABASE_URL=postgresql://sexy:sexy@postgres:5432/sexy
pnpm build:frontend REDIS_URL=redis://redis:6379
COOKIE_SECRET=your-very-secret-key
# Start serving CORS_ORIGIN=https://sexy.pivoine.art
pnpm --filter @sexy.pivoine.art/frontend start UPLOAD_DIR=/data/uploads
SMTP_HOST=your.smtp.host
SMTP_PORT=587
EMAIL_FROM=noreply@sexy.pivoine.art
PUBLIC_URL=https://sexy.pivoine.art
``` ```
--- ### 🎬 CI/CD — Self-Hosted Seduction
## 🌈 Environment Variables Automated builds run on **[dev.pivoine.art](https://dev.pivoine.art/valknar/sexy.pivoine.art)** via Gitea Actions:
### 💖 Required (The Essentials) - ✅ Frontend image → `dev.pivoine.art/valknar/sexy:latest`
- ✅ Backend image → `dev.pivoine.art/valknar/sexy-backend:latest`
- ✅ Triggers on push to `main`, `develop`, or version tags (`v*.*.*`)
- ✅ Build cache via registry for fast successive builds
- `PUBLIC_API_URL` — Your Directus backend Images are pulled on the production server via Watchtower or manual `docker compose pull && docker compose up -d`.
- `PUBLIC_URL` — Your frontend domain
### 💜 Optional (The Extras)
- `PUBLIC_UMAMI_ID` — Analytics tracking ID
- `PUBLIC_UMAMI_SCRIPT` — Umami script URL
See [.env.production.example](.env.production.example) for the full configuration.
--- ---
@@ -225,60 +255,54 @@ graph LR
A[💡 Idea] --> B[💻 Code] A[💡 Idea] --> B[💻 Code]
B --> C[🧪 Test Locally] B --> C[🧪 Test Locally]
C --> D[🌿 Feature Branch] C --> D[🌿 Feature Branch]
D --> E[📤 Push & PR] D --> E[📤 Push to dev.pivoine.art]
E --> F{✅ CI Pass?} E --> F{✅ Build Pass?}
F -->|Yes| G[🔀 Merge to Main] F -->|Yes| G[🔀 Merge to Main]
F -->|No| B F -->|No| B
G --> H[🚀 Auto Deploy] G --> H[🚀 Images Built & Pushed]
H --> I[🏷️ Tag Release] H --> I[🎉 Deploy to Production]
I --> J[🎉 Celebrate]
``` ```
1. Create → `git checkout -b feature/my-sexy-feature` 1. Create → `git checkout -b feature/my-sexy-feature`
2. Develop → Write beautiful code 2. Develop → Write beautiful code
3. Test → `pnpm dev` 3. Test → `pnpm dev:data && pnpm dev:backend && pnpm dev`
4. Push → Create PR (triggers CI build) 4. Push → `git push` to `dev.pivoine.art` (triggers CI build)
5. Merge → Automatic deployment to production 5. Merge → Images published, deploy to production
6. Release → `git tag v1.0.0 && git push origin v1.0.0` 6. Release → `git tag v1.0.0 && git push origin v1.0.0`
--- ---
## 🔐 Security — Protected Pleasure ## 🌈 Environment Variables
- 🛡️ Daily vulnerability scans with Trivy ### Backend (required)
- 🔒 Non-root Docker containers
- 📊 Security reports in GitHub Security tab
- 🤐 Confidential issue reporting available
*Report security concerns privately via GitHub Security.* | Variable | Description |
|----------|-------------|
| `DATABASE_URL` | PostgreSQL connection string |
| `REDIS_URL` | Redis connection string |
| `COOKIE_SECRET` | Session cookie signing secret |
| `CORS_ORIGIN` | Allowed frontend origin |
| `UPLOAD_DIR` | Path for uploaded files |
--- ### Backend (optional)
## 💝 Contributing — Join the Movement | Variable | Default | Description |
|----------|---------|-------------|
| `PORT` | `4000` | Backend listen port |
| `LOG_LEVEL` | `info` | Fastify log level |
| `SMTP_HOST` | — | Email server for auth flows |
| `SMTP_PORT` | `587` | Email server port |
| `EMAIL_FROM` | — | Sender address |
| `PUBLIC_URL` | — | Frontend URL (for email links) |
Like Beate Uhse fought for sexual liberation, we welcome contributors who believe in freedom, pleasure, and quality code. ### Frontend
1. **Fork** this repository | Variable | Description |
2. **Create** your feature branch |----------|-------------|
3. **Commit** your changes | `PUBLIC_API_URL` | Backend URL (e.g. `http://sexy_backend:4000`) |
4. **Push** to your branch | `PUBLIC_URL` | Frontend public URL |
5. **Submit** a pull request | `PUBLIC_UMAMI_ID` | Umami analytics site ID (optional) |
| `PUBLIC_UMAMI_SCRIPT` | Umami script URL (optional) |
All contributors are bound by our code of conduct: **Respect, Consent, and Quality.**
---
## 🎯 CI/CD Pipeline — Automated Seduction
Our GitHub Actions workflows handle:
- ✅ Multi-platform Docker builds (AMD64 + ARM64)
- ✅ Automated publishing to GHCR
- ✅ Daily security vulnerability scans
- ✅ Weekly cleanup of old images
- ✅ Semantic versioning from git tags
**Images available at:** `ghcr.io/valknarxxx/sexy`
--- ---
@@ -288,7 +312,7 @@ Our GitHub Actions workflows handle:
### 🌸 Created with Love by 🌸 ### 🌸 Created with Love by 🌸
**[Palina](http://sexy.pivoine.art) & [Valknar](http://sexy.pivoine.art)** **[Palina](https://sexy.pivoine.art) & [Valknar](https://sexy.pivoine.art)**
*Für die Mäuse...* 🐭💕 *Für die Mäuse...* 🐭💕
@@ -298,10 +322,15 @@ Our GitHub Actions workflows handle:
| Technology | Purpose | | Technology | Purpose |
|------------|---------| |------------|---------|
| [SvelteKit](https://kit.svelte.dev/) | Framework | | [SvelteKit](https://kit.svelte.dev/) | Frontend framework |
| [Directus](https://directus.io/) | CMS | | [Fastify](https://fastify.dev/) | HTTP server |
| [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server) | GraphQL server |
| [Pothos](https://pothos-graphql.dev/) | Code-first schema |
| [Drizzle ORM](https://orm.drizzle.team/) | Database |
| [Sharp](https://sharp.pixelplumbing.com/) | Image transforms |
| [Buttplug.io](https://buttplug.io/) | Hardware | | [Buttplug.io](https://buttplug.io/) | Hardware |
| [bits-ui](https://www.bits-ui.com/) | Components | | [bits-ui](https://www.bits-ui.com/) | UI components |
| [Gitea](https://dev.pivoine.art) | Self-hosted VCS & CI |
--- ---
@@ -331,9 +360,9 @@ Pilot, Entrepreneur, Freedom Fighter
<div align="center"> <div align="center">
[![Issues](https://img.shields.io/badge/🐛_Issues-Report_Here-FF69B4?style=for-the-badge&labelColor=8B008B)](https://github.com/valknarxxx/sexy.pivoine.art/issues) [![Repository](https://img.shields.io/badge/🐙_Repository-dev.pivoine.art-FF69B4?style=for-the-badge&labelColor=8B008B)](https://dev.pivoine.art/valknar/sexy.pivoine.art)
[![Discussions](https://img.shields.io/badge/💭_Discussions-Join_Here-DA70D6?style=for-the-badge&labelColor=8B008B)](https://github.com/valknarxxx/sexy.pivoine.art/discussions) [![Issues](https://img.shields.io/badge/🐛_Issues-Report_Here-DA70D6?style=for-the-badge&labelColor=8B008B)](https://dev.pivoine.art/valknar/sexy.pivoine.art/issues)
[![Website](https://img.shields.io/badge/🌐_Website-Visit_Here-FF1493?style=for-the-badge&labelColor=8B008B)](http://sexy.pivoine.art) [![Website](https://img.shields.io/badge/🌐_Website-Visit_Here-FF1493?style=for-the-badge&labelColor=8B008B)](https://sexy.pivoine.art)
</div> </div>
@@ -354,6 +383,6 @@ Pilot, Entrepreneur, Freedom Fighter
*Pleasure is a human right. Technology is freedom. Together, they are power.* *Pleasure is a human right. Technology is freedom. Together, they are power.*
**[sexy.pivoine.art](http://sexy.pivoine.art)** | © 2025 Palina & Valknar **[sexy.pivoine.art](https://sexy.pivoine.art)** | © 2025 Palina & Valknar
</div> </div>