Welcome to the codebase for 360 Education, a web platform dedicated to providing free and easy access to official educational resources for students in Pakistan.
This project provides free access to official Punjab Curriculum & Textbook Board (PCTB) books, notes, past papers, and study materials for grades 9-12 (Matric & FSC), in both Urdu and English mediums. The goal is to create a centralized, user-friendly, and fast platform for students to find the resources they need for the 2025 new syllabus and beyond.
- Comprehensive Resource Hub: Access textbooks, notes, past papers, and model papers for grades 9, 10, 11, and 12.
- Blazing Fast PDF Viewer: A custom-built, in-browser PDF viewer powered by PDF.js with features like zoom, page navigation, and fullscreen mode.
- SEO Optimized: Thoroughly optimized with meta tags, canonical URLs, Open Graph/Twitter cards, and a sitemap for maximum search engine visibility.
- Fully Responsive: A clean, mobile-first design that works beautifully on all devices, from desktops to smartphones.
- Dynamic Content: Books and notes are fetched dynamically from an external API, making content updates seamless without code changes.
- Search & Filter: Easily search for specific books or notes on the downloads page.
- Accessibility Focused: Built with accessibility in mind, featuring skip links, ARIA labels, and semantic HTML.
- Newsletter Subscription: Integrated with Brevo API for users to subscribe to updates.
- Backend: Vanilla PHP
- Frontend: HTML5, CSS3 (with CSS Variables), Vanilla JavaScript
- Web Server: Apache (for
.htaccessclean URLs) - PDF Rendering: PDF.js
- APIs:
- Content API: Fetches file lists from a private endpoint on
360muslimexperts.com. - Newsletter: Brevo (formerly Sendinblue) API for managing email subscriptions.
- Content API: Fetches file lists from a private endpoint on
- A web server with PHP support (e.g., Apache, Nginx).
- Clone the repository to your local machine:
git clone https://github.com/ibtisam-shahid-kh/edu-360ME.git
- Place the project files in your web server's root directory (e.g.,
/var/www/html/orhtdocs/). - Create a
config.phpfile in the root directory by copying the example structure below. This file is ignored by Git to protect your secrets.<?php // config.php // Brevo API configuration for the newsletter define('BREVO_API_KEY', 'YOUR_BREVO_API_KEY'); define('BREVO_LIST_ID', YOUR_BREVO_LIST_ID); // This is a number
- Access the project via your local server URL (e.g.,
http://localhost/edu-360ME/).
This website functions as a client-side application and does not host the PDF files or the file listings itself. All content (lists of books and notes) is fetched from a private API endpoint:
https://360muslimexperts.com/panel/edu_api.php
This means that for the project to run, the live API must be accessible. The PDF files themselves are also hosted on the 360muslimexperts.com domain and are fetched via a proxy script.
The application includes several security measures:
- PDF Proxy: The
view-pdf.phpscript acts as a server-side proxy to fetch PDFs from the360muslimexperts.comdomain. This bypasses browser Cross-Origin (CORS) restrictions and prevents direct exposure of the source file path. - Security Headers: Standard security headers like
Content-Security-Policy,X-Frame-Options, andX-XSS-Protectionare set to mitigate common web vulnerabilities. - Input Sanitization: All user input (e.g.,
$_GETparameters) is sanitized using PHP filters to prevent XSS and other injection attacks. - Secret Management: The
config.phpfile, which contains API keys, is explicitly excluded from version control via.gitignore.
edu-360ME/
├── .htaccess # config for clear links
├── index.php # Homepage
├── books.php # Lists books by grade
├── notes.php # Lists notes by grade/subject
├── downloads.php # Lists all available content
├── view-pdf.php # The PDF.js viewer and proxy
├── sitemap.xml # Sitemap for SEO
├── robots.txt # Instructions for web crawlers
└── README.md # This file
includes
├── header.php # Shared header component
├── footer.php # Shared footer component (includes newsletter logic)
├── subscribe.php # Handles newsletter form submission
├── helpers.php # Utility functions (e.g., formatBytes)
├── config.php # (You must create this) API keys and secrets
├── breadcrumb.php
css
├── style.css
├── header-footer.css
├── view-pdf.css
Contributions are welcome! If you have suggestions for improvements, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
Please adhere to the existing code style and keep SEO and accessibility in mind.
This project is licensed under the MIT License.
- Primary Contact: Ibtisam Shahid
- Organization: 360 Muslim Experts
- WhatsApp: +92 321 2584393