@armoyu/core
v1.1.66
Published
Core business logic, models, and services for ARMOYU platforms.
Downloads
1,343
Readme
🚀 ARMOYU Core Library
ARMOYU Core is the powerful, type-safe business logic layer designed for the ARMOYU ecosystem. It provides unified access to authentication, social interactions, community management, and real-time events across both legacy PHP backends and modern microservices.
✨ Features
- 🛡️ 100% Type Safe: Built from the ground up with TypeScript for a rock-solid developer experience.
- 🧩 Modular Architecture: 28+ specialized services covering everything from Chat to Staff management.
- ⚡ Real-time Ready: Built-in support for SocketService for instant messaging and notifications.
- 🔄 Legacy Bridge: Seamlessly communicates with legacy bot APIs with automated path resolution and response handling.
- 📦 Zero Bloat: Minimal dependencies, focused purely on data and business logic.
📦 Installation
npm install @armoyu/core🚀 Quick Start
Initialize the ARMOYU API based on your environment.
🌐 Option A: For Web Apps (Secure Proxy)
Recommended for frontend applications to hide the API Key.
import { ARMOYUCore } from "@armoyu/core";
const api = ARMOYUCore.initForProxy("/api/proxy");🤖 Option B: For Bots (Direct Access)
Used in backend scripts or mobile apps where direct API access is needed.
import { ARMOYUCore } from "@armoyu/core";
const api = ARMOYUCore.initForBot("YOUR_API_KEY");// 2. Authenticate const { user, session } = await api.auth.login('username', 'password');
// 3. Interact with services
const staff = await api.staff.getStaff(1, 'okul-temsilcileri');
console.log(There are ${staff.length} school representatives! 🎓);
// 4. Fetch geographical data const countries = await api.locations.getCountries(1);
// 5. Payments & Billing const invoices = await api.payments.getInvoices();
// 6. Social interactions const feed = await api.social.getPosts({ category: 'sosyal' });
---
## 🏗️ Services Overview
| Service | Category | Description |
| :--- | :--- | :--- |
| **AuthService** | Identity | Login, Registration, and Session lifecycle. |
| **SocialService** | Community | Posts, Comments, Likes, and Shares. |
| **StoryService** | Social | Professional story/status management. |
| **ChatService** | Communication | Real-time messaging and chat history. |
| **UserService** | Profile | Global player profiles, Friendships, and Media. |
| **MusicService** | Content | Audio search, Playlists, and Favorites. |
| **ReelsService** | Content | Short-form video content management. |
| **MediaService** | Content | User gallery, Photo rotation, and Cloud storage. |
| **SearchService** | Search | Unified multi-content search (Players, Groups, Schools). |
| **EventService** | Esports | Tournaments, Match details, and Participant rosters. |
| **SiteInformationService** | Meta | Site-wide communications and Statistics. |
| **ManagementService** | Admin | Internal platform management and monitoring. |
| **StaffService** | Management | Official team list and recruitment applications. |
| **LocationService** | Geography | Global countries and Provinces/Cities lookups. |
| **PaymentService** | Billing | Invoices, Payments, and Financial records. |
| **PollService** | Community | Interactive surveys and voting management. |
| **BlockService** | Security | User blacklists and interaction restrictions. |
| **StationService** | Business | Hobby units, Menu/Equipment, and Locations. |
| **TeamService** | Content | Official sports and community teams. |
| **ProjectService** | Content | Development projects and scoreboards. |
| **BusinessService** | Economy | Workplace and school participation. |
| **ForumService** | Content | Community discussions and Category management. |
| **GroupService** | Social | Clan management, Invites, and Group settings. |
| **SupportService** | Meta | Platform tickets and User assistance. |
| **RuleService** | Legal | Platform guidelines and Automated rules. |
| **SocketService** | Infrastructure | WebSocket connection management. |
---
## 🎨 Architecture Standards
All services in this library adhere to a strict modernization standard (Audited v1.1.2+):
- Inheritance from `BaseService`.
- Standardized logging via `ArmoyuLogger`.
- Robust error handling via `handleResponse`.
- Full JSDoc documentation for all public methods.
---
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
<p align="center">
Developed with ❤️ by the <b>ARMOYU Development Team</b>.<br/>
"Aramızdaki Oyuncuyu Keşfet"
</p>