Single-container app with Postgres catalog, Typesense search, Authelia Remote-User admin, portfolio views, resume/PDF, media uploads, and ArtStation import tooling.
88 lines
2.4 KiB
Markdown
88 lines
2.4 KiB
Markdown
# jmartgraphix.com — Portfolio CMS
|
|
|
|
Single-container portfolio website: **Fastify API** + **Vite/React SPA**, backed by **PostgreSQL** and **Typesense 30.2**. Admin is protected by **Authelia** (`Remote-User` / `Remote-Groups` headers).
|
|
|
|
## Architecture
|
|
|
|
```
|
|
Traefik (TLS) → jmartgraphix-com:3000
|
|
├── static SPA (public + /admin)
|
|
├── /api/v1/* (OpenAPI at /api/docs)
|
|
├── /uploads/*
|
|
└── /.well-known/* (matrix, webfinger)
|
|
|
|
Sidecars: Typesense
|
|
Shared: Postgres (catalog), optional imgproxy
|
|
```
|
|
|
|
| Path | Auth |
|
|
|------|------|
|
|
| `/`, `/portfolio/*`, `/resume`, `/api/v1/*` (public) | None |
|
|
| `/admin`, `/api/v1/admin/*` | Authelia forwardAuth → `Remote-User` |
|
|
|
|
## Source of truth
|
|
|
|
- Gitea: `https://git.jmartgraphix.com/jmartin/jmartgraphix.com.git`
|
|
- Local clone: `/docker/jmartgraphix/hub/`
|
|
- Host workspace `/docker/jmartgraphix` is **not** the git root (uploads, typesense data, prompt live there)
|
|
|
|
## Deploy loop
|
|
|
|
```bash
|
|
cd /docker/jmartgraphix/hub
|
|
git add -A && git commit -m "…" && git push origin master
|
|
|
|
cd /docker/komodo/periphery/stacks/jmartgraphix-com
|
|
docker compose up -d --build
|
|
```
|
|
|
|
Verify:
|
|
|
|
```bash
|
|
curl -s https://jmartgraphix.com/api/v1/health
|
|
docker logs jmartgraphix-com --tail 80
|
|
```
|
|
|
|
Look for: Database migrations applied, Typesense index, Server listening.
|
|
|
|
## Environment
|
|
|
|
See `.env.example`. Stack secrets live in
|
|
`/docker/komodo/periphery/stacks/jmartgraphix-com/.env`.
|
|
|
|
## ArtStation import
|
|
|
|
```bash
|
|
docker exec -it jmartgraphix-com \
|
|
npx tsx scripts/import-artstation.ts --user jmartgraphix
|
|
|
|
# dry run
|
|
docker exec -it jmartgraphix-com \
|
|
npx tsx scripts/import-artstation.ts --user jmartgraphix --dry-run
|
|
|
|
# single artwork
|
|
docker exec -it jmartgraphix-com \
|
|
npx tsx scripts/import-artstation.ts --url https://www.artstation.com/artwork/XXXX
|
|
```
|
|
|
|
Imported projects are **drafts** — review and publish in `/admin`.
|
|
|
|
## Local development
|
|
|
|
```bash
|
|
cd /docker/jmartgraphix/hub
|
|
cp .env.example .env # set DATABASE_URL, REQUIRE_REMOTE_USER=false
|
|
npm install
|
|
npm run db:migrate -w server
|
|
npm run dev
|
|
```
|
|
|
|
## Features
|
|
|
|
- Multi-category projects with media gallery, YouTube/Vimeo/self-hosted video
|
|
- Portfolio views (`/portfolio/game-dev`, `/portfolio/engineering`, …)
|
|
- Typesense search, filters, featured, sort by priority/date/title
|
|
- Editable resume + PDF download
|
|
- OpenAPI docs at `/api/docs`
|
|
- Sitemap `/sitemap.xml`, RSS `/rss.xml`
|