{"id":25399203,"url":"https://github.com/vsrstudio/topuprankapi","last_synced_at":"2025-08-01T10:04:18.988Z","repository":{"id":269381434,"uuid":"907236117","full_name":"VsrStudio/TopupRankAPI","owner":"VsrStudio","description":"Integrasi Website Otomatis","archived":false,"fork":false,"pushed_at":"2024-12-23T06:53:03.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T21:36:27.439Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VsrStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-23T06:18:00.000Z","updated_at":"2024-12-23T07:30:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1f47513-1428-423d-bc25-35143c1d8698","html_url":"https://github.com/VsrStudio/TopupRankAPI","commit_stats":null,"previous_names":["vsrstudio/topuprankapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VsrStudio/TopupRankAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VsrStudio%2FTopupRankAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VsrStudio%2FTopupRankAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VsrStudio%2FTopupRankAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VsrStudio%2FTopupRankAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VsrStudio","download_url":"https://codeload.github.com/VsrStudio/TopupRankAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VsrStudio%2FTopupRankAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268205718,"owners_count":24212999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-15T23:37:45.149Z","updated_at":"2025-08-01T10:04:18.967Z","avatar_url":"https://github.com/VsrStudio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TopupRankAPI\n\nTopupRankAPI is a simple API for managing the rank top-up system. It allows users to top-up ranks through a web interface and view transaction histories. This project is designed to integrate with Minecraft server systems, particularly to manage player ranks in a convenient way.\n\n# Plugin For Pocketmine-MP\n[TopupRank](https://github.com/VsrStudio/TopupRank)\n\n## Features\n\n- **Top-up ranks**: Allows users to top-up their ranks.\n- **Transaction history**: Users can view their transaction history for ranks they have purchased.\n- **Admin dashboard**: Admins can manage all transactions and view detailed user data.\n- **Authentication**: Secure login system for both users and admins.\n- **API integration**: Easily integrates with your Minecraft server for rank management.\n\n## Requirements\n\n- PHP 7.4 or later\n- MySQL or MariaDB for database storage\n- cURL enabled for API communication\n- A web server like Apache or Nginx\n\n## Installation\n\n### 1. Clone the repository\nClone this repository to your local machine or server.\n\n```bash\ngit clone https://github.com/VsrStudio/TopupRankAPI.git\n```\n## 2. Set up the database\n\nImport the provided db.sql file into your MySQL database.\n```sql\nCREATE DATABASE topuprank;\nUSE topuprank;\n\n-- Users Table\nCREATE TABLE users (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    username VARCHAR(50) NOT NULL UNIQUE,\n    password VARCHAR(255) NOT NULL,\n    role ENUM('user', 'admin') DEFAULT 'user',\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Transactions Table\nCREATE TABLE transactions (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    username VARCHAR(50) NOT NULL,\n    rank VARCHAR(20) NOT NULL,\n    status VARCHAR(20) NOT NULL,\n    message TEXT,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    FOREIGN KEY (username) REFERENCES users(username)\n);\n\n-- Insert default admin\nINSERT INTO users (username, password, role) VALUES \n('admin', '$2y$10$HqvV/Uo5PfT7v6xlGeKPhui.kkKQn.XkgBQnnBoBTcKHb94QH4bsq', 'admin'); -- Password: admin123\n```\n\n## 3. Configuration\n\nUpdate the database connection settings in includes/db.php to match your local or server configuration.\n```php\n$host = 'localhost'; \n$user = 'your_username';\n$pass = 'your_password';\n$dbname = 'topuprank';\n```\n## 4. Set up API keys\n\nTo secure the API, ensure that the API key is set properly in api/middleware.php.\n```php\nif (!isset($headers['Authorization']) || $headers['Authorization'] !== 'Bearer your_api_key') {\n    http_response_code(403);\n    echo json_encode(['message' =\u003e 'Forbidden']);\n    exit();\n}\n```\nReplace 'your_api_key' with a secure key.\n\n## 5. Deploy the application\n\nUpload the files to your server or local environment. Ensure that your web server is configured correctly to serve the application.\n\n# Usage\n- 1. User Interface\nUsers can visit the web interface at index.php to log in or sign up.\nAfter logging in, users can top-up their ranks and view their transaction history.\n\n- 2. Admin Dashboard\nAdmins can log in via admin/login.php and access the dashboard to view all transactions.\n\n- 3. API Requests\nTo interact with the API, send POST requests to api/middleware.php with the correct API key.\nExample POST request for top-up:\n```php\ncurl -X POST -H \"Authorization: Bearer your_api_key\" -d \"username=user1\u0026rank=VIP\" https://yourdomain.com/api/middleware.php\n```\n## Contributing\n\n1. Fork the repository.\n2. Create a new branch (git checkout -b feature-name).\n3. Commit your changes (git commit -am 'Add feature').\n4. Push to the branch (git push origin feature-name).\n5. Create a new Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsrstudio%2Ftopuprankapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsrstudio%2Ftopuprankapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsrstudio%2Ftopuprankapi/lists"}