Initial commit: eldov.win portfolio with admin backend
Privates Portfolio von eldov (Jan Wagner). Next.js 16 / React 19 / Tailwind 4 /
SQLite. Eigenes Dark-/Terminal-Theme (Magenta+Grün-Akzente, ASCII-Boxen).
Public Routes (DE default, /en für Englisch):
- /, /ueber-mich, /projekte, /projekte/[slug], /kontakt, /impressum, /datenschutz
- Sitemap, robots, OG, JSON-LD
Admin (HMAC-Single-User, HttpOnly-Cookie):
- /admin/login, /admin/dashboard, /admin/profile, /admin/projects (CRUD)
- API: /api/admin/{login,logout,session,profile,projects,projects/[slug]}
Initial-Seed: Hermes, Casino-Bot, Polymarket-Trader, QuantMuse, Crypto-/Trade-Bot,
TS6-Bot, Freewarez-Landingpage, Minecraft-Portal, OSS-Themes, AI-Subscription-Manager,
LAMP-Link-Themes, Android. KEIN Batchmaker/W-Make (das gehört zu w-make.com).
Stack:
- better-sqlite3 mit Schema-Migration + idempotentem Seed
- HMAC-signiertes Session-Cookie mit timingSafeEqual
- Rate-Limit für /api/admin/login
- Docker + deploy-vps.sh analog w-make-com → free-warez.top
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
# eldov.win
|
||||
|
||||
Privates Portfolio für „eldov" — Self-Hosting, Bots, AI-Fleet, Hacks. Domain `eldov.win`.
|
||||
|
||||
Das ist das Gegenstück zu [`w-make.com`](../w-make-com/README.md). Dort steht die industrielle Arbeit (Behälterglas, W-Make Batch, Batchmaker Studio). Hier stehen die Dinge, die mich abseits von Auftragsarbeit umtreiben: Hermes, Casino-/Trading-Bots, Freewarez-Selfhosting, Themes für Open-Source-Software.
|
||||
|
||||
## Stack
|
||||
|
||||
Next.js 16 (App Router) · React 19 · Tailwind 4 · TypeScript · SQLite (`better-sqlite3`). SSR mit dynamischem Content aus DB.
|
||||
|
||||
## Lokal
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev # http://localhost:3000 (lädt .env.local automatisch)
|
||||
npm run build
|
||||
npm test # i18n + auth
|
||||
npm run test:db # DB-Smoke (Schema, Seed, CRUD)
|
||||
```
|
||||
|
||||
`.env.local` (nicht committen, von .env.local.example kopieren):
|
||||
|
||||
```
|
||||
ADMIN_PASSWORD=<starkes-passwort>
|
||||
SESSION_SECRET=<mindestens-32-byte-hex>
|
||||
DB_PATH=./data/eldov.db
|
||||
NEXT_PUBLIC_SITE_URL=http://localhost:3000
|
||||
```
|
||||
|
||||
> Wichtig für Production: `next start` lädt `.env.local` **nicht** automatisch.
|
||||
> env vars müssen vor dem Start gesetzt sein — typischerweise via Docker
|
||||
> `env_file` (siehe `docker-compose.yml`) oder systemd `Environment=`.
|
||||
> Für lokale Production-Smoke-Tests:
|
||||
>
|
||||
> ```bash
|
||||
> ADMIN_PASSWORD=... SESSION_SECRET=... npm run start
|
||||
> ```
|
||||
|
||||
## Routen
|
||||
|
||||
| Pfad | Zweck |
|
||||
|---|---|
|
||||
| `/` (DE) · `/en` | Startseite |
|
||||
| `/ueber-mich` · `/en/about` | Bio, Skills, Setup |
|
||||
| `/projekte` · `/en/projects` | Projektübersicht |
|
||||
| `/projekte/[slug]` · `/en/projects/[slug]` | Projekt-Detail |
|
||||
| `/kontakt` · `/en/contact` | Linksammlung statt Kontaktformular |
|
||||
| `/impressum` · `/en/legal` | Impressum |
|
||||
| `/datenschutz` · `/en/privacy` | Datenschutz |
|
||||
| `/admin/login` | Login |
|
||||
| `/admin/dashboard` | Übersicht |
|
||||
| `/admin/profile` | Bio/Person editieren |
|
||||
| `/admin/projects` · `/admin/projects/new` · `/admin/projects/[slug]` | Projekte-CRUD |
|
||||
|
||||
API (alle außer `/api/admin/login` erfordern Auth-Cookie):
|
||||
|
||||
| Methode · Pfad | Effekt |
|
||||
|---|---|
|
||||
| `POST /api/admin/login` | Body `{password}` → setzt Session-Cookie |
|
||||
| `POST /api/admin/logout` | löscht Cookie |
|
||||
| `GET /api/admin/session` | `{authenticated: boolean}` |
|
||||
| `GET /api/admin/profile` | aktuelles Profil |
|
||||
| `PUT /api/admin/profile` | Profil aktualisieren |
|
||||
| `GET /api/admin/projects` | Liste |
|
||||
| `POST /api/admin/projects` | neues Projekt |
|
||||
| `GET /api/admin/projects/[slug]` | Detail |
|
||||
| `PUT /api/admin/projects/[slug]` | aktualisieren |
|
||||
| `DELETE /api/admin/projects/[slug]` | löschen |
|
||||
|
||||
## Datenmodell
|
||||
|
||||
SQLite, Schema in `src/lib/schema.sql`. Zwei Haupttabellen:
|
||||
|
||||
- `profile` (singletone, id=1): `handle`, `real_name`, `role`, `location`, `bio_de`, `bio_en`, `links_json`, `updated_at`
|
||||
- `projects` (`slug` PK): `slug`, `number`, `status`, `category`, `stack`, `href`, `featured` (0/1), `summary_de`, `summary_en`, `body_de`, `body_en`, `created_at`, `updated_at`
|
||||
|
||||
Beim ersten Request ohne DB wird automatisch migriert und mit dem Seed aus `src/lib/seed.ts` gefüllt (handle, bio, initiale Projekte aus dem Workspace).
|
||||
|
||||
## Deployment
|
||||
|
||||
`./deploy-vps.sh` synct nach `free-warez.top:/opt/containers/eldov-portfolio`. Build und Restart des Containers passieren dort. 9router-Eintrag `eldov.win` → Container-Internes `3000`.
|
||||
|
||||
## DSGVO-Hinweis
|
||||
|
||||
Das Admin-Backend speichert keine personenbezogenen Daten außer dem Profil des Betreibers. Login-Cookie ist HMAC-signiert, HttpOnly, SameSite=Lax, 7 Tage gültig. Es findet kein Tracking, keine externen Skripte, keine Schriftarten von Drittanbietern statt.
|
||||
Reference in New Issue
Block a user