This repository contains the server-side code for the Yademan application, a flash-card based learning tool for high school students in Iran, based on the Leitner system.
The server is built with PHP and provides a RESTful API for the client application. It handles user authentication, data storage, and the core logic of the Leitner learning system. The server manages student data, flashcards, quizzes, and interactions with advisers.
- User Management: Sign up, login, and profile management for students and advisers.
- Leitner System: Manages flashcards, scheduling, and learning progress.
- Quiz System: Provides quizzes and tracks user performance.
- Adviser Interaction: Allows students to request and interact with advisers.
- Competitions: A feature for students to compete with each other.
- A web server with PHP support (e.g., Apache, Nginx).
- A MySQL database.
- Clone the repository:
git clone https://github.com/M-amin-s/Yademan-Server.git
- Database Configuration:
- The database connection details are hardcoded in several files (e.g.,
public_html/Leitner/Connection.php,public_html/last/Competitions/QuizQuestions.php). You will need to update these files with your database credentials. - The required database schema is not provided in this repository. You will need to create the necessary tables based on the SQL queries in the source code.
- The database connection details are hardcoded in several files (e.g.,
- Deploy the code:
- Copy the contents of the
public_htmldirectory to the root of your web server.
- Copy the contents of the
The server exposes a variety of API endpoints. Here is a brief overview of the main functionalities:
addStudentCards.php: Adds or updates student flashcards.buy.php: Handles lesson purchases.deleteStudent.php: Deletes a student's account.deleteStudentCards.php: Deletes student flashcards.discount.php: Validates discount codes.edit.php: Updates user profile information (password, email).email-signup.php: Handles user registration via email.forgotPassword.php: Handles password recovery.getBudget.php: Updates a student's budget.login.php: Handles user login.notification.php: Provides notifications.sendArray.php: Sends a predefined array of budget values.sendQuizes.php: Sends a list of all quizzes.sendStudentCards.php: Sends a student's flashcards.signup.php: Handles user registration via phone number.sms.php: Sends a verification SMS.updateBudget.php: Updates a user's budget.updateStudentCards.php: Updates a single student flashcard.verify.php: Handles email verification.
Competitions/: Contains scripts for managing competitions.QAquestionSend.php: Sends a list of Q&A questions.QuestionsSend.php: Retrieves questions for a user.RequestResult.php: Processes the result of an adviser request.RequestsSend.php: Retrieves pending requests for an adviser.findAdviser.php: Searches for advisers.form.php: Updates user profile information.getImage.php: Saves a user's profile image.sendImage.php: Retrieves a user's profile image.updateAdvisorAnswer.php: Updates a question with an adviser's answer.
The client-side code and documentation for the Yademan application can be found in the following repository: Yademan Client