Skip to main content

Le Play Store du Terminal — client TUI Textual + backend FastAPI

Project description

StoreApp.TUI v3.0

Le Play Store du Terminal — une TUI immersive style Google Play pour découvrir, télécharger, installer et publier des applications en ligne de commande.


Aperçu rapide

 _____ ___  ___  ____  _____   _   ____  ____
/ ____|  _||   ||  _ \|  ___| / \ |  _ \|  _ \
\___ \ | |_|   || |_) |  _|  / _ \| |_) | |_) |
 ___) ||  _|   ||  _ <| |___/ ___ \  __/|  __/
|____/ |_| \___||_| \_\|____/_/   \_\_|  |_|

✦  Le Play Store du Terminal  ✦

socket

Backend public : https://storeapp-7mbo.onrender.com
Python requis : 3.9+
OS : Linux · macOS · Windows (WSL recommandé)


Installation

Option 1 — Script automatique (recommandé)

git clone https://github.com/gopu-inc/store-app.git
cd store-app
bash install.sh

Options disponibles :

Flag Effet
(aucun) Installe uniquement le client TUI
--dev Client + dépendances serveur (développement local)
--server Dépendances serveur uniquement
--uninstall Supprime l'installation complète

Option 2 — Manuelle

# 1. Cloner
git clone https://github.com/gopu-inc/store-app.git
cd store-app

# 2. Dépendances
pip install textual>=0.50.0 rich>=13.0.0 httpx>=0.27.0

# 3. (Optionnel) Installer le package
pip install -e .

Option 3 — pip (quand publié sur PyPI)

pip install storeapp-tui

Lancement

# Via l'entry-point installé
store

# Directement depuis le dépôt
cd store && python store.py

# Avec un serveur personnalisé
STOREAPP_API_URL=http://localhost:8000 store

Fonctionnalités v3.0

Écran Accueil — style Play Store

Zone Description
Top bar Logo + barre de recherche intégrée + nom d'utilisateur connecté
Catégories Chips scrollables : Tout / Python / Node / Go / Rust / Bash…
Carousel "En vedette" 6 cartes riches (icône env, auteur, note ★, téléchargements) — cliquables
Liste Applications DataTable avec icônes d'environnement, notes colorées, highlight de recherche
Barre de nav Accueil · Parcourir · Publier · Profil

Écran Parcourir — recherche avancée

Fonctionnalité Détail
Live search Recherche dès 2 caractères tapés, sans appuyer Entrée
Highlight Correspondances surlignées dans le nom et la description
Filtres Env Chips : Tout / Python / Node / Go / Rust…
Tri Pertinence · Note ↓ · Téléchargements ↓ · Récent
Statut serveur Indicateur ● vert/rouge (ping Render en temps réel)

Écran Détail — TabbedContent

Onglet Contenu
📋 Informations Nom, bundle, version, auteur, description, dépendances, permissions
📖 README Rendu Markdown du README de l'application
📸 Médias Icône pixel art (.pxl) + carousel de screenshots
⭐ Avis Liste des notes et commentaires utilisateurs

Installation automatique

Le bouton ⚙ Installer :

  1. Télécharge le .tpkg dans ~/.storeapp/downloads/
  2. Extrait l'archive dans ~/.storeapp/tmp_store/<bundle>/
  3. Détecte et exécute postinstall.sh automatiquement
  4. Affiche la progression et les logs en temps réel

Autres écrans

Écran Description
Login ASCII art banner · Connexion + Inscription · Session persistante
Publier Upload .tpkg avec validation en temps réel

Raccourcis clavier

Touche Action
Ctrl+H Accueil
Ctrl+B Parcourir
Ctrl+P Publier
Ctrl+Q Quitter
Escape Retour / Fermer dialog
1 – 5 Sélectionner une note (dialog de notation)
F5 Rafraîchir l'écran courant
Tab / Shift+Tab Naviguer entre les champs

Architecture du projet

store-app/
├── install.sh              # Script d'installation universel
├── setup.py                # Package Python (pip install -e .)
├── MANIFEST.in             # Fichiers inclus dans la distribution
├── server.py               # Backend FastAPI (Render)
├── manifest.txml           # Manifest du projet
│
└── store/                  # Client TUI
    ├── store.py            # Point d'entrée (python store.py)
    ├── app.py              # StoreApp — routage, bindings globaux
    ├── api.py              # Client httpx → API Render
    ├── config.py           # Config + persistance session (~/.storeapp/)
    │
    ├── screens/
    │   ├── login.py        # Login/signup avec ASCII art
    │   ├── home.py         # Accueil Play Store (carousel, catégories)
    │   ├── browse.py       # Recherche live + filtres avancés
    │   ├── detail.py       # Détail tabbé + installation + médias
    │   └── publish.py      # Publication .tpkg
    │
    ├── widgets/
    │   ├── pixel_art.py    # PixelArtWidget — rendu .pxl (blocs colorés)
    │   ├── rating_dialog.py  # Modal notation 1–5 ★
    │   └── comment_dialog.py # Modal commentaire texte libre
    │
    ├── styles/
    │   └── app.tcss        # Thème cyberpunk dark complet (730+ lignes)
    │
    └── agent/              # Outils développeur
        ├── builder.py      # Construction du .tpkg
        ├── commands.py     # Commandes CLI (init/build/publish)
        └── metadata.py     # Gestion du manifest.txml

