Skip to content

akrambel2115/Unitt

Repository files navigation

πŸ“š Unitt Project

Welcome to the Unitt project repository! This document provides essential information for setting up and configuring the Unitt platform, including database connection setup, SQL backup instructions, and configuration details. πŸš€


🌟 Unitt Features

πŸ“– Description

Unitt is a student-driven platform designed to facilitate the sharing and access of academic resources among university students and staff. It serves as a hub for knowledge exchange, allowing users to connect, collaborate, and contribute to their academic community.

πŸ”‘ Key Features

1. πŸ“‚ Resource Sharing

  • Upload and Download: Users can upload and download academic resources such as lecture notes, past exams, and study materials.
  • Categorization: Resources are categorized by university, module, and year, making it easy to find relevant materials.

2. πŸ‘€ User Profiles

  • Personal Information: Users can create profiles with personal information, including contact details and social media links.
  • Profile Picture: Users can upload a profile picture to personalize their account.

3. πŸ’¬ Community Engagement

  • Discussion Forums: Engage in discussions with peers and faculty on various academic topics.
  • Comments and Feedback: Provide feedback on resources and participate in community discussions.

4. 🏫 University Hubs

  • UniHub: A dedicated space for each university where students can find resources specific to their institution.
  • Pinned Universities: Users can pin their favorite universities for quick access.

5. πŸ”” Notifications

  • Real-time Updates: Receive notifications about new resources, comments, and community activities.
  • Customizable Alerts: Set preferences for the types of notifications you wish to receive.

6. πŸ”’ Security and Privacy

  • Secure Login: User authentication with session management to ensure secure access.
  • Privacy Controls: Users have control over the visibility of their personal information.

7. βš™οΈ Administrative Tools

  • User Management: Admins can manage user accounts, including roles and permissions.
  • Content Moderation: Tools for reviewing and moderating user-generated content to maintain community standards.

8. πŸ”— Integration and Compatibility

  • Database Integration: Seamless integration with MySQL databases for efficient data management.
  • Cross-Platform Compatibility: Accessible on various devices and browsers for a consistent user experience.

9. πŸ› οΈ Support and Assistance

  • Help Center: Access to documentation and tutorials for troubleshooting and guidance.
  • AI Assistance: Utilize AI tools like ChatGPT for additional support and problem-solving.

SQL Backup and Configuration Instructions

SQL Backup Information

This repository contains a MySQL database backup created using the Google Cloud SQL Backup Feature. The backup has been tested and verified to work successfully with phpMyAdmin, with the following considerations:

MySQL Version Compatibility

  • The backup was tested with MySQL version 8.0.31. Older versions of MySQL may not be fully compatible.
  • To ensure compatibility, we recommend updating your MySQL version to 8.0.31 if you are using phpMyAdmin. This can be achieved by following this tutorial.

πŸ“€ Import Recommendation

  • We suggest using MySQL Workbench to import the backup since it was tested and it worked seamlessly.

βœ… Safety Verification

  • The backup file has been scanned for potential threats using VirusTotal and confirmed safe. You can view the detailed safety report here.

Navbar Configuration

For the navbar functionality within the website, ensure the BASE_URL variable in the config.php file is correctly set to match your server's root path.

Default Configuration

By default, the BASE_URL is set to:

php
define('BASE_URL', '/Unitt/public');

Updating the BASE_URL

If your server's root path differs, update the BASE_URL variable accordingly. For example:

php
define('BASE_URL', '/YourProjectRoot/public');

Replace /YourProjectRoot with the actual root path of your project.

πŸ“ Additional Notes

This configuration ensures that the navbar can correctly link to all sections of the website.

Database Connection Setup

To run the Unitt project, you need to create two database connection files:

1. conn.php in /Unitt/dashboard

<?php
define('DB_HOST', 'localhost'); // Database IP address
define('DB_USERNAME', 'root'); // Database username
define('DB_PASSWORD', '123'); // Database user password
define('DB_NAME', 'unitt_db'); // Database name (if you're using the backup use unitt_db)

function getDbConnection() {
    try {
        $conn = new PDO("mysql:host=" . DB_HOST . ";dbname=" . DB_NAME, DB_USERNAME, DB_PASSWORD);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        return $conn;
    } catch (PDOException $e) {
        error_log("Connection failed: " . $e->getMessage());
        return null;
    }
}

2. db_connection.php in /Unitt/private

<?php
$host = "localhost"; // Database IP address
$username = "root"; // Database username
$password = "123"; // Database user password
$dbname = "unitt_db"; // Database name (if you're using the backup use unitt_db)

$conn = new mysqli($host, $username, $password, $dbname);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

⚠️ Disclaimer

While the backup has been tested and confirmed to work with MySQL version 8.0.31 and phpMyAdmin, we do not guarantee compatibility with older versions of MySQL. Ensure your environment matches the suggested configurations to avoid issues.

Email Configuration with ENV

To enable email functionality on the website using the PHPMailer library, you need to configure the .env file located in /Unitt/private.

Instructions :

Remember to replace sending_email and email_application_password with your actual email credentials. Using a Gmail account is recommended for its ease of setup and reliability.

MAIL_USERNAME=sending_email # The email you want to send emails from
MAIL_PASSWORD=email_application_password # The email application password (We suggest Gmail for its easy approach)

For more detailed instructions and troubleshooting, please refer to the documentation or contact support. 😊

πŸ‘₯ Team Contributions

  • Zerraf Badreddine

    • Contributions: Responsible for UniHub, Contact Us, About Us page, and GCloud managing.
  • Kerai Yassine

    • Contributions: Sign up and all user authentication related tasks, user profile, and user library.
  • Blaha Ibrahim

    • Contributions: Homepage feed page and syncing profile with posts.
  • Akram Khaled Belbakhouche

    • Contributions: Landing page and all dashboard functionalities.

🀝 Contributions

We welcome contributions from the community to enhance the UniHub! If you have academic resources to share, suggestions for improvement, or bug reports, please get involved. Your involvement helps make UniHub better for everyone. Thank you for your support! πŸ™Œ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors