Spaces:
Running

quantilimited commited on
Commit
a3af7e9
·
verified ·
1 Parent(s): 64378fa

Upload SETUP.html

Browse files
Files changed (1) hide show
  1. SETUP.html +56 -2
SETUP.html CHANGED
@@ -84,7 +84,7 @@
84
  <div class="wrap">
85
  <span class="badge">● Explication setup</span>
86
  <h1>From an empty folder to taking payments.</h1>
87
- <p class="lede">Nine screens for the website, then one for the iPhone app. Each tells you exactly where to click, what to copy and where to paste it. No terminal, no code, no guessing.</p>
88
  <div class="meta"><span><i class="dot"></i> About 20 minutes</span><span><i class="dot"></i> Free tiers are enough</span><span><i class="dot"></i> Test mode first, real money later</span></div>
89
  </div>
90
  </header>
@@ -352,12 +352,64 @@
352
  <b>Before you upload:</b> open <code class="inline">js/config.js</code> in a text editor and paste your Project URL and anon key into the two empty quotes (the same two values from step 4). That is what makes the plans, wording and prices identical for every visitor — without it, each visitor is asked to connect their own project.
353
  <b>Then:</b> upload the <b>dist</b> folder — it is the upload copy of the site, with the Supabase function files left out so hosts do not think a build is needed. On Cloudflare go to <b>Workers &amp; Pages → Create → Upload and deploy</b>; on Netlify drag it onto <a href="https://app.netlify.com/drop" target="_blank" rel="noreferrer">app.netlify.com/drop</a>. You get an address like <code class="inline">explication.netlify.app</code> or <code class="inline">explication.you.workers.dev</code>.
354
  Go back to Supabase → <b>Authentication → URL Configuration</b> and add that address to <b>Redirect URLs</b>.
355
- Finally set the same address in the Mac app (see <code class="inline">supabase/SETUP.md</code>). The iPhone app sells through the App Store instead — the next screen covers it.
356
  </div>
