Skip to content

AritmaPlay/aritmaplay-backend-api

Repository files navigation

AritmaPlay - C242-PS102

Table of Contents

  1. What is AritmaPlay?
  2. Technology
  3. Installation
  4. Database Configuration
  5. Running the Project
  6. API Endpoints

AritmaPlay

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.

Technology

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.

Installation

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

Database Configuration

The project uses MySQL as the database. Ensure that you have MySQL installed and running on your machine.

php artisan migrate

Running the Project

Start the server:

php artisan serve

The server will run on http://127.0.0.1:8000.

API Endpoints

Here are the available API endpoints for the AritmaPlay project:

User Management

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}

Quiz Management

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}

Leaderboard

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

Leaderboard Entry

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}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages