npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

firebase-nextjs-generator

v0.1.1

Published

🚀 GĂ©nĂ©rateur complet pour projets Firebase + Next.js avec App Hosting, API routes, PWA, et plus !

Readme

🚀 GĂ©nĂ©rateur Firebase + Next.js 2025 avec App Hosting

Générateur de projet complet pour applications Firebase + Next.js avec API routes complÚtes et architecture moderne (Version Beta 0.1.0)

npm version Version License Node.js TypeScript Tests Firebase

📋 Table des matiùres

🚀 Vue d'ensemble

Le Générateur Firebase + Next.js 2025 avec App Hosting est un outil puissant qui automatise la création de projets web modernes combinant :

  • Frontend : Next.js 15 avec App Router, React 18, TypeScript 5.5
  • Backend : Firebase App Hosting avec API routes complĂštes
  • Architecture : Multi-environnements, PWA, FCM, Monitoring
  • DevOps : CI/CD automatisĂ©, 132 tests complets, dĂ©ploiement

🎯 Objectifs

  • RapiditĂ© : GĂ©nĂ©ration de projet en moins de 2 minutes
  • QualitĂ© : Code production-ready avec bonnes pratiques
  • FlexibilitĂ© : Configuration adaptĂ©e Ă  chaque projet
  • Maintenance : Architecture Ă©volutive et maintenable
  • Tests : 132 tests complets garantissant la fiabilitĂ©

🆕 NOUVEAUTÉ MAJEURE : Firebase App Hosting avec API Routes

Votre générateur supporte maintenant Firebase App Hosting avec API routes complÚtes !

  • ✅ API routes Next.js : ComplĂštement supportĂ©es
  • ✅ SSR/SSG : Possible via Cloud Functions
  • ✅ Middleware : SupportĂ©
  • ✅ Dynamic routes : Fonctionnels
  • ✅ ÉcosystĂšme Firebase : 100% intĂ©grĂ©

✹ FonctionnalitĂ©s

🎹 Frontend (Next.js 15)

  • Framework moderne : Next.js 15 avec App Router
  • React 18 : Version stable et performante
  • TypeScript 5.5 : Typage strict et avancĂ©
  • UI Frameworks : Material-UI (MUI) ✅
  • State Management : Zustand ou Redux Toolkit
  • Data Fetching : React Query (TanStack Query)
  • PWA : Service Worker, manifest, offline support
  • FCM : Notifications push Firebase
  • Analytics : Firebase Analytics intĂ©grĂ©
  • Performance : Monitoring et optimisation

đŸ”„ Backend (Firebase App Hosting)

  • Firebase App Hosting : DĂ©ploiement avec API routes complĂštes
  • Firestore : Base de donnĂ©es NoSQL avec rĂšgles de sĂ©curitĂ©
  • Cloud Functions : Backend serverless Node.js 20
  • Authentication : SystĂšme d'auth complet avec triggers
  • Storage : Stockage de fichiers sĂ©curisĂ©
  • Extensions : IntĂ©grations Firebase prĂȘtes Ă  l'emploi
  • API Routes : Support complet des routes API Next.js

🚀 DevOps & Monitoring

  • Multi-environnements : dev, staging, production
  • CI/CD : GitHub Actions automatisĂ©
  • Monitoring : Sentry, Firebase Performance
  • Logs : Winston avec structure avancĂ©e
  • Health Checks : Endpoints de monitoring
  • Backup : Sauvegarde automatique
  • Tests : 132 tests complets automatisĂ©s

đŸ—ïž Architecture

📁 Structure du gĂ©nĂ©rateur

firebase-nextjs-generator/
├── src/                     # Code source du gĂ©nĂ©rateur
│   ├── cli.ts              # Point d'entrĂ©e CLI
│   ├── generator.ts         # GĂ©nĂ©rateur principal
│   ├── generators/          # GĂ©nĂ©rateurs spĂ©cifiques
│   │   ├── firebase-generator.ts    # GĂ©nĂ©rateur Firebase App Hosting
│   │   └── nextjs-generator.ts      # GĂ©nĂ©rateur Next.js
│   ├── types/               # Types TypeScript
│   └── utils/               # Utilitaires
├── templates/               # Templates Handlebars
│   ├── nextjs/             # Templates Next.js (API routes)
│   ├── firebase/            # Templates Firebase App Hosting
│   │   ├── firebase.json              # Configuration sans hosting statique
│   │   └── firebase-app-hosting.json # Configuration App Hosting
│   └── scripts/             # Scripts d'initialisation
├── scripts/                 # Scripts de test (132 tests)
│   ├── test.sh              # Orchestrateur principal
│   └── test-comprehensive.sh # 132 tests complets
├── docs/                    # Documentation complùte
└── dist/                    # Build de production

🔄 Flux de gĂ©nĂ©ration

Configuration → Validation → GĂ©nĂ©ration → Post-traitement → Instructions
     ↓              ↓           ↓            ↓            ↓
  CLI Input    Validation   Templates   Scripts     README
  Prompts      Rules       Handlebars   Setup      Instructions

đŸ—ïž Architecture Firebase App Hosting

