A comprehensive academic platform designed specifically for FCI students, providing essential resources, administrative tools, and communication features. This project is no longer maintained.
- Study Material: Organized course materials by subject
- Student Lookup: Search and find student information by code
- Student Results: Access academic results and grades
- Group Links: Quick access to section and subject-specific WhatsApp groups
- System Status: Real-time monitoring of academic services
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- File Management: Upload, organize, and manage academic materials by subject
- Notification System: Send announcements to all students with Markdown support
- User Administration: Manage admin accounts and permissions
- Content Management: Create folders, upload files, and maintain academic resources
- Real-time Updates: Instant notification delivery and file organization
- Web Server: Apache 2.4+ or Nginx 1.18+
- PHP: 7.4 or higher with extensions:
pdo_mysqlfileinfosessionjson
- Database: MySQL 5.7+ or MariaDB 10.3+
- Python: 3.8+ (for API services)
- PM2: For production Python process management
git clone https://github.com/iChiwi/fciportal.git
cd fciportal-- Create main database
CREATE DATABASE fci CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE fci;
-- Admins table
CREATE TABLE admins (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
name VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Notifications table
CREATE TABLE notifications (
id INT AUTO_INCREMENT PRIMARY KEY,
message TEXT NOT NULL,
admin VARCHAR(50) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (admin) REFERENCES admins(username) ON DELETE CASCADE
);
-- Links table
CREATE TABLE links (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
url TEXT NOT NULL,
category ENUM('official', 'section', 'subject') NOT NULL,
group_code VARCHAR(10) NULL,
subject_key VARCHAR(20) NULL,
sort_order INT DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);# MySQL Configuration
MYSQL_HOST=localhost
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=fciUpdate /config.php:
<?php
$host = 'localhost'; // Host Name
$db = 'fci'; // Database Name
$user = 'your_username'; // Database Username
$pass = 'your_password'; // Database Password
$charset = 'utf8mb4';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
try {
$pdo = new PDO($dsn, $user, $pass, $options);
} catch (PDOException $e) {
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
?>cd /api
pip install -r requirements.txtEdit /admin/createadmin.php:
<?php
require '../config.php';
$username = 'admin'; // Your admin username
$password = 'secure_password'; // Your admin password
$name = 'Administrator'; // Admin display name
$hashedPassword = password_hash($password, PASSWORD_BCRYPT);
$sql = "INSERT INTO admins (username, password, name) VALUES (:username, :password, :name)";
$stmt = $pdo->prepare($sql);
$stmt->execute([
'username' => $username,
'password' => $hashedPassword,
'name' => $name
]);
echo "Admin user created successfully!";
?>Run once: /admin/createadmin.php
Update /admin/upload_handler.php:
$baseDir = "/var/www/domainname/material"; // Set your materials directory path# FCI API
cd /api
python app.py# Install PM2 and create service
npm install -g pm2
pm2 start /api/app.py --interpreter python3 --name fci-api<VirtualHost *:80>
ServerName domainname
DocumentRoot /var/www/domainname
<Directory /var/www/domainname>
AllowOverride All
Require all granted
</Directory>
</VirtualHost># Set proper permissions for upload directories
chmod 755 /var/www/domainname/material
chown -R www-data:www-data /var/www/domainname/material
# Set permissions for cache and static files | Edit domainname
chmod -R 755 /var/www/domainname/static# Allow HTTP/HTTPS
sudo ufw allow 80
sudo ufw allow 443GET /studentcode.py- Student code lookupGET /studentresults.py- Student results retrieval
- Use strong passwords for database users
- Limit database user privileges
- Enable SSL for database connections in production
- Validate all file uploads
- Restrict file types and sizes
- Store uploads outside web root when possible
- Use secure session settings
- Implement CSRF protection
- Regular session cleanup
The platform is fully responsive and supports:
- iOS Safari 12+
- Android Chrome 70+
- Mobile Firefox 68+
# Install PostCSS dependencies
npm install
# Build CSS from SCSS
npm run build-cssstatic/scss/
βββ main.scss
βββ components/
β βββ _admin.scss
β βββ _buttons.scss
β βββ _forms.scss
β βββ _links.scss
βββ core/
β βββ _variables.scss
β βββ _mixins.scss
β βββ _animations.scss
βββ layout/
βββ _body.scss
βββ _header.scss
βββ _sections.scss
-
Database Connection Failed
- Check database credentials in
config.php - Verify MySQL service is running
- Check firewall settings
- Check database credentials in
-
File Upload Errors
- Verify directory permissions
- Check PHP upload limits
- Ensure disk space availability
-
API Not Responding
- Check Python service status
- Verify virtual environment activation
- Check error logs
- Apache:
/var/log/apache2/error.log - PHP:
/var/log/php/error.log - Python: Check application logs
- PDO MySQL driver
- FileInfo extension
- Session support
- JSON support
Flask==2.3.3
requests==2.31.0
beautifulsoup4==4.12.2
gunicorn==21.2.0
flask_cors==4.0.0
Werkzeug==2.3.7{
"devDependencies": {
"@fullhuman/postcss-purgecss": "^7.0.2",
"postcss": "^8.5.3",
"postcss-cli": "^11.0.1"
}
}- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
/
βββ config.php
βββ home.php
βββ package.json
βββ postcss.config.mjs
βββ admin/ # Admin panel
β βββ createadmin.php
β βββ home.php
β βββ login.php
β βββ upload_handler.php
βββ api/ # Python APIs
β βββ app.py
β βββ requirements.txt
β βββ studentcode.py
β βββ studentresults.py
βββ links/ # Group links
β βββ getLinks.php
β βββ home.php
βββ material/ # Study material
βββ static/ # SCSS, JS, images
β βββ js/
β βββ img/
β βββ scss/
βββ status/ # Status pages
β βββ home.php
βββ studentcode/ # Student lookup
β βββ home.php
βββ studentresults/ # Results system
β βββ home.php
βββ study/ # Study resources
βββ get_files.php
βββ home.php
Built with β€οΈ for FCI students.