Skip to content

Firstset/brasa-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Brasa Docs

Official documentation for Brasa LST (Liquid Staking Token) protocol on Fogo.

πŸ”— Live Site: docs.brasa.finance

About

Brasa is a liquid staking protocol that allows users to stake tokens while maintaining liquidity. This repository contains the full documentation site built with Next.js and Nextra.

Tech Stack

  • Framework: Next.js 14
  • Documentation: Nextra (Docs Theme)
  • Styling: Tailwind CSS (via Nextra)
  • Language: TypeScript
  • Package Manager: pnpm
  • Deployment: Vercel
  • CI/CD: GitHub Actions

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm 8+

Installation

# Clone the repository
git clone https://github.com/brasa-finance/brasa-docs.git
cd brasa-docs

# Install dependencies
pnpm install

# Run development server
pnpm dev

Visit http://localhost:3000 to see the site.

Available Commands

pnpm dev          # Start development server
pnpm build        # Build for production
pnpm start        # Start production server
pnpm lint         # Run ESLint
pnpm typecheck    # Run TypeScript type checking
pnpm format       # Format code with Prettier
pnpm format:check # Check code formatting

Project Structure

brasa-docs/
β”œβ”€β”€ .github/          # GitHub Actions workflows
β”œβ”€β”€ .husky/           # Git hooks
β”œβ”€β”€ components/       # React components
β”‚   └── mdx/         # Custom MDX components
β”œβ”€β”€ pages/           # Documentation pages (MDX)
β”‚   β”œβ”€β”€ getting-started/
β”‚   β”œβ”€β”€ concepts/
β”‚   β”œβ”€β”€ integrate/
β”‚   β”œβ”€β”€ validators/
β”‚   β”œβ”€β”€ security/
β”‚   β”œβ”€β”€ changelog/
β”‚   └── legal/
β”œβ”€β”€ public/          # Static assets
β”‚   β”œβ”€β”€ fonts/      # Self-hosted fonts
β”‚   β”œβ”€β”€ og/         # Open Graph images
β”‚   └── ...
β”œβ”€β”€ styles/          # Global styles
β”œβ”€β”€ next.config.mjs  # Next.js configuration
β”œβ”€β”€ theme.config.tsx # Nextra theme configuration
└── tsconfig.json    # TypeScript configuration

Writing Documentation

Creating a New Page

  1. Create a new .mdx file in the appropriate directory under /pages
  2. Add front-matter with title and description
  3. Update the _meta.json file in the directory to add the page to navigation

Example:

---
title: My New Page
description: A brief description of this page
---

# My New Page

Content goes here...

Using Custom Components

We provide several custom MDX components:

Callout

<Callout type="info">This is an informational callout.</Callout>

Types: info, warn, success, danger

Tabs

<Tabs>
  <Tab title="JavaScript">```js console.log('Hello') ```</Tab>
  <Tab title="TypeScript">```ts console.log('Hello') ```</Tab>
</Tabs>

Steps

<Steps>
  <Step title="First Step">Do this first</Step>
  <Step title="Second Step">Then do this</Step>
</Steps>

Badge

<Badge tone="success">New</Badge>

Tones: neutral, success, warning, critical

Contract Address

<ContractAddress chain="Fogo" address="0x1234..." label="Brasa Staking Contract" />

Deployment

Vercel Setup

  1. Import the repository in Vercel
  2. Configure environment variables:
  3. Deploy!

Custom Domain

To set up the custom domain docs.brasa.finance:

  1. In Vercel project settings, add the domain
  2. Get the CNAME target from Vercel
  3. In your DNS provider, add:
    CNAME docs β†’ [vercel-cname-target]
    
  4. Wait for DNS propagation and SSL certificate issuance

Contributing

See CONTRIBUTING.md for guidelines on contributing to the documentation.

Code Quality

This project uses:

  • ESLint for code linting
  • Prettier for code formatting
  • TypeScript for type safety
  • Husky for git hooks
  • Commitlint for conventional commits

Pre-commit hooks automatically run linting and formatting.

CI/CD

GitHub Actions runs on every PR and push to main:

  • βœ… Linting (ESLint)
  • βœ… Type checking (TypeScript)
  • βœ… Format checking (Prettier)
  • βœ… Build verification
  • βœ… Link checking

Assets

Fonts

Self-hosted Inter fonts are located in /public/fonts/. Download from Google Fonts or Inter GitHub.

Required files:

  • inter-regular.woff2
  • inter-semibold.woff2
  • inter-bold.woff2

Open Graph Images

OG images (1200x630px) should be placed in /public/og/. These are used for social media previews.

License

This documentation is open source under the MIT License.

Support


Built with ❀️ by the Brasa team.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •