This project implements a web-based system for managing an International Mathematics Competition for primary school children.
The International Education Services Mathematics Competition System is designed to facilitate a nationwide mathematics competition for primary school students. It allows for the registration of schools and participants, the management of competition challenges, and the reporting of results and analytics. The system is composed of three main components:
- Client Application (Java) - Command-line interface (CLI) for participants and school representatives.
- Server Application (Java) - Manages file and database operations for the CLI.
- Web Interface (PHP, Laravel Framework) - Admin portal for managing the competition, uploading questions and answers, and generating reports.
- Features
- System Components
- Database Design
- Installation
- Usage
- API Endpoints
- Reports and Analytics
- Contributing
- License
- School registration and validation
- Question and answer management
- Challenge management
- Participant registration and validation
- Challenge participation with random question selection
- Automated scoring and reporting
- Comprehensive analytics and reports
The client application is a Java-based command-line interface (CLI) for participants and school representatives.
- Register:
register username firstname lastname email date_of_birth school_registration_number image_file.png
- ViewChallenges: Lists available challenges.
- AttemptChallenge: Start a challenge.
- ViewResults: View results of attempted challenges.
The server application is responsible for file and database operations and is also developed in Java.
- Store and manage participant, school, and challenge data.
- Handle file uploads (questions and answers).
- Send email notifications for registration confirmation and result reports.
- Randomly select questions for challenges.
- Calculate scores and generate reports.
The web interface is built using the PHP Laravel framework and serves as the admin portal.
- Upload schools, questions, and answers.
- Set challenge parameters.
- View and manage participant data.
- Generate reports and analytics.
The system uses a relational database with the following tables:
-
Schools
school_id
(Primary Key)name
district
registration_number
representative_name
representative_email
-
Participants
participant_id
(Primary Key)username
firstname
lastname
email
date_of_birth
school_id
(Foreign Key)status
(Pending, Confirmed, Rejected)
-
Challenges
challenge_id
(Primary Key)name
start_date
end_date
duration
num_questions
-
Questions
question_id
(Primary Key)challenge_id
(Foreign Key)question_text
answer
marks
-
Attempts
attempt_id
(Primary Key)participant_id
(Foreign Key)challenge_id
(Foreign Key)score
time_taken
attempt_date
-
Results
result_id
(Primary Key)attempt_id
(Foreign Key)question_id
(Foreign Key)given_answer
marks_awarded
-
RejectedParticipants
rejected_id
(Primary Key)username
school_id
(Foreign Key)reason
- Java Development Kit (JDK)
- Apache Maven
- PHP and Composer
- Laravel Framework
- MySQL or another relational database
-
Clone the repository:
git clone https://github.com/joshuamumbere/International-Mathematics-Competition-System.git cd International-Mathematics-Competition-System
-
Set up the database:
- Create a database named
math_competition
. - Run the SQL scripts in the
db
directory to set up the tables:
CREATE DATABASE math_competition;
- Create a database named
-
Configure the server application Update the
config.properties
file with your database credentialsdb.url=jdbc:mysql://localhost:3306/math_competition db.username=your_db_username db.password=your_db_password email.smtp.server=smtp.your-email-provider.com email.smtp.port=587 email.username=your_email@example.com email.password=your_email_password
-
Build and run the server application
cd server mvn clean install java -jar target/server.jar
-
Set up the web interface:
cd web composer install cp .env.example .env php artisan key:generate
-
Update the
.env
file with your database and email server credentials:DB_CONNECTION=mysql DB_HOST =127.0.0.1 DB_PORT =3306 DB_DATABASE=math_competition DB_USERNAME =your_db_username DB_PASSWORD =your_db_password MAIL_MAILER =smtp MAIL_HOST =smtp.your-email-provider.com MAIL_PORT = 587 MAIL_USERNAME =your_email@example.com MAIL_PASSWORD =your_email_password MAIL_ENCRYPTION= tls MAIL_FROM_ADDRESS= your_email@example.com MAIL_FROM_NAME ="${APP_NAME}"
-
Run the database migrations to set up the values
php artisan migrate
-
Serve the application
php artisan serve
CLI Commands
- Register a participant:
register username firstname lastname email date_of_birth school_registration_number image_file.png
- View available challenges:
viewChallenges
- Attempt a challenge:
attemptChallenge challengeNumber
- View results of attempted challenges:
viewResults
- Upload Schools(POST
/admin/upload-schools
): - Upload Questions(POST
/admin/upload-questions
): - Upload Answes(POST
/admin/upload-answers
): - Set Challenge Parameters(POST
/admin/set-challenge-params
):
Most Correctly Answered Questions School Rankings Performance of Schools and Participants Over Time List of Worst Performing Schools List of Best Performing Schools List of PArticipants with Incomplete Challenges
I welcome contributions! Please follow these steps:
1.Fork the repository
2.Create a new branch(git checkout -b feature-branch
)
3.Make your changes
4.Commit your changes(git commit -m 'Added some feature'
)
5.Push to the branch(git push origin feature-branch
)
6.Open a pull request.
This project is licensed under the MIT License. Feel free to use and modify this template for your own recess projects.