This project is built using Flutter (frontend) and PHP/MySQL (backend).
The Flutter code is inside the lib/ folder, and the PHP API scripts are inside the api/ folder.
🔹 Flutter SDK (stable channel)
🔹 Android Studio or VS Code with Android SDK
🔹 PHP 7.4+ and MySQL/MariaDB
(Windows: XAMPP/WAMP, macOS: MAMP, Linux: LAMP)
git clone https://github.com/Nafiz-Mostofa/cstu_archive.git<br>
cd cstu_archive
flutter pub get
Create a MySQL database named "flutter_auth".
student_id (PK) VARCHAR
student_name VARCHAR
username VARCHAR NULL
email VARCHAR NULL
password VARCHAR NULL
gp DECIMAL
semester_credit DECIMAL
total_credit DECIMAL
gpa DECIMAL
cgpa DECIMAL
failed_subjects INT
subjects_to_register TEXT
id (PK) INT AI
email VARCHAR UNIQUE
username VARCHAR NULL
password VARCHAR NULL
phone VARCHAR NULL
cstuadmin1@gmail.com
cstuadmin2@gmail.com
cstuadmin3@gmail.com
Note: Make sure the email addresses are correct. You can input any gmail according to your need.
Download each php file given in the api folder of GitHub and place it in a folder named after the name of the Database.
If your database name is "flutter_auth" than your folder name will be "flutter_auth".
And the folder should be placed in this path C:\xampp\htdocs.
🔹(Make sure your Apache/PHP server is running, so you can access the API at http://localhost/api/.)
Edit lib/services/auth_service.dart and lib/services/admin_auth_service.dart and update the baseUrl:
🔹Android Emulator:
http://your_ip_address/api/
🔹iOS Simulator:
http://127.0.0.1:8080/api/
🔹Windows: ipconfig → check IPv4 under Wi-Fi/Ethernet
🔹macOS/Linux: ifconfig or ip a
If you use HTTP instead of HTTPS, add this inside the tag in android/app/src/main/AndroidManifest.xml:
android:usesCleartextTraffic="true"
flutter run
🔹Student Signup: Requires a valid student_id. Once registered, the same ID cannot be used again.
🔹Student Login: Signup username + password.
🔹Forgot Password (Student): Verifies student_id + username before allowing password reset.
🔹Admin Signup: Only works for pre-added emails in the adminpanel table. Can register once only.
🔹Admin Login: Signup username + password.
🔹Admin Forgot Password: Verifies email + username before allowing password reset.
🔹Ensure phone & PC are on the same network.
🔹Use your PC’s LAN IP in baseUrl.
🔹Check if firewall/antivirus is blocking Apache/PHP.
🔹Check Apache/PHP is running.
🔹Open http://localhost/api/get_all_students.php in browser.
🔹Verify IP/port in baseUrl.
🔹Check database credentials in db_connect.php.
🔹Verify MySQL is running.
🔹The app uses resizeToAvoidBottomInset: true and SingleChildScrollView.
🔹If still happening, adjust small-screen font scaling in device settings.
cstu_archive/
├─ lib/
│ ├─ services/
│ │ ├─ auth_service.dart
│ │ └─ admin_auth_service.dart
│ └─ screens...
├─ api/
│ ├─ db_connect.php
│ ├─ login.php
│ ├─ signup.php
│ ├─ forgot_password.php
│ ├─ get_user_details.php
│ ├─ get_all_students.php
│ ├─ admin_login.php
│ ├─ admin_signup.php
│ └─ admin_forgot_password.php
├─ android/
├─ pubspec.yaml
└─ README.md
flutter build apk --release
or
flutter build appbundle --release
For production, use HTTPS if possible, sanitize all SQL inputs, and keep sensitive config (DB password) out of public repositories by adding them to .gitignore.
Direct Message to my gmail.
nafizmostofa2003@gmail.com