Skip to content

logto-io/rbac-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logto RBAC Sample Application

This repository contains the sample code for the blog posts

Project Structure

The project consists of three main parts:

  • backend/: A Node.js API server with RBAC implementation
  • frontend/: A React application demonstrating role-based UI and access control
  • mcp-server/: A Node.js program used for Model Context Protocol (MCP)

Getting Started

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.example .env

Update the .env file with your Logto configuration values (issuer URL, JWKS URL, and API resource identifier from your Logto console).

  1. Start the development server:
    npm run dev

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.example .env

Update the .env file with your configuration values.

  1. Start the development server:
    npm run dev

The application will be available at http://localhost:5173 (frontend) and the API at http://localhost:3000 (backend).

MCP Server

Refer to MCP Server Quickstart to setup for Claude Desktop for testing.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published