A multi-platform voucher management system β admin backend + mobile web app + native Android/iOS clients.
- π Web backend: CodeIgniter (PHP)
- π± Mobile web & hybrid UI: Framework7 (Framework7 + jQuery + Framework7 assets)
- π€ Android: Gradle project
- π iOS: Xcode with CocoaPods (Firebase, Alamofire, etc.)
- ποΈ Database: MySQL (schema in database/shop.sql)
Coupon (it-shop-framework7) is a voucher / coupon manager platform. The repository contains:
- Admin dashboard (admin/) β CodeIgniter based.
- Mobile web API & UI (mobile/) β CodeIgniter endpoints and Framework7-powered UI.
- Native mobile clients:
- Android app (app/android/shop) β Gradle project using a small library included.
- iOS app (app/ios/shop) β Swift project using CocoaPods for Firebase, Alamofire, CropViewController, etc.
- Database schema: database/shop.sql
Framework7 is used as the mobile UI framework (see mobile/assets and mobile/views). The Framework7 files and styles power the mobile experience, making it feel native on Android/iOS devices when wrapped in a WebView or used as a PWA shell.
A mobile splash logo (relative path) is included:
(If you open this README on GitHub, the image will render from the repository path.)
High-level tree (selected important files & folders). Use this to quickly find where to edit features.
- π root
- π admin
- π index.php (CodeIgniter admin front controller)
- π application
- π config
- π config.php (base_url, encryption key, etc.)
- π database.php (admin DB config)
- π routes.php
- π controllers
- π Home.php (example admin controller)
- π Login.php, Notice.php, Qna.php, Terms.php, User.php, Voucher.php, Warning.php
- π core
- π MY_Controller.php, MY_Model.php, Common.php
- π libraries
- π Classes/PHPExcel (spreadsheet utilities)
- π views
- π layout (header.php, footer.php)
- π login, notice, qna, terms, user, voucher, warning (list/detail views)
- π config
- π assets
- π global (plugins: amcharts, bootstrap, datatables, etc.)
- π layouts, pages (JS/CSS)
- π mobile
- π index.php (CodeIgniter mobile front controller)
- π application
- π config
- π application_config.php (assets_url, timezone)
- π database.php (mobile DB config)
- π routes.php (mobile routes)
- π controllers
- π Intro.php, Main.php, Mypage.php, Refund.php, Term.php
- Main.php contains many API endpoints (recognize voucher, get_home_info, add_voucher, etc.)
- π views
- π login, main, mypage, refund (HTML templates used by Framework7)
- π config
- π assets
- π css
- framework7.min.css, app.css
- π js
- framework7.js, app.js, utils, routes.js
- π images
- splash & UI assets (ic_splash_logo.png, icons...)
- π fonts
- Framework7Icons, MaterialIcons, etc.
- π css
- π app
- π android
- π shop
- π app (Android app module)
- build.gradle (app module)
- src/main/java/co/shop/*.java (Native Android code)
- π library (SlideToggle view library used by Android project)
- π app (Android app module)
- π shop
- π ios
- π shop
- Podfile (Firebase, Alamofire, CropViewController, SwiftyJSON)
- shop.xcodeproj / shop.xcworkspace
- AppDelegate.swift, ViewController.swift
- π shop
- π android
- π database
- π shop.sql (MySQL database schema)
- π LICENSE (MIT)
- ... (many vendor assets and 3rd-party libs)
- π admin
- Backend
- PHP (CodeIgniter 3.x) β admin and mobile APIs
- MySQL β schema in database/shop.sql
- PHPExcel β spreadsheet handling (admin/application/libraries/Classes/PHPExcel)
- Mobile web UI
- Framework7 β primary UI framework for mobile web (mobile/assets/**)
- jQuery, moment.js, Framework7 routes
- Native clients
- Android β Java + Gradle (app/android/shop)
- iOS β Swift + CocoaPods (Pods include Firebase, Alamofire, CropViewController, SwiftyJSON)
- Integrations
- Firebase Messaging / InstanceID / Analytics (iOS pods, Android FCM code in app)
- Dev & Tools
- Gradle for Android
- CocoaPods for iOS
- Many third-party JS/CSS plugins in admin/assets (DataTables, amcharts, fullcalendar, CKEditor, etc.)
These steps will get a development environment running locally.
Prerequisites
- PHP 7.x (compatible with CodeIgniter)
- Apache or Nginx (or PHP built-in server for quick tests)
- MySQL (or MariaDB)
- Node / npm (optional for front-end workflows)
- Android Studio (for Android)
- Xcode + CocoaPods (for iOS)
- Clone the repository
git clone https://github.com/johnrcj/it-shop-framework7.git
cd it-shop-framework7- Database β import schema
# create database
mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS shop CHARACTER SET utf8 COLLATE utf8_general_ci;"
# import schema
mysql -u root -p shop < database/shop.sql- Configure backend (admin & mobile)
- Edit admin/application/config/config.php
- Set $config['base_url'] to your admin URL, e.g.
http://localhost/ConpangAdmin/or use a virtual host. - Set $config['encryption_key'] (non-empty random string).
- Set $config['base_url'] to your admin URL, e.g.
- Edit admin/application/config/database.php and mobile/application/config/database.php
- Update
hostname,username,password,databaseaccording to your DB.
- Update
- Edit mobile/application/config/application_config.php (assets_url/admin_url) if you serve mobile assets from different path.
- Web server
- Option A β Virtual hosts (recommended): create vhosts for:
- admin -> document root to repo/admin
- mobile -> document root to repo/mobile
- Option B β PHP built-in (quick dev)
# Serve mobile on port 8080
cd mobile
php -S localhost:8080
# Serve admin on port 8081
cd ../admin
php -S localhost:8081Note: CodeIgniter is usually served through Apache/Nginx because of URL rewrites. If using PHP built-in, ensure index.php handles requests (or use a router script).
- Native Android
cd app/android/shop
# from Android Studio: Open project and run on device/emulator
# or command line (gradlew)
./gradlew assembleDebug- Native iOS
cd app/ios/shop
pod install
# open shop.xcworkspace in Xcode and build/run
open shop.xcworkspace- Admin base_url: admin/application/config/config.php -> $config['base_url']
- Mobile assets URL: mobile/application/config/application_config.php -> $config['assets_url']
- Database credentials: admin/application/config/database.php and mobile/application/config/database.php
- Encryption key: admin/application/config/config.php -> $config['encryption_key'] (set to a secure random string)
- Session/cookie settings: config.php (check cookie_domain, cookie_secure if using HTTPS)
- Routes
- Admin routes: admin/application/config/routes.php (default controller: Login)
- Mobile routes: mobile/application/config/routes.php (default controller: intro)
- Key controllers:
- Admin: admin/application/controllers/* (Login, User, Notice, Voucher, etc.)
- Mobile API: mobile/application/controllers/Main.php β many API endpoints you can call from mobile app.
- Examples:
- POST /main/get_home_info β requires user_id, returns available/use_end/expired vouchers.
- POST /main/recognize_voucher β sends image path and returns recognized voucher info (test stubbed).
- Examples:
- Views & UI:
- Mobile UI built with Framework7 templates found under mobile/application/views and mobile/assets.
- Framework7 routes and page templates defined in mobile/assets/js/routes.js and mobile/assets/js/app.js
Example: Getting home info (mobile)
- Endpoint located in mobile/application/controllers/Main.php -> get_home_info()
- Parameters: type, search_key, user_id
- Response: JSON containing lists and counts for available/use_end/expired vouchers.
- Many third-party libraries are included under admin/assets and app/ios/shop/Pods.
- Please check the respective LICENSE files (e.g., admin/assets/global/plugins/* LICENSE files, Pods LICENSEs) when redistributing.
- Issues and PRs welcome.
- Suggested flow:
- Fork β feature branch β PR with description and screenshots (if UI)
- Keep commits small and focused; write clear commit messages.
- Coding standards:
- PHP (CodeIgniter best practices), HTML/CSS/JS for front-end, Java for Android, Swift for iOS.
| Feature | Area | Priority | Status |
|---|---|---|---|
| Improve voucher recognition engine (OCR/barcode) | Mobile / API | π₯ High | Planned |
| Add automated tests for backend controllers | Backend | βοΈ Medium | Planned |
| PWA support (offline vouchers) | Mobile (Framework7) | βοΈ Medium | Planned |
| Push-notifications improvements / topics | Mobile / Native | π₯ High | In progress |
| Admin UX polish (datatable filters) | Admin UI | βοΈ Low | Planned |
| CI / Dockerization for dev env | DevOps | βοΈ Medium | Planned |
- CodeIgniter: https://codeigniter.com
- Framework7: https://framework7.io (Mobile UI used in mobile/assets)
- Android Gradle: see app/android/shop/build.gradle
- iOS CocoaPods: see app/ios/shop/Podfile (Firebase/Messaging/Auth, CropViewController, Alamofire, SwiftyJSON)
- Repository: johnrcj/it-shop-framework7
- License: MIT (see LICENSE)
MIT License β see LICENSE file.
Thank you for sharing your project! If you want, I can:
- Generate a shorter developer quickstart checklist (1-page).
- Extract a minimal demo environment (Docker Compose) to start the app and DB locally.
- Add an API reference section documenting endpoints in mobile/controllers/Main.php.
