{"id":26376575,"url":"https://github.com/itssheldondev/getmefixed-api","last_synced_at":"2025-03-17T03:18:07.048Z","repository":{"id":280538193,"uuid":"942337606","full_name":"ItsSheldonDev/GetMeFixed-API","owner":"ItsSheldonDev","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-04T00:42:05.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T01:27:15.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItsSheldonDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-03-04T00:32:22.000Z","updated_at":"2025-03-04T00:42:08.000Z","dependencies_parsed_at":"2025-03-04T01:37:25.046Z","dependency_job_id":null,"html_url":"https://github.com/ItsSheldonDev/GetMeFixed-API","commit_stats":null,"previous_names":["itssheldondev/getmefixed-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsSheldonDev%2FGetMeFixed-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsSheldonDev%2FGetMeFixed-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsSheldonDev%2FGetMeFixed-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsSheldonDev%2FGetMeFixed-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsSheldonDev","download_url":"https://codeload.github.com/ItsSheldonDev/GetMeFixed-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243965762,"owners_count":20375920,"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","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-03-17T03:18:06.530Z","updated_at":"2025-03-17T03:18:07.043Z","avatar_url":"https://github.com/ItsSheldonDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GetMeFixed API - Système de gestion de licences\n\nAPI NestJS pour la gestion de licences logicielles et de plugins, permettant de gérer des clés de licence, des plans, et des plugins pour vos applications.\n\n## Fonctionnalités\n\n- **Authentification** avec JWT et refresh tokens\n- **Gestion de licences** avec validation et suivi\n- **Plans de licences** configurables avec différents niveaux\n- **Gestion de plugins** pour étendre les fonctionnalités\n- **Consommation de jetons** pour les fonctionnalités premium \n- **Système de heartbeat** pour surveiller l'activité des licences\n- **Documentation Swagger** complète et interactive\n- **Mise en cache Redis** pour améliorer les performances\n- **Architecture modulaire** pour une maintenance facile\n\n## Prérequis\n\n- Node.js (v14 ou supérieur)\n- PostgreSQL\n- Redis\n- Docker (optionnel)\n\n## Installation\n\n```bash\n# Cloner le dépôt\ngit clone https://votre-repo/getmefixed-api.git\ncd getmefixed-api\n\n# Installation des dépendances\nnpm install\n\n# Configuration de l'environnement\ncp .env.example .env\n# Puis éditez le fichier .env avec vos configurations\n\n# Migration de la base de données\nnpm run db:migrate\n\n# Création d'un administrateur par défaut\nnpm run seed:admin\n```\n\n## Configuration\n\nConfigurez votre application en modifiant le fichier `.env` :\n\n```\n# Base de données\nDATABASE_URL=\"postgresql://postgres:postgres@localhost:5432/getmefixed?schema=public\"\n\n# JWT\nJWT_SECRET=\"change-this-to-a-secure-random-string\"\nJWT_EXPIRES_IN=\"1h\"\nREFRESH_TOKEN_EXPIRES_IN=\"7d\"\n\n# Redis\nREDIS_URL=\"redis://localhost:6379\"\n\n# Serveur\nPORT=3000\nNODE_ENV=development\n```\n\n## Lancement\n\n```bash\n# Mode développement\nnpm run start:dev\n\n# Mode production\nnpm run build\nnpm run start:prod\n```\n\n## Docker\n\nUn `docker-compose.yml` est fourni pour faciliter le déploiement :\n\n```bash\n# Lancement avec Docker Compose\ndocker-compose up -d\n```\n\nCela lancera :\n- L'API NestJS\n- PostgreSQL\n- Redis\n\n## Scripts utiles\n\n```bash\n# Développement\nnpm run start:dev    # Lancer en mode développement avec hot reload\n\n# Base de données\nnpm run db:migrate   # Appliquer les migrations\nnpm run db:reset     # Réinitialiser la base de données\nnpm run seed:admin   # Créer un administrateur par défaut\n\n# Production\nnpm run build        # Construire pour la production\nnpm run start:prod   # Lancer en mode production\n```\n\n## Structure de l'API\n\nL'API est organisée selon une architecture modulaire :\n\n- `/api/v1/auth` - Authentification et gestion des tokens\n- `/api/v1/licenses` - Gestion des licences\n- `/api/v1/license-plans` - Gestion des plans de licence\n- `/api/v1/plugins` - Gestion des plugins\n- `/api/v1/public` - Points d'accès publics pour les clients\n\n## Documentation API\n\nLa documentation Swagger est disponible à l'adresse : http://localhost:3000/api/docs\n\n## Exemples d'utilisation\n\n### Authentification\n\n```bash\ncurl -X POST http://localhost:3000/api/v1/auth/login \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\":\"admin@getmefixed.com\",\"password\":\"admin123\"}'\n```\n\n### Générer une licence\n\n```bash\ncurl -X POST http://localhost:3000/api/v1/licenses/generate \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer VOTRE_TOKEN\" \\\n  -d '{\n    \"planId\": \"id-du-plan\",\n    \"expirationDate\": \"2025-12-31T23:59:59Z\",\n    \"customerId\": \"client-123\"\n  }'\n```\n\n### Valider une licence (endpoint public)\n\n```bash\ncurl -X POST http://localhost:3000/api/v1/public/validate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"licenseKey\": \"GMF-2025-BSC-A1B2C3D4\",\n    \"machineId\": \"machine-123\"\n  }'\n```\n\n## Licence\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitssheldondev%2Fgetmefixed-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitssheldondev%2Fgetmefixed-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitssheldondev%2Fgetmefixed-api/lists"}