chore(degenfeed-web): apply fleet-template standards (AGENTS, CONTRIBUTING, gitignore, editorconfig, gitattributes, pre-commit)
Some checks are pending
DegenFeed CI/CD / test (push) Waiting to run
DegenFeed CI/CD / deploy-worker (push) Blocked by required conditions
DegenFeed CI/CD / deploy-web (push) Blocked by required conditions

This commit is contained in:
Crypto Rug Munch 2026-07-06 14:18:23 +02:00
parent 7b868d9bae
commit 3ff23f0588
6 changed files with 364 additions and 6 deletions

29
.editorconfig Normal file
View file

@ -0,0 +1,29 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
[*.{py,pyi}]
indent_size = 4
max_line_length = 100
[*.{yml,yaml}]
indent_size = 2
[*.{json,jsonc}]
indent_size = 2
[{*.bat,*.cmd,*.ps1}]
end_of_line = crlf

79
.gitattributes vendored Normal file
View file

@ -0,0 +1,79 @@
# .gitattributes — Rug Munch Media fleet standard
# See https://git.rugmunch.io/RugMunchMedia/standards for source of truth.
# ── Line endings ───────────────────────────────────────────────
* text=auto eol=lf
# Shell scripts must use LF even on Windows checkouts
*.sh text eol=lf
*.bash text eol=lf
# Windows-native scripts keep CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# ── Binary defaults ────────────────────────────────────────────
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.pdf binary
*.zip binary
*.gz binary
*.tgz binary
*.tar binary
*.bz2 binary
*.xz binary
*.7z binary
*.rar binary
*.mp4 binary
*.mp3 binary
*.wav binary
*.mov binary
*.avi binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.otf binary
*.so binary
*.dll binary
*.dylib binary
*.pyc binary
*.pyo binary
*.pyd binary
*.o binary
*.a binary
*.lib binary
# ── Linguist overrides ─────────────────────────────────────────
# Mark vendor / vendored / generated so they don't pollute stats
vendor/ linguist-vendored
node_modules/ linguist-vendored
__pycache__/ linguist-vendored
*.min.js linguist-vendored
*.min.css linguist-vendored
dist/ linguist-vendored
build/ linguist-vendored
coverage/ linguist-vendored
pnpm-lock.yaml linguist-generated
package-lock.json linguist-generated
yarn.lock linguist-generated
# Markdown documentation
*.md linguist-documentation
docs/ linguist-documentation
# Makefile
Makefile linguist-language=Makefile
*.mk linguist-language=Makefile
# ── Diff & merge ───────────────────────────────────────────────
*.json diff=json
*.lock -diff
package-lock.json -diff
pnpm-lock.yaml -diff
yarn.lock -diff

53
.gitignore vendored
View file

@ -1,12 +1,53 @@
# TypeScript / Node .gitignore — Rug Munch Media fleet standard
# See https://git.rugmunch.io/RugMunchMedia/standards for source of truth.
# ── Secrets (zero tolerance) ───────────────────────────────────
.env
.env.*
!.env.example
!.env.template
*.pem
*.key
*.p12
*.pfx
*.session
credentials.json
service-account.json
.secrets/
# ── Node ───────────────────────────────────────────────────────
node_modules/
.npm/
.pnpm-store/
yarn-error.log
yarn-debug.log
# ── Build artifacts ────────────────────────────────────────────
dist/
build/
.next/
.turbo/
dist/
out/
*.tsbuildinfo
# ── Coverage ───────────────────────────────────────────────────
coverage/
.env
.env.local
*.log
*.lcov
# ── IDE ────────────────────────────────────────────────────────
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
# Build artifacts
*.tsbuildinfo
# ── Logs ───────────────────────────────────────────────────────
*.log
logs/
pnpm-debug.log*
# ── Cache / temp ───────────────────────────────────────────────
.cache/
tmp/
*.tmp

37
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,37 @@
# Pre-commit — Rug Munch Media TypeScript fleet standard
# See https://git.rugmunch.io/RugMunchMedia/standards for source of truth.
# Install: pre-commit install
# Run all: pre-commit run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-merge-conflict
- id: mixed-line-ending
args: ["--fix=lf"]
- id: no-commit-to-branch
args: ["--branch", "main"]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.0
hooks:
- id: gitleaks
args: ["detect", "--source", ".", "--verbose"]
- repo: local
hooks:
- id: biome-check
name: Biome lint + format check
entry: bash -c 'npx @biomejs/biome check . --no-errors-on-unmatched || true'
language: system
types_or: [javascript, jsx, ts, tsx, json, jsonc]
pass_filenames: false
stages: [pre-push]

75
AGENTS.md Normal file
View file

