Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kazuph/remix-ginnan-stack

๐Ÿš€ Remix + Hono template for Cloudflare Pages with Shadcn UI, Drizzle ORM and Supabase
https://github.com/kazuph/remix-ginnan-stack

cloudflare-pages drizzle hono remix-stack supabase

Last synced: 16 days ago
JSON representation

๐Ÿš€ Remix + Hono template for Cloudflare Pages with Shadcn UI, Drizzle ORM and Supabase

Awesome Lists containing this project

README

        

# ๐Ÿš€ Remix Ginnan Stack

A web application template powered by Remix and Hono, designed to run on Cloudflare Pages.

![sample](sample.png)

## ๐Ÿ›  Getting Started

### Using this template

You can create a new project based on this template using the following command:

```bash
npx create-remix@latest --template kazuph/remix-ginnan-stack
```

After the project is created:

1. Copy `.dev.vars.example` to `.dev.vars`
2. Update environment variables in `.dev.vars`
3. Run `pnpm install` to install dependencies
4. Run `pnpm dev` to start the development server

## ๐Ÿ›  Tech Stack

### ๐Ÿ— Framework & Runtime
- ๐ŸŽต Remix v2.15.0
- โ˜๏ธ Cloudflare Pages
- ๐Ÿ”Œ Hono Adapter v0.5.2

### ๐Ÿ’พ Database & ORM
- ๐Ÿ˜ Supabase (PostgreSQL)
- ๐ŸŒŠ Drizzle ORM
- ๐Ÿ”„ Database Migrations

### ๐ŸŽจ UI/UX Libraries
- โš›๏ธ React v18.2.0
- ๐ŸŽญ Tailwind CSS
- ๐ŸŽฏ Shadcn UI - Beautiful and accessible components
- ๐ŸŽฏ Radix UI Components
- ๐ŸŽช Lucide React Icons
- โœจ Tailwind CSS Animate

### ๐Ÿ”ง Development Tools
- ๐Ÿ“˜ TypeScript
- โšก๏ธ Vite
- ๐Ÿ” ESLint
- ๐Ÿ’ป Node.js v20+

## ๐Ÿ“‹ Prerequisites

### PostgreSQL Client (psql) Installation

#### macOS
```bash
# Homebrewใ‚’ไฝฟ็”จใ™ใ‚‹ๅ ดๅˆ
brew install postgresql@14

# ใพใŸใฏใ€PostgreSQLใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใฎใฟใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ™ใ‚‹ๅ ดๅˆ
brew install libpq
echo 'export PATH="/opt/homebrew/opt/libpq/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```

#### Linux (Ubuntu/Debian)
```bash
sudo apt-get update
sudo apt-get install postgresql-client
```

## ๐Ÿ”ง Environment Setup

1. Copy `.dev.vars.example` to `.dev.vars`:
```bash
cp .dev.vars.example .dev.vars
```

2. Update the `DATABASE_URL` in `.dev.vars` with your Supabase PostgreSQL connection string:
```
DATABASE_URL="postgresql://postgres:[email protected]:5432/postgres"
```

## ๐Ÿ“‹ Available Commands

```bash
# Development
pnpm run dev # ๐Ÿ”ฅ Start Vite development server
pnpm run preview # ๐Ÿ‘€ Preview build with Wrangler

# Build & Deploy
pnpm run build # ๐Ÿ“ฆ Build Remix application
pnpm run deploy:pages # ๐Ÿš€ Build and deploy to Cloudflare Pages

# Database Operations
pnpm run db:generate # ๐Ÿ— Generate Drizzle migration files
pnpm run db:migrate # ๐Ÿ”„ Run Drizzle migrations
pnpm run db:push # ๐Ÿ“ค Push schema changes to database
pnpm run db:seed # ๐ŸŒฑ Seed database with initial data
pnpm run db:studio # ๐ŸŽฎ Open Drizzle Studio

# Type Checking & Generation
pnpm run typecheck # โœ… Run TypeScript type checking
pnpm run typegen # ๐Ÿ— Generate Wrangler types
pnpm run cf-typegen # โ˜๏ธ Generate Cloudflare types

# Others
pnpm run start # ๐ŸŒ Start Wrangler development server
pnpm run lint # ๐Ÿ” Run ESLint code quality checks
pnpm run format # ๐ŸŽจ Run Biome code formatting
```

## โœจ Features

- ๐ŸŽฏ Remix v3 Features Enabled
- ๐Ÿš€ Single Fetch Optimization
- ๐Ÿ’พ Fetcher Persistence
- ๐Ÿ›ฃ Relative Splat Paths
- ๐Ÿ”„ Lazy Route Discovery
- โ˜๏ธ Cloudflare Pages Optimization
- ๐Ÿ”Œ Hono Adapter Integration
- ๐Ÿ—ƒ Database Features
- ๐Ÿ”„ Automatic migrations with Drizzle
- ๐Ÿ“Š Type-safe database operations
- ๐ŸŽฎ Database management via Drizzle Studio

## ๐Ÿ“‹ Requirements

- ๐Ÿ’ป Node.js v20 or higher
- ๐Ÿ“ฆ pnpm
- ๐Ÿ˜ Supabase Project (for PostgreSQL database)
- ๐Ÿ›  PostgreSQL Client (psql)

## ๐Ÿ—ƒ Database Management

### Migrations

1. Make changes to your schema in `app/schema.ts`
2. Generate migration files:
```bash
pnpm run db:generate
```
3. Apply migrations:
```bash
pnpm run db:migrate
```

### Push Schema Changes
To directly push schema changes without generating migration files:
```bash
pnpm run db:push
```

### Database Studio
To manage your database through a GUI:
```bash
pnpm run db:studio
```

### Seeding Data
To populate your database with initial data:
```bash
pnpm run db:seed
```

Note: Seeding requires the PostgreSQL client (psql) to be installed on your system. See the Prerequisites section for installation instructions.