Skip to content

A comprehensive Content Management System (CMS) built with CodeIgniter 4, featuring both front-end and back-end functionalities, including a RESTful API for data retrieval. This starter app provides a foundation for building robust web applications, complete with detailed documentation. The API is fetch-only (GET requests).

License

Notifications You must be signed in to change notification settings

akassama/igniter-cms

Repository files navigation

CodeIgniter 4 CMS

Igniter CMS is a light but powerful, versatile Content Management System built on the robust CodeIgniter 4 framework. It offers a comprehensive solution for website management, content creation, and digital presence optimization.

Features

  • User Authentication System

    • Registration and Login
    • Password Recovery
    • Updating Account Details and Password Change
  • Admin Panel

    • User and Role Management
    • Activity Logging
    • Backend Module Search
    • Configurations Settings
  • Media & File Management

    • File uploads, handling, and media management
  • General Enhancements

    • Activity Logging
    • Global Exception Handling
    • Easily Customizable Settings
    • Emailing Service Integration
  • Comprehensive CMS: Manage various website content, including blogs, pages, categories, navigations, events, portfolios, services, partners, counters, social links, pricings, teams, testimonials, FAQs, donation causes, popups, and policies.

  • E-commerce Module: Basic e-commerce functionality with product and category management.

  • Resume Module: Manage resumes, experiences, education, and skills.

  • File Manager: Upload and manage files for use in the application.

  • User Management: Admin panel for managing users and permissions.

  • Settings: Configure application settings, including account details and password.

  • API: Fetch-only RESTful API for retrieving CMS data.

  • Themes: Support for managing and switching between website themes.

  • Translations: Manage translations for different languages.

  • Customizable: Easily customize app messages, activity types, and more.

Getting Started

  1. Requirements:

    • PHP 8.0 or higher
    • Composer
    • MySQL (or other supported database)
    • Web server (Apache, Nginx, etc.)
  2. Steps:

    • Clone the repository: git clone https://github.com/akassama/igniter-cms (Replace with your actual repo URL)
    • Navigate to the project folder: cd igniter-cms
    • Install dependencies: composer install
    • Set Up Database Connection: Edit the database configuration in app/Config/Database.php:
    public $default = [
        'DSN'      => '',
        'hostname' => 'localhost',
        'username' => 'your_database_username',
        'password' => 'your_database_password',
        'database' => 'your_database_name',
        'DBDriver' => 'MySQLi',
        // other settings
    ];
    

    Make sure to update the hostname, username, password, and database fields with your database connection details.

    • Create the Database: Using your database management system (e.g., PhpMyAdmin), create a new database with the same name specified in Database.php.
    • Set Up Base URL: Edit the configuration file located in app/Config/App.php:
    • Run migrations: php spark migrate. This command will execute all available migrations, creating the necessary database tables.
    • Start the Application Ensure that your local server (e.g., Apache, Nginx) is running, then navigate to the base URL you set earlier:
    https://localhost/igniter-cms
    
    • Default Admin Login

      You can log in using the default Admin credentials:

      To modify the default Admin login, go to the migration file located at app/Database/Migrations/2024-08-27-210112_Users.php and update the $data[] array accordingly.

  3. Permissions: Ensure writable and public/uploads directories are writable by the web server.

  4. Email Configuration: To enable email functionality, you need to configure your Mailjet settings in app/Config/Email.php:

    public string $mailjetApiKey = 'your-mailjet-api-key';
    public string $mailjetApiSecret = 'your-mailjet-api-secret';
    

How to Customize System Features?

Customizing Notification Messages

To customize system messages:

  • Edit app/Config/CustomConfig.php to modify existing messages or add new ones.

Customizing Activity Logging

To update activity log types:

  • See app/Constants/ActivityTypes.php
  • Update the value or add new constants, for example
const PUSH_NOTIFICATION = 'push_notification';
  • Add the description in the function
public static function getDescription($type)
{
    $descriptions = [
        self::PUSH_NOTIFICATION => 'Push Notification Sent',
        // Add more descriptions as needed
    ];

    return $descriptions[$type] ?? 'Unknown Activity';
}

Usage Examples in Controllers

To see how configurations are used, review the code in AdminController or other controllers located in the app/Controllers directory.

Helper Functions

There are multiple helper functions available to ease the development process:

  • Authentication Helpers: app/Helpers/auth_helper.php
  • Data Helpers: app/Helpers/data_helper.php

Usage

Refer to the detailed documentation for information on using the application's features, API endpoints, and development guidelines.  The documentation is available here: Igniter CMS Documentation

API

The application includes a fetch-only RESTful API. Refer to the documentation for available endpoints and usage instructions. API keys may be required for authentication.

File Upload System

The application has a built-in file upload system for handling various types of files:

  • Supported Types: Docs (.doc, .docx, .pdf, .txt, .rtf, .odt.), Images (jpg, png, gif, jpeg), Audios (.mp3, .wav, .ogg) and Videos (.mp4, .avi, .mov.)
  • Maximum File Size: 5MB. You can modify this value in public\back-end\assest\js\script.js and modify Cookies.set('max_file_size', '5')
  • Validation and configuration can be updated in the relevant controller handling file uploads.

Other Features Summary

  • User & Admin Module: Management for different user roles and actions.
  • Search Module: Backend search capabilities to easily navigate records.
  • Global Exception Handling: Handle application-wide exceptions gracefully.
  • Easily Customizable: The application structure is modular to facilitate easy updates and modifications.

License

This project is licensed under the MIT License.

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request.

About

A comprehensive Content Management System (CMS) built with CodeIgniter 4, featuring both front-end and back-end functionalities, including a RESTful API for data retrieval. This starter app provides a foundation for building robust web applications, complete with detailed documentation. The API is fetch-only (GET requests).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages