cyruzin / codeigniter-react-boilerplate

A CodeIgniter boilerplate with React.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeIgniter React Boilerplate

A CodeIgniter boilerplate with React.

Installation

Click here to watch the tutorial

Or follow the steps below:

Clone the repository and run the command below to install node dependencies.

npm install or yarn install

After that, configure the project to use with XAMPP or Docker.

Docker

Make sure you have Docker and Docker Compose installed in your machine and then run:

docker-compose up

After that, check the project up and running: http://localhost:8080

If you want to change Docker port, go to the "src/util" folder and modify the constants.js file.

Usage

yarn or npm run [command]
Command Description
yarn install Install the dependencies
yarn run dev Start development mode and watch for file changes
yarn run build Generates the minified file ready for production

Create new components

Go to the "src/components" folder, create a new component. Then add it in the app.js file.

Check the "Welcome" controller and the "welcome_message" view as well to see how to load the components.

If is not clear yet, check the "util_helper" for more info.

Requirements

The project have been tested using the versions below:

  • CodeIgniter v3.1.13
  • PHP FPM version v7.4.27
  • Nginx latest version
  • Node version v16.13.2
  • Yarn version v1.22.17

Contributing

Fork the repository, modify it and make a pull request.

License

MIT

About

A CodeIgniter boilerplate with React.

License:MIT License


Languages

Language:HTML 81.7%Language:PHP 17.2%Language:JavaScript 1.0%Language:CSS 0.2%