This repository contains the back-end API server for the Asesmen PAUD Ainun Habibie mobile application. Built with AdonisJS, this server is specifically designed to handle all data operations and respond with JSON for the mobile front-end.
This API server is a core component of the "APAH" (Asesmen PAUD Ainun Habibie) project, developed as a final year thesis. It provides a robust and secure back-end to manage student data, handle various assessment types, and generate automated monthly reports, replacing the previous manual workflow for teachers.
- TypeScript First: Built with a strong TypeScript foundation for scalable and maintainable code.
- Lucid ORM: Integrated for powerful and elegant database interactions (PostgreSQL).
- Authentication: Secure API endpoints using AdonisJS Auth with access tokens.
- Validation: Robust data validation powered by VineJS.
- CORS: Pre-configured Cross-Origin Resource Sharing for secure communication with the mobile app.
To get a local copy up and running, follow these steps.
- Node.js
- pnpm (or npm/yarn)
- PostgreSQL
- Clone the repository
git clone https://github.com/PinKevin/APAH-API.git cd APAH-API - Install dependencies
pnpm i
- Setup environment variables
- Copy the example environment file:
cp .env.example .env
- Open the
.envfile and fill in your database credentials and any other required variables.
- Copy the example environment file:
- Generate application key
node ace generate:key
- Run database migrations
node ace migration:run
To start the development server with hot-reloading:
pnpm devTo build the application for production:
- Create the production build
pnpm build
- Navigate to build directory
cd build - Install production-only dependencie
pnpm install --prod
- Copy your
.envfile to thebuilddirectory and setNODE_ENV=production. - Start the production server
pnpm start
Instructions for running the application using Docker and Docker Compose.
- Ensure the
DB_HOSTin your.envfile is set to the Docker service name:asesmen-paud-postgresql. - Build the Docker image:
docker build -t your-image-name:latest . - Start the services and wait until all containers run:
docker-compose up -d
- If this is the first time you run the PostgreSQL container, in
asesmen-paud-postgresqlEXEC container menu or viadocker exec -it <hash-number> bash, do following commandpsql -U postgres, then the rest is on the psql terminalALTER ROLE postgres WITH PASSWORD <password>. Then set this password in.envfileexitexitagain if you're usingdocker exec
- In
asesmen-paudEXEC container menu or viadocker exec -it <hash-number> bash, do following commandnode ace migration:runnode ace migration:fresh --seed
© 2025 Drs. Eko Adi Sarwoko, M.Kom.; Emerio Kevin Aryaputra; Dr. Aris Puji Widodo, S.Si., M.T. All Rights Reserved.
The source code for this project is currently in the process of official copyright registration with the Directorate General of Intellectual Property, Ministry of Law and Human Rights of the Republic of Indonesia via Universitas Diponegoro Directorate of Innovation, Downstreaming, and Cooperation. Unauthorized use, reproduction, or distribution of this software is strictly prohibited.
This project is licensed under the MIT License - see the LICENSE file for details.