Flux de données

Utilisateur
    │
    ▼
StoreApp (app.py)          ← bindings clavier, routage screens
    │
    ├── StoreAPI (api.py)  ← httpx → https://storeapp-7mbo.onrender.com
    │       │
    │       └── /apps · /search · /featured · /download · /rate · /comment
    │
    └── Screens            ← workers thread (jamais de freeze UI)

Format .pxl (pixel art)

Les icônes et screenshots sont stockés côté serveur en PNG et convertis à la volée en .pxl (texte brut) par l'API.

Format hex (par défaut) :

#1a1b1e #58a6ff #58a6ff #1a1b1e
#58a6ff #ffffff #ffffff #58a6ff
#1a1b1e #58a6ff #58a6ff #1a1b1e

Format palette :

PALETTE
B=#1a1b1e  W=#ffffff  A=#58a6ff  .=transparent
PIXELS
B A A B
A W W A
B A A B

Rendu dans le terminal : blocs colorés via Rich.


Format .tpkg

Les applications publiées sur le store sont des archives .tar.gz renommées .tpkg.

Structure attendue :

monapp.tpkg/
├── manifest.txml           # Obligatoire
├── README.md               # Recommandé
├── postinstall.sh          # Exécuté automatiquement à l'installation
├── icon.png                # 200×200 px (optionnel)
└── screenshots/            # Max 5 PNG (optionnel)
    ├── 01.png
    └── 02.png

manifest.txml minimal :

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <name>Mon Application</name>
  <bundle>com.auteur.monapp</bundle>
  <version>1.0.0</version>
  <author>Auteur</author>
  <description>Description courte</description>
  <environnement>python</environnement>
  <entrypoint>main.py</entrypoint>
</manifest>

Agent CLI (développeurs)

# Initialiser un nouveau projet
agent init

# Construire le .tpkg
agent build

# Publier sur le store (connexion requise)
agent publish

Backend (serveur FastAPI)

Le serveur server.py est déployé sur Render à l'adresse https://storeapp-7mbo.onrender.com.

Lancer localement

# Dépendances serveur
pip install fastapi uvicorn[standard] python-jose[cryptography] pillow python-multipart httpx

# Variables d'environnement requises
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxx    # Token GitHub (stockage des .tpkg)
export GITHUB_REPO=owner/repo            # Dépôt de stockage
export SECRET_KEY=changeme               # Clé JWT (optionnel, défaut généré)

# Lancement
python server.py
# → http://localhost:8000

Routes principales

Méthode Route Description
GET /apps Liste toutes les applications
GET /apps/{bundle} Détail d'une application
GET /apps/{bundle}/icon Icône .pxl 16×8
GET /apps/{bundle}/screenshots Screenshots .pxl 40×14
GET /search?q=… Recherche full-text
GET /featured Applications en vedette
GET /download/{bundle} Téléchargement .tpkg
POST /signup Création de compte
POST /login Connexion (JWT)
POST /publish Publication .tpkg
POST /rate/{bundle} Note + commentaire

Données persistantes locales

~/.storeapp/
├── session.json            # Token JWT + nom d'utilisateur
├── downloads/              # .tpkg téléchargés
├── apps/                   # Applications installées
└── tmp_store/              # Extraction temporaire à l'installation

Dépendances

Paquet Version min Rôle
textual 0.50.0 Framework TUI
rich 13.0.0 Rendu texte coloré
httpx 0.27.0 Client HTTP async-compatible
fastapi (serveur) API REST
uvicorn (serveur) Serveur ASGI
pillow (serveur) Conversion PNG → .pxl
python-jose (serveur) JWT

Contribution

  1. Forkez le dépôt
  2. Créez une branche : git checkout -b feat/ma-fonctionnalite
  3. Committez : git commit -m "feat: description"
  4. Pushez : git push origin feat/ma-fonctionnalite
  5. Ouvrez une Pull Request

Licence

MIT — voir LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

storeapp-3.0.1.tar.gz (71.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storeapp-3.0.1-py3-none-any.whl (71.1 kB view details)

Uploaded Python 3

File details

Details for the file storeapp-3.0.1.tar.gz.

File metadata

  • Download URL: storeapp-3.0.1.tar.gz
  • Upload date:
  • Size: 71.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for storeapp-3.0.1.tar.gz
Algorithm Hash digest
SHA256 5375541ff95c2bd14adcf39a4421eed1ed7b2daf6306c4073b7d06a936b12cf8
MD5 2addbd51a5e5fe1a3a8c3bcc0820ad4f
BLAKE2b-256 0f799020f1522ae92397d948ae8def413a9c01210939585a472b63de5db440c2

See more details on using hashes here.

File details

Details for the file storeapp-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: storeapp-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 71.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for storeapp-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e95008bb2d3e168e830c68c2fe7573abd311739302a4511fa729f56661e33123
MD5 78f19bed17623ff8d522387c3a57a6b8
BLAKE2b-256 e5d151d547fac8a2889105ac8374dd3507e5aed88b9af5e7a8a0a5f9603fc40e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page