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

https://github.com/amitgajare2/flip-frame

Flip Frame โ€“ Paste your HTML, get a live link instantly. Share demos, prototypes, or ideas in seconds.
https://github.com/amitgajare2/flip-frame

freehosting hosting reactjs supabase

Last synced: 2 days ago
JSON representation

Flip Frame โ€“ Paste your HTML, get a live link instantly. Share demos, prototypes, or ideas in seconds.

Awesome Lists containing this project

README

          

![Image description](https://dl.dropbox.com/scl/fi/x3ksrmmrzfndkgq96dmie/screenshot_3x_postspark_2025-08-08_14-20-11.jpeg?rlkey=fg56plb2kmjr9j5q7vzjbm8s4&st=6flk3nhn&dl=0)
# ๐Ÿงช React + Supabase HTML Hosting Platform

![React](https://img.shields.io/badge/React-๐ŸŸฆ-61DAFB?logo=react&logoColor=white&label=)
![Vite](https://img.shields.io/badge/Vite-646CFF?logo=vite&logoColor=white&label=)
![React Router](https://img.shields.io/badge/React%20Router-CA4245?logo=reactrouter&logoColor=white&label=)
![Supabase](https://img.shields.io/badge/Supabase-3ECF8E?logo=supabase&logoColor=white&label=)
![ESLint](https://img.shields.io/badge/ESLint-4B32C3?logo=eslint&logoColor=white&label=)

![Stars](https://img.shields.io/github/stars/Amitgajare2/Flip-Frame?style=social)
![Forks](https://img.shields.io/github/forks/Amitgajare2/Flip-Frame?style=social)

A simple web app where authenticated users can paste their HTML code and get a live website link like:

```

demo.vercel.app/abc123

````

---

## ๐Ÿš€ Features

- ๐Ÿ” User Signup/Login with Supabase Auth
- ๐Ÿ™‹ Signup asks for Name, Email, Password
- ๐Ÿงพ User dashboard shows their name and lets them host HTML
- ๐ŸŒ Public live preview pages via unique URLs
- ๐Ÿ”’ Only logged-in users can host pages
- โœ… Row-Level Security (RLS) enabled

---

## ๐Ÿงฉ Stack

- Frontend: **React.js**
- Styling: **Normal CSS**
- Backend: **Supabase** (Auth + DB + RLS)
- Routing: **React Router**
- Hosting: **Vercel** or Netlify

---

## ๐Ÿ›  Supabase Setup

### 1. Create Project

- Go to [https://supabase.com/](https://supabase.com/) โ†’ New Project
- Note the **Project URL** and **Anon API Key**

---

### 2. Enable Auth

- Go to **Authentication โ†’ Settings**
- Disable "Confirm email" for instant login after signup (optional)

---

### 3. Create Tables

#### `profiles` Table

```sql
create table profiles (
id uuid primary key references auth.users(id) on delete cascade,
name text
);
````

#### `websites` Table

```sql
create table websites (
id text primary key,
user_id uuid references auth.users(id) on delete cascade,
html text,
created_at timestamp default current_timestamp
);
```

---

### 4. Enable RLS

Go to each table (`profiles`, `websites`) โ†’ Enable **Row Level Security**

#### RLS Policies for `profiles`

```sql
create policy "Users can manage their own profile"
on profiles
for all
using (auth.uid() = id);
```

#### RLS Policies for `websites`

```sql
create policy "Users can manage their own websites"
on websites
for all
using (auth.uid() = user_id);

-- Optional: public can view hosted sites by ID
create policy "Public can view hosted websites"
on websites
for select
using (true);
```

---

## โš™๏ธ Local Development

### 1. Clone the Repo

```bash
git clone https://github.com/Amitgajare2/Flip-Frame
cd Flip-Frame
```

### 2. Install Dependencies

```bash
npm install
```

### 3. Setup Supabase Client

Create `src/supabase.js`:

```js
import { createClient } from '@supabase/supabase-js';

const supabaseUrl = 'https://YOUR_PROJECT.supabase.co';
const supabaseKey = 'YOUR_PUBLIC_ANON_KEY';

export const supabase = createClient(supabaseUrl, supabaseKey);
```

Replace `YOUR_PROJECT` and `YOUR_PUBLIC_ANON_KEY` with values from your Supabase dashboard.

---

### 4. Run the App

```bash
npm run dev
```

Visit `http://localhost:5173/` to see the app.

---

## ๐Ÿงช Pages Overview

| Route | Description |
| ------------ | ---------------------------------- |
| `/` | Home page with login/signup |
| `/dashboard` | Logged-in user's dashboard |
| `/:id` | Public preview of hosted HTML code |

---

## ๐Ÿ›ฐ Deploy to Vercel (or Netlify)

### Vercel

1. Push to GitHub
2. Import to Vercel
3. Set environment variables (optional)
4. Deploy ๐ŸŽ‰

### Netlify

1. Set `build` to `vite` (`npm run build`)
2. `publish` folder = `dist`
3. Add Redirect rule for React Router:

```txt
/* /index.html 200
```

---

## ๐Ÿ“ฆ Dependencies

```bash
npm install @supabase/supabase-js react-router-dom uuid
```

---

## ๐Ÿ“Œ Notes

* Each site gets a random 8-char ID like `/gh32hdbs`
* Supabase RLS protects user data
* Add CSS, JS support or themes later