Program & Faculty Setup
Overview
The Academics management module allows administrators to define the organizational structure of the institution by managing Faculties and their associated Academic Programs. This setup ensures that students can browse available courses, view detailed curriculum information, and filter programs by their respective departments.
All management actions (Create, Update, Delete) require an authenticated session with a valid JWT token.
Managing Faculties
Faculties serve as the primary departments within the institution (e.g., Faculty of Science, Faculty of Management).
Creating and Editing Faculties
To manage faculties, navigate to the Academics > Faculties section in the CMS dashboard.
- Faculty Name: The full title of the department.
- Status: Toggle between active and inactive to control visibility on the public site.
API Usage
If you are extending the dashboard or integrating faculty data into a custom component, use the following methods from academicsApi.js:
| Function | Method | Description |
| :--- | :--- | :--- |
| getAllFaculties() | GET | Retrieves a list of all registered faculties. |
| addFaculty(data) | POST | Creates a new faculty. Requires authToken. |
| updateFacultyById(id, data) | PATCH | Updates existing faculty details. Requires authToken. |
| deleteFacultyById(id) | DELETE | Removes a faculty. |
Managing Academic Programs
Programs are the specific courses or degrees offered under a faculty (e.g., B.Sc. Computer Science).
Adding a New Program
Navigate to Academics > Programs and select Add New. The interface requires the following information:
- Program Name: The full formal name (e.g., Bachelor of Information Technology).
- Short Name: An abbreviation used for badges and quick links (e.g., BIT).
- Faculty: A dropdown selection to link the program to a predefined Faculty.
- Level: The academic tier (e.g., Undergraduate, Graduate).
- Program Details: A rich-text area for the curriculum description, eligibility criteria, and objectives. This field supports HTML rendering.
Program Display Logic
The public-facing ProgramPage renders details dynamically based on the ID. It uses the dangerouslySetInnerHTML attribute for the programDetails field, allowing administrators to format descriptions with bold text, lists, and links via the CMS editor.
// Example of how program details are rendered in the UI
<h1 dangerouslySetInnerHTML={{ __html: programDetail.programDetails }} />
Technical Reference: Academics API
For developers building custom administrative tools, the academicsApi.js provides a clean interface for data persistence.
Program Schema Example
When calling addProgram or updateProgramById, the data object should follow this structure:
{
"programName": "Bachelor of Science in Physics",
"shortName": "BSc Physics",
"facultyName": "Faculty of Science",
"level": "Undergraduate",
"programDetails": "<p>Detailed course description goes here...</p>",
"status": true
}
Implementation Example
To add a program programmatically within the CMS:
import { addProgram } from './path/to/academicsApi';
const handleSave = async (formData) => {
try {
const response = await addProgram(formData);
console.log("Program saved successfully:", response);
} catch (error) {
console.error("Failed to save program:", error);
}
};
Security and Permissions
Access to the Program and Faculty setup is protected by the PrivateRoutes wrapper.
- Authentication: The system checks for an
authTokeninlocalStorage. - Headers: All write operations automatically include the
Authorization: Bearer <token>header via thegetAuthToken()utility. - Unauthorized Access: Users attempting to access these routes without a token are redirected to the
/signInpage.