Final Project – CRUD + Authentication + REST API — a practical guide to CodeIgniter final project with clear examples you can reuse in real projects.
CodeIgniter Tutorial Series (74/74). Prefer one article? Read the complete CodeIgniter tutorial.
Short description
Build one complete app: user registration/login, protected CRUD for a resource (posts/products), and a JSON API with status codes.
Steps
- Create migrations for users and posts.
- Implement registration/login.
- Add web CRUD + API CRUD.
- Protect routes with filters.
- Test with Postman and deploy.
Final project scope
1. Auth (register/login/logout)
2. Password hashing + session/JWT
3. Resource CRUD with validation
4. REST API endpoints + Postman tests
5. CSRF/XSS basics + flash messages
6. Deploy-ready .env + migrations
Suggested API routes
$routes->group('api', static function ($routes) {
$routes->post('login', 'ApiAuth::login');
$routes->resource('posts', ['controller' => 'ApiPosts', 'filter' => 'jwt']);
});