Skip to content

apache/casbin-website-v3

Casbin Website V3

GitHub Action Release Discord License

The official website for Casbin. Casbin is an authorization library that supports access control models like ACL, RBAC, ABAC for Golang, Java, C#, JavaScript, Python, PHP and other languages.

This is a Next.js application built with Fumadocs, a modern documentation framework.

Live Site

Visit the live site at: https://casbin.org

Get Started

Requirements

  1. Git
  2. Node.js: v20 or above
  3. npm (comes with Node.js)

Running Locally

  1. Clone the repository:

    git clone https://github.com/casbin/casbin-website-v3.git
    cd casbin-website-v3
  2. Install dependencies:

    npm ci
  3. Start the development server:

    npm run dev
  4. Open http://localhost:3000 with your browser to see the result.

Project Structure

In the project, you can see:

  • source.config.ts: Configuration for content source adapter
  • src/lib/source.ts: Code for content source adapter, loader() provides the interface to access your content
  • src/lib/layout.shared.tsx: Shared options for layouts
Route Description
app/(home) The route group for your landing page and other pages
app/docs The documentation layout and pages
app/api/search/route.ts The Route Handler for search

Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run format - Format code with Prettier
  • npm run format:check - Check code formatting
  • npm run types:check - Type check the project

Contributing

We welcome contributions! Here's how you can help:

Documentation Writing

For the configuration of the sidebar and navigation, refer to the Fumadocs documentation.

For the features that you may use when writing documents, please refer to Markdown Features.

Reporting Issues

If you find any issues or have suggestions, please open an issue on our GitHub Issues page.

Submitting Pull Requests

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using Conventional Commits format
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Note: This project uses semantic-release for automated version management and package publishing. Please use conventional commit messages (e.g., feat:, fix:, docs:) for your commits.

Learn More

To learn more about Next.js and Fumadocs, take a look at the following resources:

License

This project is licensed under the Apache-2.0 License.