@ -0,0 +1,75 @@
[//]: # (SPDX-License-Identifier: MIT)
[//]: # (Copyright (c) 2026 Rug Munch Media LLC)
# AGENTS.md — DegenFeed Web
> AI agent contract. Read this before touching anything in this repo.
## Status
canonical · owner=crmuncher · last_updated=2026-07-06
## What This Repo Is
Next.js multi-protocol social aggregator client. Aggregates Nostr, Farcaster, Lens, and Bluesky into a single feed and composer.
> **This repo is NOT the deployed DegenFeed Mastodon instance** — that runs at `/srv/degenfeed/` as the `gotosocial` container behind `social.degenfeed.xyz`. This repo is the web client only.
## Type
`frontend` · language=TypeScript 5 + Next.js 14 (App Router) + React 19
## Where It Lives
- Source: `https://git.rugmunch.io/RugMunchMedia/degenfeed-web`
- Deployed: static build → nginx (target TBD)
- Monorepo: Turborepo + pnpm workspaces
## Built With
- Standards: [git.rugmunch.io/RugMunchMedia/standards](https://git.rugmunch.io/RugMunchMedia/standards)
- Toolchain: [TOOLCHAIN.md](https://git.rugmunch.io/RugMunchMedia/standards/raw/branch/main/TOOLCHAIN.md)
- Conventions: [CONVENTIONS.md](https://git.rugmunch.io/RugMunchMedia/standards/raw/branch/main/CONVENTIONS.md)
## Components
- `apps/landing/` — static landing page (live at `degenfeed.xyz`)
- `apps/web/` — Next.js client (scaffolding, not yet deployed)
- `workers/` — edge workers (e.g. news aggregation)
- `packages/` — shared protocol adapters (Nostr, Farcaster, Lens, Bluesky)
- `infra/` — infra as code
## Dependencies
- Node ≥ 20
- pnpm 11
- Turborepo 2
- Biome (format + lint)
- TypeScript 5.5+
## 🚨 CRITICAL RULES
1. **No nested repos.** Don't commit other complete project trees inside this one.
2. **No secrets.** Never commit `.secrets/`, `.env`, `*.pem`, `*.key`, `*.crt`. Use gopass.
3. **No data blobs.** Don't commit `*.zip`, `*.parquet`, model weights, sqlite files.
4. **No duplicate scaffolds.** If a `frontend/` or `backend/` subdir exists at root, it's either THE app or bloat.
5. **No mainnet RPC keys in source.** Use gopass and environment.
6. **Update STATUS.md before committing.** Builders must know where we are.
7. **Read DECISIONS.md before architectural changes.** Don't repeat rejected designs.
## Commands
```bash
pnpm install # install deps
pnpm dev # dev server (turbo)
pnpm build # production build
pnpm lint # biome check
pnpm typecheck # tsc --noEmit
pnpm test # run tests
pnpm format # biome format --write
```
## Architecture
See [ARCHITECTURE.md](ARCHITECTURE.md). Update it when components change.
## Status
See [PRODUCT.md](PRODUCT.md) and [ROADMAP.md](ROADMAP.md) for current state.
## Owners
- Primary: crmuncher
- Backup: TBD
## Related Repos
- `degenfeed/` — deployed GotoSocial instance (separate git repo, lives on Talos)
- See [standards/PRODUCTS.md](https://git.rugmunch.io/RugMunchMedia/standards/raw/branch/main/PRODUCTS.md).

97
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,97 @@
<!--
SPDX-License-Identifier: MIT
Copyright (c) 2026 Rug Munch Media LLC
Part of DegenFeed Web — https://git.rugmunch.io/RugMunchMedia/degenfeed-web
-->
# Contributing to DegenFeed Web
> Next.js multi-protocol social aggregator client. TypeScript + Next.js 14 + React 19.
## TL;DR
```bash
git checkout main && git pull --rebase origin main
git checkout -b feat/my-change
# …make changes…
pnpm install
pnpm lint typecheck test # pre-push gate
git add -A
git commit -m "feat(web): my change"
git push origin feat/my-change
# Open a PR on Forgejo (git.rugmunch.io/RugMunchMedia/degenfeed-web)
```
## Repository Model
Single-tenant branch-PR pattern. `feat/*` branches merged to `main` after CI passes.
### Branches
| Branch | Purpose |
|--------------------|--------------------------------------------------|
| `main` | Production-ready. Protected. Forgejo-mirrored. |
| `feat/<scope>` | New feature or capability. |
| `fix/<scope>` | Bug fix. |
| `chore/<scope>` | Tooling, deps, formatting, non-functional. |
| `refactor/<scope>` | Code restructure, no behavior change. |
| `docs/<scope>` | Documentation only. |
### Commit Convention
We use **Conventional Commits**.
```bash
feat(web): add composer modal
fix(adapter-nostr): handle malformed event
docs: update ARCHITECTURE.md
chore(deps): bump wagmi to 3.7
```
Allowed types: `feat`, `fix`, `docs`, `refactor`, `style`, `test`, `chore`,
`ops`, `security`, `ci`, `build`, `perf`, `revert`.
## Remotes
| Remote | URL | Role |
|-------------|------------------------------------------------------------------|-------------------------------|
| `origin` | `ssh://git@git.rugmunch.io:2222/RugMunchMedia/degenfeed-web.git` | Canonical — Forgejo. |
| `external-*`| codeberg / github / gitlab (read-only mirrors) | Optional community mirrors. |
## Pre-Push Checklist
Before pushing any branch:
```bash
pnpm lint # biome check
pnpm typecheck # tsc --noEmit
pnpm test # turbo run test
pnpm build # production build sanity
```
CI is defined in `.forgejo/workflows/ci.yml`.
## Code Style
- TypeScript 5.5+ with `strict: true`
- Biome for format + lint (no ESLint, no Prettier)
- Functional components, hooks, no class components
- One component per file
- No file > 500 lines (see `STANDARDS.md`)
## License
By contributing, you agree your work is licensed under the MIT License.
See [LICENSE](LICENSE).
## Code of Conduct
Be precise, be kind. Cite `file:line` when reviewing. Prefer surgical commits.
## Further Reading
- `AGENTS.md` — repo contract, owners, commands
- `ARCHITECTURE.md` — module layout, data flow
- `PRODUCT.md` — what this repo is and isn't
- `../standards/CONVENTIONS.md` — fleet-wide conventions
- `../standards/TOOLCHAIN.md` — tool inventory