How arifmardhavi/simpangan works
Project type and purpose
• This is a server-side rendered web application built on PHP using the CodeIgniter MVC framework.
• The “application” folder holds your custom business logic (controllers, models, views). The “system” folder is the CI core. “assets” holds static CSS/JS/images. “html” holds standalone prototype pages.
File structure
• Top level:
• index.php – front-controller entry point
• application/ – your MVC code
• system/ – CodeIgniter core (Router, Controller base class, Model base class, etc.)
• assets/ – CSS, JS, images served statically
• html/ – static UI prototypes
• application/config – routing, database, autoload, hooks, caching configuration
• application/controllers – Feature controllers (Berkas, Pengajuan, Users, etc.)
• application/models – Data-access (M_crud.php, M_send_email.php)
• application/views – PHP templates (frontend pages, error pages, modul header/footer/sidebar)
• system/… – core libraries, helpers, database drivers, caching, sessions, etc.
README for additional insights
• Confirms CodeIgniter MVC usage, PHP requirements, caching capabilities (memcached, file, Redis), email library, session drivers.
Main components
a. Client (Browser or SPA front-end)
b. Load Balancer or Web Server (Apache/Nginx with .htaccess rewrites)
c. Front Controller (index.php)
d. CodeIgniter Core Components
• Router → Dispatch
• Hooks → Pre/post controller events
• Security/Input → XSS, CSRF checks
• Loader → Loads helpers, libraries, models
e. Application Layer
• Controllers – handle routes (Berkas, Pengajuan, Users, etc.)
• Models – interact with the database via DB drivers (MySQL, PDO, etc.)
• Views – render output with header/footer/sidebar templates + dynamic data
f. Database Server (MySQL, PostgreSQL, etc.)
g. External/Caching Services
• Memcached/Redis for sessions or caching
• SMTP or third-party email via M_send_email
• Any third_party libraries (in application/third_party)
h. Static Assets
• CSS, JS, Images served directly from assets/
Relationships and interactions
• Client → HTTP request → Web Server → index.php
• index.php → Router → matches URI to Controller
• Controller ↔ (uses) Loader to pull in Models, Helpers, Libraries
• Controller ↔ Model → Database (query/build/transaction)
• Controller → passes data to View → HTML output
• HTML + References to assets → response → Client
• For caching/session: Controller/Model uses Cache library → Memcached/Redis
• For email: Controller calls M_send_email → SMTP or API
Architectural patterns/design principles
• MVC (separation of concerns between data, logic, and presentation)
• Front Controller pattern (single index.php entry point)
• Loose coupling via DI/Loader and helpers/libraries
• Configurable via application/config and environment hooks
• Extensible via application/third_party and custom core overrides in application/core
Detail level
• That application/config/database.php points to the DB driver.
• That application/config/memcached.php or session drivers may point to Redis/Memcached.