Skip to content

FlorianLeChat/GmodStore-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

đŸ“„ GmodStore Downloader

In French

Introduction

Ce petit site Internet permet de tĂ©lĂ©charger des addons depuis le GmodStore sans passer par l’interface en ligne, mais en s'appuyant sur son API. Cette solution est particuliĂšrement utile lorsqu'un propriĂ©taire de compte souhaite offrir Ă  des tiers la possibilitĂ© de tĂ©lĂ©charger ses addons créés ou achetĂ©s, sans leur communiquer ses identifiants de connexion. C'est une alternative sĂ©curisĂ©e aux « accĂšs secondaires ». Le propriĂ©taire doit simplement gĂ©nĂ©rer un jeton d'accĂšs avec des permissions limitĂ©es, qu'il pourra ensuite partager avec les personnes autorisĂ©es.

Les jetons peuvent ĂȘtre gĂ©nĂ©rĂ©s Ă  cette adresse : https://www.gmodstore.com/settings/personal-access-tokens. Ils doivent comporter les autorisations suivantes : products:read, product-versions:read, product-versions:download, users:read et user-purchases:read. Une fois créés, le site Internet vous indique la dĂ©marche Ă  suivre.

Auparavant, ce projet Ă©tait dĂ©veloppĂ© en PHP 🐘 (disponible via la branche no-svelte), car l'API GmodStore avait restreint les en-tĂȘtes CORS, empĂȘchant toute communication directe depuis un navigateur. Depuis, cette restriction a Ă©tĂ© levĂ©e, ce qui permet dĂ©sormais d'utiliser le framework Svelte đŸ”„ pour interagir directement avec leur API. Cette migration a supprimĂ© la nĂ©cessitĂ© d'un serveur intermĂ©diaire, amĂ©liorant ainsi la confidentialitĂ© des donnĂ©es en exĂ©cutant l'intĂ©gralitĂ© du site Internet cĂŽtĂ© client, tout en optimisant ses performances.

Important

L'entiĂšretĂ© du code de ce projet est commentĂ© dans ma langue natale (en français) et n'est pas vouĂ© Ă  ĂȘtre traduit en anglais par soucis de simplicitĂ© de dĂ©veloppement.

Installation

Warning

Le déploiement en environnement de production nécessite un serveur Web déjà configuré comme Nginx, Apache ou Caddy pour servir les fichiers statiques générés par Vite.

Développement local

  • Installer NodeJS LTS (>20 ou plus) ;
  • Installer les dĂ©pendances du projet avec la commande npm install ;
  • DĂ©marrer le serveur local Vite avec la commande npm run dev.

Déploiement en production

  • Installer NodeJS LTS (>20 ou plus) ;
  • Installer les dĂ©pendances du projet avec la commande npm install ;
  • Compiler les fichiers statiques du site Internet avec la commande npm run build ;
  • Utiliser un serveur Web pour servir les fichiers statiques gĂ©nĂ©rĂ©s Ă  l'Ă©tape prĂ©cĂ©dente.

Tip

Pour tester le projet, vous pouvez Ă©galement utiliser Docker. Une fois installĂ©, il suffit de lancer l'image Docker de dĂ©veloppement Ă  l'aide de la commande docker compose up --detach --build. Le site devrait ĂȘtre accessible Ă  l'adresse suivante : http://localhost:5173/. Si vous souhaitez travailler sur le projet avec Docker, vous devez utiliser la commande docker compose watch --no-up pour que vos changements locaux soient automatiquement synchronisĂ©s avec le conteneur. 🐳

Caution

L'image Docker ne peut pas et n'a pas Ă©tĂ© conçue pour fonctionner dans un environnement de production. Ce projet gĂ©nĂšre des fichiers statiques que vous devez servir avec un serveur Web dĂ©jĂ  configurĂ© et respectant aux bonnes pratiques de sĂ©curitĂ© et d'optimisation. ⚠

Ce site Internet n'est en aucun cas affilié à GmodStore, à l'exception du fait que j'utilise leur formidable API pour vous fournir ce service.

In English

Introduction

This small website lets you download addons from the GmodStore without using the online interface, but by relying on its API. This is particularly useful when an account owner wants to offer third parties a way to download created or purchased addons, without providing personal credentials. It's a secure alternative to "secondary access". The owner simply needs to generate an access token with limited permissions, which can then be shared with authorized persons.

Tokens can be generated at this address: https://www.gmodstore.com/settings/personal-access-tokens. They must have the following permissions: products:read, product-versions:read, product-versions:download, users:read and user-purchases:read. Once created, the website tells you what to do.

Previously, this project was developed in PHP 🐘 (available through the no-svelte branch), because the GmodStore API restricted CORS headers, preventing direct communication from a browser. This restriction has since been removed, allowing usage of Svelte đŸ”„ framework to communicate directly with their API. This migration has eliminated need for an intermediary server, improving data privacy by running the entire website client-side, while optimizing its performance.

Important

The whole code of this project is commented in my native language (in French) and will not be translated in English for easier programming.

Setup

Warning

Deployment in a production environment requires a pre-configured web server such as Nginx, Apache, or Caddy to serve the static files generated by Vite.

Local development

  • Install NodeJS LTS (>20 or higher) ;
  • Install project dependencies using npm install ;
  • Start Vite local server using npm run dev.

Production deployment

  • Install NodeJS LTS (>20 or higher) ;
  • Install project dependencies using npm install ;
  • Build static website files using npm run build ;
  • Remove development dependencies using npm prune --production ;
  • Use a web server to serve the static files generated in the previous step.

Tip

To try the project, you can also use Docker installed. Once installed, simply start the development Docker image with docker compose up --detach --build command. The website should be available at http://localhost:5173/. If you want to work on the project with Docker, you need to use docker compose watch --no-up to automatically synchronize your local changes with the container. 🐳

Caution

The Docker image cannot and was not designed to run in a production environment. This project generates static files that must be served with a pre-configured web server adhering to security and optimization best practices. ⚠

This website is in no way affiliated with GmodStore, except that I use their amazing API to provide you this service.

image

Packages

 
 
 

Contributors 3

  •  
  •  
  •