1.0.0 â€ĸ Published 5 months ago

create-react-vite-firebase-app v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Vite + Firebase + Wrangler Template

This template provides a minimal setup to get React working in Vite with Firebase and Wrangler (Cloudflare Workers).

Quick Start

# Create a new project
npx create-react-vite-firebase-app my-app

# For local development/testing:
cd templates
npm link
npx create-react-vite-firebase-app my-test-app

# Enter project directory
cd my-app

# Copy environment file and configure
cp .env.example .env

# Start development server
docker compose up app

Features

  • âšĄī¸ Vite + React + TypeScript
  • đŸ”Ĩ Firebase Authentication and Firestore
  • đŸŒŠī¸ Cloudflare Workers (via Wrangler)
  • đŸŗ Docker setup for development
  • 🔒 Environment variable configuration
  • 🚀 Production-ready Nginx configuration

Development

Frontend runs on http://localhost:5173 API runs on http://localhost:8788

Configuration

Environment Variables

Create a .env file with:

# Firebase Configuration
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_PRIVATE_KEY="your-private-key"
FIREBASE_CLIENT_EMAIL=your-client-email
FIREBASE_PRIVATE_KEY_ID=your-private-key-id

# AI Service Configuration (optional)
VITE_DEVIN_API_KEY=your-devin-api-key
VITE_CODEBUFF_API_KEY=your-codebuff-api-key
VITE_CLAUDE_API_KEY=your-claude-api-key
VITE_INFERABLE_API_KEY=your-inferable-api-key

Docker Setup

Development:

docker compose up app

Production preview:

docker compose up production

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT