- 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-apiInstall the dependencies:
composer install
npm installEdit 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_tokenThe project uses MySQL as the database. Ensure that you have MySQL installed and running on your machine.
php artisan migrateStart the server:
php artisan serveThe 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/registerLogin a user:
POST /api/loginLogout a user:
POST /api/logoutGet all user:
GET /api/userGet user details:
GET /api/user/{id}Create a quiz:
POST /api/quizGet all quiz:
GET /api/quizGet an quiz by ID:
GET /api/quiz/{id}Get an quiz by user ID:
GET /api/quiz/user/{id}Create a leaderboard:
POST /api/leaderboardGet all leaderboard:
GET /api/leaderboardGet an leaderboard by ID:
GET /api/leaderboard/{id}Get active leaderboard:
GET /api/leaderboard-activeChange now active leaderboard to inactive and create new active leaderboard
POST /run-scheduled-taskCreate a leaderboard entry:
POST /api/leaderboard-entryGet all leaderboard:
GET /api/leaderboard-entryGet an leaderboard by ID:
GET /api/leaderboard-entry/{id}