How stefantudor/on-school-web-application works
Project Type and Overall Purpose
• This project is a full-stack web application that serves as a digital classroom solution.
• It has multiple modules aimed at different user groups (for example, general presentation vs. school-specific functionality) and even incorporates an intelligent chatbot component (implemented in Python) to assist in some interactions.
• The README hints at a digital classroom system, so expect functionalities like user logins, schedules, news, chat, and potentially education management features.
Key Directories and File Structure
• There are two main “apps” modules:
• The “apps/presentation” module appears designed for general site presentation. It follows an MVC-like pattern with dedicated files for controllers (data, registration), models, and viewers (templates including header, footer, homepage, and registration pages).
• The “apps/school” module is a more specific application area (likely for school administrative tasks, teacher/parent interfaces, and student functionalities). It also uses an MVC pattern, with multiple controllers for roles such as login, teacher, parent, and a wide range of viewers providing different layouts and partial views (e.g., different menus and footers).
• The “chatbotBrain” directory contains Python scripts and files that appear to handle chatbot functionalities. This includes:
• Training scripts (train.py, searchWiki.py, ask.py) – which indicate machine learning model training and query handling.
• Model files generated by TensorFlow/TFLearn (model.tflearn.*) and associated training data (train.labels, train.words).
• A server file (server.py) that could act as an independent microservice.
• Other important folders:
• “assets” contains static resources such as CSS, JavaScript, and images for the frontend.
• “includes” provides common PHP functions (functions.php and a JSON file for intents) shared across the application.
• The root index.php likely serves as the front controller or landing page tying everything together.
Main Components and Their Interactions
• Client/Web Browser: Initiates requests via the root (index.php) and interacts with frontend assets.
• Presentation Module (apps/presentation):
• Handles general public views and user registrations.
• Utilizes controllers for data handling and registration.
• Renders content through viewers and partial template files (header, footer, etc.).
• School Module (apps/school):
• Provides more specialized interfaces for school-related operations (login, calendar, note viewing, teacher/parent portals, etc.).
• Contains API endpoints (e.g., api-chatbot.php, api-train-chatbot.php) to integrate with external functionality – likely connecting to or invoking the chatbotBrain service.
• Follows the MVC pattern similarly to the presentation module.
• Chatbot Service (chatbotBrain):
• A distinct service built in Python, handling chatbot interactions.
• Responsible for processing natural language queries, training models, and replying to API calls from the main PHP application.
• May interact with external resources (like Wikipedia via searchWiki.py) for enriched responses.
• Shared Components:
• “includes” offer common functions and configurations.
• “assets” are statically served to ensure consistency in UI/UX across modules.
Instructing Specific Elements
• If possible, annotate any communication protocols or key integration points (e.g., HTTP REST calls between server and chatbot microservice).