357
  <div class="warn">Local files (<code class="inline">file://</code>) cannot sign in. Always open the site through <code class="inline">Start Explication.command</code> or the published address.</div>
358
  </div>
359
  </section>
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  <section class="step">
362
  <div class="step-head">
363
  <div class="num">◎</div>
@@ -479,6 +531,7 @@
479
  <tr><td>Emails students receive</td><td>Supabase → <b>Authentication → Emails</b></td></tr>
480
  <tr><td>Which address students see as the sender</td><td>Supabase → <b>Authentication → Emails → SMTP Settings</b></td></tr>
481
  <tr><td>Mail sent to hello@yourdomain</td><td>Cloudflare → <b>Email → Email Routing</b></td></tr>
 
482
  </table>
483
  </div>
484
  </section>
@@ -499,6 +552,7 @@
499
  <tr><td>Plans page is empty</td><td>Step 2 did not run. Supabase → SQL Editor → paste the file → Run.</td></tr>
500
  <tr><td>"This plan has no Stripe payment link yet"</td><td>Add the link to that plan in Developer → Plans, or you are in live mode with a test link.</td></tr>
501
  <tr><td>Sign-up says "check your email" but nothing arrives</td><td>Confirmation is on and Supabase's built-in sender only reaches your own team. Connect Resend (last section), or turn Confirm email off in Authentication → Providers → Email.</td></tr>
 
502
  </table>
503
  </div>
504
  </section>
 
84
  <div class="wrap">
85
  <span class="badge">● Explication setup</span>
86
  <h1>From an empty folder to taking payments.</h1>
87
+ <p class="lede">Ten screens for the website, then one for the iPhone app. Each tells you exactly where to click, what to copy and where to paste it. No terminal, no code, no guessing.</p>
88
  <div class="meta"><span><i class="dot"></i> About 20 minutes</span><span><i class="dot"></i> Free tiers are enough</span><span><i class="dot"></i> Test mode first, real money later</span></div>
89
  </div>
90
  </header>
 
352
  <b>Before you upload:</b> open <code class="inline">js/config.js</code> in a text editor and paste your Project URL and anon key into the two empty quotes (the same two values from step 4). That is what makes the plans, wording and prices identical for every visitor — without it, each visitor is asked to connect their own project.
353
  <b>Then:</b> upload the <b>dist</b> folder — it is the upload copy of the site, with the Supabase function files left out so hosts do not think a build is needed. On Cloudflare go to <b>Workers &amp; Pages → Create → Upload and deploy</b>; on Netlify drag it onto <a href="https://app.netlify.com/drop" target="_blank" rel="noreferrer">app.netlify.com/drop</a>. You get an address like <code class="inline">explication.netlify.app</code> or <code class="inline">explication.you.workers.dev</code>.
354
  Go back to Supabase → <b>Authentication → URL Configuration</b> and add that address to <b>Redirect URLs</b>.
355
+ Finally set the same address in the Mac app (see <code class="inline">supabase/SETUP.md</code>). The iPhone app sells through the App Store instead — the next screen after the Hugging Face one covers it.
356
  </div>
357
  <div class="warn">Local files (<code class="inline">file://</code>) cannot sign in. Always open the site through <code class="inline">Start Explication.command</code> or the published address.</div>
358
  </div>
359
  </section>
360
 
361
+ <section class="step">
362
+ <div class="step-head">
363
+ <div class="num">◈</div>
364
+ <div>
365
+ <h2>Put a copy on Hugging Face</h2>
366
+ <p class="why">Hugging Face Spaces will serve the same files for free, with no build step and no server to look after. It is a second address for the site — Supabase is still the backend.</p>
367
+ </div>
368
+ </div>
369
+ <div class="body">
370
+ <div class="window">
371
+ <div class="chrome"><i></i><i></i><i></i><span class="url">huggingface.co/new-space</span></div>
372
+ <div class="pane">
373
+ <div class="rail">
374
+ <div class="item on"><span class="ic">+</span> New Space</div>
375
+ <div class="item"><span class="ic">▦</span> Spaces</div>
376
+ <div class="item"><span class="ic">⚙</span> Settings</div>
377
+ </div>
378
+ <div class="canvas">
379
+ <h4>Create a new Space</h4>
380
+ <p>Free, and it needs nothing but the files.</p>
381
+ <div class="field"><span><span class="lab">Space name</span><code>explication</code></span><span class="pin">9</span></div>
382
+ <div class="field"><span><span class="lab">SDK</span><code>Static · Blank</code></span></div>
383
+ <div class="field"><span><span class="lab">Visibility</span><code>Public</code></span></div>
384
+ <div class="row"><button class="btn green">Create Space</button></div>
385
+ </div>
386
+ </div>
387
+ </div>
388
+ <div class="do">
389
+ <b>Do this:</b> sign in at <a href="https://huggingface.co" target="_blank" rel="noreferrer">huggingface.co</a> and click <b>New → Space</b> <span class="pin">9</span>. Name it <b>explication</b>, choose the <b>Static</b> SDK and the <b>Blank</b> template — Static Spaces are free — leave <b>Public</b> selected, and press <b>Create Space</b>.
390
+ </div>
391
+ <div class="do">
392
+ <b>Then upload the site.</b> In the new Space open <b>Files</b> → <b>Contribute → Upload files</b> <span class="pin">10</span>. Open the <b>dist</b> folder on your Mac and drag its <i>contents</i> — not the folder itself — onto the page: <code class="inline">index.html</code>, <code class="inline">SETUP.html</code>, <code class="inline">styles.css</code>, <code class="inline">favicon.svg</code>, <code class="inline">schema.sql</code>, and the <b>js</b> and <b>vendor</b> folders. The page lists every file with its folder in the name; press <b>Commit changes to main</b> and wait for <b>Running</b>.
393
+ </div>
394
+ <div class="warn">The <b>js</b> and <b>vendor</b> folders must keep their names. If the Space loads with no styling and no buttons, they were flattened on upload — delete those files in the Space and upload the folders again.</div>
395
+ <div class="do">
396
+ <b>The address.</b> The page at <code class="inline">huggingface.co/spaces/YOURNAME/explication</code> shows the site inside Hugging Face's frame. The address to share is the direct one: <code class="inline">https://YOURNAME-explication.static.hf.space</code> — your own username in lowercase, a dash, the Space name, then <code class="inline">.static.hf.space</code>. Open it once to check the site loads on its own.
397
+ </div>
398
+ <div class="do">
399
+ <b>Tell Supabase about it.</b> Supabase → <b>Authentication → URL Configuration → Redirect URLs</b> → add <code class="inline">https://YOURNAME-explication.static.hf.space</code>. Without it, a password-reset link sends people to an address Supabase refuses.
400
+ </div>
401
+ <table class="where">
402
+ <tr><th>What</th><th>Hugging Face</th></tr>
403
+ <tr><td>Cost</td><td>Free for static Spaces, no card needed</td></tr>
404
+ <tr><td>Address</td><td><code class="inline">https://YOURNAME-explication.static.hf.space</code></td></tr>
405
+ <tr><td>Your own domain</td><td>Needs Hugging Face PRO — <code class="inline">explication.uk</code> stays on Cloudflare</td></tr>
406
+ <tr><td>Updating the site</td><td><b>Contribute → Upload files</b> again; uploading a file with the same name replaces it</td></tr>
407
+ <tr><td>What is public</td><td>Every uploaded file. Only the public anon key is in there — never add <code class="inline">.secrets.local</code></td></tr>
408
+ </table>
409
+ <div class="tip">The <b>dist</b> folder is already the safe upload copy: it leaves out <code class="inline">supabase/</code>, <code class="inline">emails/</code> and the secrets file. Keep Cloudflare as the main address and treat the Space as a free mirror, or as a place to test a change before it goes live.</div>
410
+ </div>
411
+ </section>
412
+
413
  <section class="step">
414
  <div class="step-head">
415
  <div class="num">◎</div>
 
531
  <tr><td>Emails students receive</td><td>Supabase → <b>Authentication → Emails</b></td></tr>
532
  <tr><td>Which address students see as the sender</td><td>Supabase → <b>Authentication → Emails → SMTP Settings</b></td></tr>
533
  <tr><td>Mail sent to hello@yourdomain</td><td>Cloudflare → <b>Email → Email Routing</b></td></tr>
534
+ <tr><td>The site's other address (Hugging Face)</td><td>huggingface.co → your Spaces → <b>explication</b> → Files</td></tr>
535
  </table>
536
  </div>
537
  </section>
 
552
  <tr><td>Plans page is empty</td><td>Step 2 did not run. Supabase → SQL Editor → paste the file → Run.</td></tr>
553
  <tr><td>"This plan has no Stripe payment link yet"</td><td>Add the link to that plan in Developer → Plans, or you are in live mode with a test link.</td></tr>
554
  <tr><td>Sign-up says "check your email" but nothing arrives</td><td>Confirmation is on and Supabase's built-in sender only reaches your own team. Connect Resend (last section), or turn Confirm email off in Authentication → Providers → Email.</td></tr>
555
+ <tr><td>Hugging Face copy has no styling or buttons</td><td>The <b>js</b> and <b>vendor</b> folders were flattened on upload. Delete those files in the Space and upload them again as folders.</td></tr>
556
  </table>
557
  </div>
558
  </section>