- What is AritmaPlay?
- Technology
- Installation
- Database Configuration
- Running the Project
- API Endpoints
This project aims to create an interactive mathematics learning application for elementary school children in Indonesia, utilizing handwriting recognition technology for solving math problems directly on screens. The application incorporates gamification, allowing children to earn experience points (EXP) for solving problems, with a leaderboard to boost motivation. It also features Gemini's generative AI, providing encouraging feedback to foster a positive learning atmosphere. Focused on basic math operations like addition, subtraction, multiplication, and division, the app offers a fun, engaging, and educational alternative to social media, enhancing math literacy and promoting positive digital behavior among children.
The AritmaPlay project is built using the following technologies:
PHP: A widely-used scripting language designed for server-side web development, capable of creating dynamic and interactive web pages.
Laravel: A popular PHP framework with a focus on simplicity and elegance, providing tools for routing, authentication, and database management.
MySQL: A reliable and fast relational database management system commonly used for managing structured data in web applications.
Sanctum: A lightweight Laravel package for API authentication, supporting SPAs, mobile apps, and token-based APIs with simplicity.
Bcrypt: A secure hashing library for passwords, offering built-in salting and resistance to brute-force attacks.
To set up the project locally, follow these steps:
Clone the repository:
git clone https://github.com/AritmaPlay/aritmaplay-backend-api
Install the dependencies:
composer install
npm install
Edit a .env file in the root directory and add the following environment variables:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
CLOUD_SCHEDULER_TOKEN=your_cloud_scheduler_token
The project uses MySQL as the database. Ensure that you have MySQL installed and running on your machine.
php artisan migrate
Start the server:
php artisan serve
The server will run on http://127.0.0.1:8000.
Here are the available API endpoints for the AritmaPlay project:
Register a new user:
POST /api/register
Login a user:
POST /api/login
Logout a user:
POST /api/logout
Get all user:
GET /api/user
Get user details:
GET /api/user/{id}
Create a quiz:
POST /api/quiz
Get all quiz:
GET /api/quiz
Get an quiz by ID:
GET /api/quiz/{id}
Get an quiz by user ID:
GET /api/quiz/user/{id}
Create a leaderboard:
POST /api/leaderboard
Get all leaderboard:
GET /api/leaderboard
Get an leaderboard by ID:
GET /api/leaderboard/{id}
Get active leaderboard:
GET /api/leaderboard-active
Change now active leaderboard to inactive and create new active leaderboard
POST /run-scheduled-task
Create a leaderboard entry:
POST /api/leaderboard-entry
Get all leaderboard:
GET /api/leaderboard-entry
Get an leaderboard by ID:
GET /api/leaderboard-entry/{id}