Logo Lanfrica

Contractor-x/Class-Guard

Domaine:

education

Type de record:

software
Créateur:
Con
Hôte:
Class Guard is a role-based classroom management system purpose-built for educational environments across Africa. # Class-Guard: Secure Role-Based Dashboard Access with Permit.io > A secure, role-based access control (RBAC) React + Node.js app using Permit.io, built for the Permit.io RBAC Challenge. --- ## About Class-Guard **Class-Guard** is a role-based dashboard application with the following features: - **Integration with Permit.io for access control (RBAC)** - **A simple Node.js/Express backend to handle permission checks** - **A dynamic React frontend with three dashboards:** - `AdminDashboard.jsx` - `TeacherDashboard.jsx` - `StudentDashboard.jsx` - **Deployed to Netlify (Frontend) and localhost/Render (Backend)** - **Compatible with JWT-authenticated workflows** - **Ready for production, demo-ready** --- ## Folder Structure ``` Class-Guard/ ├── backend/ │ └── server.js # Node.js server with Permit.io integration ├── frontend/ │ ├── public/ │ │ └── _redirects # Netlify redirects for SPA │ ├── src/ │ │ ├── pages/ │ │ │ ├── AdminDashboard.jsx │ │ │ ├── StudentDashboard.jsx │ │ │ └── TeacherDashboard.jsx │ │ ├── components/ │ │ │ └── Navbar.jsx │ │ ├── App.jsx │ │ └── index.js ├── .gitignore └── README.md ``` --- ## Installation & Setup ### 1. Clone the Repository ```sh git clone github.com cd Class-Guard ``` ### 2. Backend Setup (Node.js + Permit.io) #### Install Dependencies ```sh cd backend npm install ``` #### Start the Server ```sh node server.js ``` > **Server runs at:** `localhost` #### Update Permit.io Credentials You must update your Permit.io API key and PDP URL inside `server.js`. ```js const permit = new Permit({ pdp: 'cloudpdp.api.permit.io', token: 'your-permit-api-key', }); ``` ### 3. Frontend Setup (React) #### Install Dependencies ```sh cd frontend npm install ``` #### Start the Application ```sh npm start ``` > **Frontend runs at:** `localhost` --- ## Deployment ### Frontend on Netli …