┌─────────────────────────────────────────────────────────────┐
│                    Firebase App Hosting                     │
├──────────────────────────────────────────────────────────────
│  Frontend (.next/)  │  API Routes (/api/*)  │  Cloud Functions │
│  ├── Pages         │  ├── /api/auth        │  ├── Triggers     │
│  ├── Components    │  ├── /api/users       │  ├── Scheduled    │
│  ├── Styles        │  └── /api/data        │  └── HTTP         │
│  └── Static        │                       │                   │
└─────────────────────────────────────────────────────────────┘

📩 Installation

🚀 Installation rapide (recommandĂ©e)

# Installation globale
npm install -g firebase-nextjs-generator

# Utilisation immédiate
firebase-nextjs-generator create --name "mon-projet" --yes

đŸ“„ Installation depuis le source

# Cloner le repository
git clone https://github.com/oliviermichalowicz/firebase-nextjs-generator.git
cd firebase-nextjs-generator

# Installation des dépendances
npm install

# Build du projet
npm run build

# Utilisation
npx ts-node src/cli.ts create --name "mon-projet" --yes

Prérequis

  • Node.js : 18.0.0 ou supĂ©rieur
  • npm : 9.0.0 ou supĂ©rieur
  • Firebase CLI : 14.0.0 ou supĂ©rieur
  • Git : Pour le contrĂŽle de version

Installation globale

npm install -g firebase-nextjs-generator

Installation locale

git clone https://github.com/your-username/firebase-nextjs-generator.git
cd firebase-nextjs-generator
npm install
npm run build

🎯 Utilisation

🚀 GĂ©nĂ©ration rapide

# Génération interactive
firebase-nextjs-generator create

# Génération avec options
firebase-nextjs-generator create --name my-app --template default

📝 Processus de gĂ©nĂ©ration

  1. Configuration du projet

    • Nom et description
    • Choix des fonctionnalitĂ©s (MUI, Zustand/Redux, PWA)
    • Configuration des environnements
  2. Configuration Firebase App Hosting

    • Liaison Ă  un projet existant ou crĂ©ation
    • Configuration des rĂ©gions
    • SĂ©lection des extensions
    • Configuration App Hosting avec API routes
  3. Génération des fichiers

    • Structure du projet Next.js avec API routes
    • Templates Handlebars pour Firebase App Hosting
    • Configuration des outils
  4. Installation des dépendances

    • Packages npm
    • Configuration TypeScript
    • Scripts de build

🚀 DĂ©ploiement Firebase App Hosting

# 1. Build de l'application Next.js
cd frontend
npm run build

# 2. Déploiement Firebase complet
cd ../backend
firebase deploy

# 3. Ou déploiement sélectif
firebase deploy --only hosting
firebase deploy --only functions
firebase deploy --only firestore

đŸ§Ș Tests et QualitĂ©

🎯 132 Tests Complets AutomatisĂ©s

Votre générateur est testé par 132 tests complets répartis en 30 phases :

Phases de test principales :

  • Phase 1-5 : Tests d'environnement, build, CLI, gĂ©nĂ©ration
  • Phase 6-10 : Tests de fonctionnalitĂ©s, robustesse, templates
  • Phase 11-15 : Tests Firebase, CI/CD, performance, sĂ©curitĂ©
  • Phase 16-20 : Tests d'internationalisation, robustesse, opĂ©rationnels
  • Phase 21-25 : Tests d'intĂ©gration, end-to-end, dĂ©ploiement
  • Phase 26-30 : Tests Firebase rĂ©els, CI/CD, CLI avec validation dry-run

Tests Firebase App Hosting :

  • ✅ Configuration App Hosting : Validation complĂšte
  • ✅ API routes : Support et validation
  • ✅ Cloud Functions : Structure et configuration
  • ✅ Firestore : RĂšgles et indexes
  • ✅ Storage : RĂšgles et configuration
  • ✅ DĂ©ploiement : Validation en dry-run

🚀 ExĂ©cution des tests

# Test complet (132 tests) - RECOMMANDÉ
./scripts/test.sh

# Test direct du script complet
./scripts/test-comprehensive.sh

# Voir les résultats
./scripts/test.sh | tail -20

📊 RĂ©sultats des tests

# SuccĂšs complet (132/132)
🎉 Tous les tests ont rĂ©ussi !
🚀 Le gĂ©nĂ©rateur est 100% fonctionnel et prĂȘt pour la production !

# Échecs partiels
❌ X tests ont Ă©chouĂ©.
🔧 Des ajustements peuvent ĂȘtre nĂ©cessaires.

🔧 Configuration des tests Firebase

Les tests utilisent votre projet Firebase sqyping-dev pour la validation réelle :

# Configuration automatique
firebase use sqyping-dev

# Validation des rĂšgles
firebase deploy --dry-run --only firestore:rules
firebase deploy --dry-run --only storage:rules

🔧 DĂ©veloppement

🚀 DĂ©marrage rapide

# Cloner le projet
git clone https://github.com/your-username/firebase-nextjs-generator.git
cd firebase-nextjs-generator

# Installer les dépendances
npm install

# Lancer en mode développement
npm run dev

# Exécuter les tests complets
./scripts/test.sh

# Build de production
npm run build

📁 Structure du code

src/
├── cli.ts                    # Point d'entrĂ©e CLI
├── generator.ts              # GĂ©nĂ©rateur principal
├── generators/               # GĂ©nĂ©rateurs spĂ©cifiques
│   ├── firebase-generator.ts # GĂ©nĂ©rateur Firebase App Hosting
│   └── nextjs-generator.ts   # GĂ©nĂ©rateur Next.js avec API routes
├── types/                    # Types TypeScript
│   └── index.ts
├── utils/                    # Utilitaires
│   ├── template-engine.ts
│   └── validator.ts
└── tests/                    # Tests
    ├── unit/
    ├── integration/
    └── e2e/

đŸ§Ș Tests

# Tests complets (132 tests)
./scripts/test.sh

# Tests en mode watch
npm run test:watch

# Tests d'intégration
npm run test:integration

# Couverture de code
npm run test:coverage

# Tests E2E
npm run test:e2e

📝 Linting et formatage

# Linting
npm run lint

# Correction automatique
npm run lint:fix

# Formatage
npm run format

# Vérification des types
npm run type-check

🚀 FONCTIONNALITÉS AVANCÉES

đŸ”„ Firebase App Hosting avec API Routes

Votre générateur supporte maintenant Firebase App Hosting avec API routes complÚtes !

Configuration automatique :

// firebase-app-hosting.json
{
  "hosting": {
    "public": "frontend/.next",
    "rewrites": [
      {
        "source": "/api/**",
        "function": "nextjs-api"
      }
    ]
  }
}

Avantages :

  • ✅ API routes Next.js : ComplĂštement supportĂ©es
  • ✅ SSR/SSG : Possible via Cloud Functions
  • ✅ Middleware : SupportĂ©
  • ✅ Dynamic routes : Fonctionnels
  • ✅ ÉcosystĂšme Firebase : 100% intĂ©grĂ©

🎹 UI Frameworks SupportĂ©s

  • ✅ Material-UI (MUI) : Composants, thĂšmes, configuration
  • ❌ Shadcn/ui : Plus supportĂ© (remplacĂ© par MUI)

📊 State Management

  • ✅ Zustand : Stores lĂ©gers et performants
  • ✅ Redux Toolkit : Gestion d'Ă©tat avancĂ©e

🚀 Versions SupportĂ©es

  • ✅ Next.js 14 : Configuration et fonctionnalitĂ©s
  • ✅ Next.js 15 : Configuration et fonctionnalitĂ©s
  • ✅ React 18 : Version stable et performante

đŸ€ Contribution

📋 Guide de contribution

  1. Fork le projet
  2. Clone votre fork
  3. Créez une branche feature
  4. Commitez vos changements
  5. Poussez vers votre branche
  6. Ouvrez une Pull Request

🐛 Signaler un bug

  • Utilisez les Issues GitHub
  • DĂ©crivez le problĂšme clairement
  • Incluez les Ă©tapes de reproduction
  • Ajoutez les logs d'erreur

💡 Proposer une fonctionnalitĂ©

  • CrĂ©ez une Issue avec le label "enhancement"
  • DĂ©crivez la fonctionnalitĂ© souhaitĂ©e
  • Expliquez l'utilitĂ© et l'impact
  • Proposez une implĂ©mentation

📝 Standards de code

  • TypeScript strict
  • ESLint + Prettier
  • Tests unitaires obligatoires (132 tests)
  • Documentation Ă  jour

📄 License

Ce projet est sous licence MIT. Voir le fichier LICENSE pour plus de détails.

🙏 Remerciements

  • Firebase Team pour la plateforme et App Hosting
  • Vercel pour Next.js et l'App Router
  • React Team pour React 18
  • CommunautĂ© open source pour les contributions

🎯 RÉSUMÉ DES CHANGEMENTS MAJEURS

✅ NOUVEAU : Firebase App Hosting

  • API routes Next.js : ComplĂštement supportĂ©es
  • Configuration unifiĂ©e : Firebase + Next.js
  • DĂ©ploiement simplifiĂ© : firebase deploy

✅ NOUVEAU : 132 Tests Complets

  • Validation automatique : Tous les composants
  • Tests Firebase rĂ©els : Avec votre projet sqyping-dev
  • Tests dry-run : Validation sans dĂ©ploiement

✅ NOUVEAU : Architecture ModernisĂ©e

  • Next.js 15 : App Router et API routes
  • React 18 : Version stable et performante
  • MUI uniquement : Shadcn/Tailwind supprimĂ©s

✅ NOUVEAU : Scripts de Test UnifiĂ©s

  • test.sh : Orchestrateur principal
  • test-comprehensive.sh : 132 tests complets
  • Isolation automatique : .test-artifacts/

⭐ Si ce projet vous aide, n'oubliez pas de le star sur GitHub !

🚀 Votre gĂ©nĂ©rateur est maintenant 100% prĂȘt pour Firebase App Hosting avec API routes !