Skip to content

Commit 55dc3d7

Browse files
bernatfpclaude
andcommitted
feat: initial Brasa documentation site
- Next.js 14 + Nextra 3 (Docs Theme) with static export - Custom MDX components (Callout, Tabs, Steps, Badge, ContractAddress) - Brasa brand colors and styling (#FC502C) - TypeScript strict mode with full type safety - ESLint, Prettier, Husky pre-commit hooks - Commitlint for conventional commits - GitHub Actions CI (lint, typecheck, build, link check) - Sample documentation pages demonstrating all components - SEO configured (robots.txt, sitemap, meta tags) - Self-hosted fonts setup (fonts need to be added) - Client-side search via FlexSearch (no paid services) - Full sidebar navigation with collapsible sections - Dark/light mode support - Comprehensive README, CONTRIBUTING, and PR template 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
0 parents  commit 55dc3d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+10241
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{js,jsx,ts,tsx,json,css,scss,md,mdx}]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Site Configuration
2+
NEXT_PUBLIC_SITE_URL=https://docs.brasa.finance
3+
4+
# No other environment variables needed for basic setup
5+
# All functionality is static and client-side

.eslintrc.cjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
node: true,
7+
},
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:react/recommended',
12+
'plugin:react/jsx-runtime',
13+
'plugin:jsx-a11y/recommended',
14+
'next/core-web-vitals',
15+
'prettier',
16+
],
17+
parser: '@typescript-eslint/parser',
18+
parserOptions: {
19+
ecmaVersion: 'latest',
20+
sourceType: 'module',
21+
ecmaFeatures: {
22+
jsx: true,
23+
},
24+
},
25+
plugins: ['@typescript-eslint', 'react', 'jsx-a11y'],
26+
rules: {
27+
// TypeScript
28+
'@typescript-eslint/no-unused-vars': [
29+
'error',
30+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
31+
],
32+
'@typescript-eslint/no-explicit-any': 'warn',
33+
'@typescript-eslint/explicit-module-boundary-types': 'off',
34+
35+
// React
36+
'react/prop-types': 'off',
37+
'react/react-in-jsx-scope': 'off',
38+
39+
// General
40+
'no-console': ['warn', { allow: ['warn', 'error'] }],
41+
'prefer-const': 'error',
42+
'no-var': 'error',
43+
},
44+
settings: {
45+
react: {
46+
version: 'detect',
47+
},
48+
},
49+
}

.github/CODEOWNERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Code owners for Brasa Docs
2+
# These owners will be automatically requested for review when PRs are opened
3+
4+
# Default owners for everything in the repo
5+
* @brasa-finance/docs-team
6+
7+
# Documentation content
8+
/pages/** @brasa-finance/docs-team
9+
10+
# Components and theme
11+
/components/** @brasa-finance/engineering
12+
/theme.config.tsx @brasa-finance/engineering
13+
14+
# CI/CD and tooling
15+
/.github/** @brasa-finance/engineering
16+
/.husky/** @brasa-finance/engineering

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Description
2+
3+
<!-- Provide a brief description of the changes in this PR -->
4+
5+
## Type of Change
6+
7+
<!-- Check the relevant option(s) -->
8+
9+
- [ ] Documentation update
10+
- [ ] Bug fix
11+
- [ ] New feature
12+
- [ ] Breaking change
13+
- [ ] Other (please describe):
14+
15+
## Changes Made
16+
17+
<!-- List the specific changes made -->
18+
19+
-
20+
-
21+
-
22+
23+
## Related Issues
24+
25+
<!-- Link to related issues using #issue_number -->
26+
27+
Fixes #
28+
Relates to #
29+
30+
## Screenshots
31+
32+
<!-- If applicable, add screenshots to help explain your changes -->
33+
34+
## Checklist
35+
36+
<!-- Check all that apply -->
37+
38+
- [ ] I have tested my changes locally
39+
- [ ] I have run `pnpm lint` and fixed any issues
40+
- [ ] I have run `pnpm typecheck` and fixed any issues
41+
- [ ] I have run `pnpm build` successfully
42+
- [ ] I have followed the style guide in CONTRIBUTING.md
43+
- [ ] I have updated relevant documentation
44+
- [ ] My commit messages follow the Conventional Commits format
45+
- [ ] All links work correctly
46+
- [ ] All code examples are tested and work
47+
- [ ] Images are optimized (if applicable)
48+
49+
## Additional Notes
50+
51+
<!-- Add any other context about the PR here -->

.github/workflows/ci.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
lint-and-typecheck:
11+
name: Lint & Typecheck
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 8
26+
27+
- name: Get pnpm store directory
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
32+
- name: Setup pnpm cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ env.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
40+
- name: Install dependencies
41+
run: pnpm install --frozen-lockfile
42+
43+
- name: Run ESLint
44+
run: pnpm lint
45+
46+
- name: Run TypeScript typecheck
47+
run: pnpm typecheck
48+
49+
- name: Check formatting
50+
run: pnpm format:check
51+
52+
build:
53+
name: Build
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v4
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 20
63+
64+
- name: Setup pnpm
65+
uses: pnpm/action-setup@v4
66+
with:
67+
version: 8
68+
69+
- name: Get pnpm store directory
70+
shell: bash
71+
run: |
72+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
73+
74+
- name: Setup pnpm cache
75+
uses: actions/cache@v4
76+
with:
77+
path: ${{ env.STORE_PATH }}
78+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
79+
restore-keys: |
80+
${{ runner.os }}-pnpm-store-
81+
82+
- name: Install dependencies
83+
run: pnpm install --frozen-lockfile
84+
85+
- name: Build site
86+
run: pnpm build
87+
env:
88+
NEXT_PUBLIC_SITE_URL: https://docs.brasa.finance
89+
90+
- name: Upload build artifacts
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: build-output
94+
path: out
95+
retention-days: 7
96+
97+
link-check:
98+
name: Check Links
99+
runs-on: ubuntu-latest
100+
needs: build
101+
steps:
102+
- name: Checkout
103+
uses: actions/checkout@v4
104+
105+
- name: Download build artifacts
106+
uses: actions/download-artifact@v4
107+
with:
108+
name: build-output
109+
path: out
110+
111+
- name: Link Checker
112+
uses: lycheeverse/lychee-action@v2
113+
with:
114+
args: --verbose --no-progress './out/**/*.html' --base './out' --accept 200,201,202,203,204,206,207,208,226 --exclude-mail
115+
fail: true
116+
env:
117+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
5+
6+
# Testing
7+
/coverage
8+
9+
# Next.js
10+
/.next/
11+
/out/
12+
13+
# Production
14+
/build
15+
16+
# Misc
17+
.DS_Store
18+
*.pem
19+
20+
# Debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
pnpm-debug.log*
25+
26+
# Local env files
27+
.env*.local
28+
.env
29+
30+
# Vercel
31+
.vercel
32+
33+
# TypeScript
34+
*.tsbuildinfo
35+
next-env.d.ts
36+
37+
# IDE
38+
.vscode/
39+
.idea/
40+
*.swp
41+
*.swo
42+
*~
43+
44+
# OS
45+
Thumbs.db

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm commitlint --edit "$1"

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.lintstagedrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
'*.{ts,tsx,js,jsx}': ['eslint --fix', 'prettier --write'],
3+
'*.{json,md,mdx,css,yaml,yml}': ['prettier --write'],
4+
}

0 commit comments

Comments
 (0)