-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from n0-computer/sendme
Sendme
- Loading branch information
Showing
17 changed files
with
739 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
# Copyright 2023 n0. All rights reserved. Dual MIT/Apache license. | ||
|
||
set -e | ||
|
||
repo="n0-computer/sendme" | ||
release_url="https://api.github.com/repos/$repo/releases/latest" | ||
|
||
if [ "$OS" = "Windows_NT" ]; then | ||
echo "Error: this installer only works on linux & macOS." 1>&2 | ||
exit 1 | ||
else | ||
case $(uname -sm) in | ||
"Darwin x86_64") target="darwin-x86_64" ;; | ||
"Darwin arm64") target="darwin-aarch64" ;; | ||
"Linux x86_64") target="linux-x86_64" ;; | ||
"Linux arm64"|"Linux aarch64") target="linux-aarch64" ;; | ||
*) target="linux-x86_64" ;; | ||
esac | ||
fi | ||
|
||
echo "Downloading $repo for $target" | ||
release_target_url=$( | ||
curl -s "$release_url" | | ||
grep "browser_download_url" | | ||
grep "$target" | | ||
sed -re 's/.*: "([^"]+)".*/\1/' \ | ||
) | ||
|
||
curl -sL "$release_target_url" | tar xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react"; | ||
|
||
export function PageIcon() { | ||
return ( | ||
<svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"> | ||
<g> | ||
<path d="m27,199c-.55,0-1-.45-1-1V30.41L55.41,1h117.59c.55,0,1,.45,1,1v196c0,.55-.45,1-1,1H27Z" style={{ fill: '#fff', strokeWidth: 0 }} /> | ||
<path d="m173,2v196H27V30.83L55.83,2h117.17m0-2H55l-30,30v168c0,1.1.9,2,2,2h146c1.1,0,2-.9,2-2V2c0-1.1-.9-2-2-2h0Z" style={{ strokeWidth: 0 }} /> | ||
</g> | ||
<g> | ||
<path d="m27.41,29L54,2.41v25.59c0,.55-.45,1-1,1h-25.59Z" style={{ fill: '#fff', strokeWidth: 0 }} /> | ||
<path d="m53,4.83v23.17h-23.17L53,4.83m2-4.83l-30,30h28c1.1,0,2-.9,2-2V0h0Z" style={{ strokeWidth: 0 }} /> | ||
</g> | ||
</svg> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react' | ||
|
||
export default function Background() { | ||
return ( | ||
<div className="absolute inset-0 -z-10 mx-0 w-full h-full max-w-none overflow-hidden"> | ||
<svg id="visual" viewBox="0 0 900 600"> | ||
<defs> | ||
<filter id="blur1" x="-10%" y="-10%" width="120%" height="120%"> | ||
<feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> | ||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend> | ||
<feGaussianBlur stdDeviation="161" result="effect1_foregroundBlur"></feGaussianBlur> | ||
</filter> | ||
|
||
<circle id="shape" cx="450" cy="300" r="1200" /> | ||
<filter id="noise"> | ||
<feTurbulence | ||
type="fractalNoise" | ||
baseFrequency="19.5" | ||
numOctaves="10" | ||
result="turbulence" | ||
/> | ||
<feComposite operator="in" in="turbulence" in2="SourceAlpha" result="composite"/> | ||
<feColorMatrix in="composite" type="luminanceToAlpha" /> | ||
<feBlend in="SourceGraphic" in2="composite" mode="color-burn" /> | ||
</filter> | ||
<mask id="gradient"> | ||
<linearGradient id="fade"> | ||
<stop offset="0%" stop-color="black" stop-opacity="0.6" /> | ||
<stop offset="65%" stop-color="white" stop-opacity="0.9" /> | ||
<stop offset="75%" stop-color="white" stop-opacity="1" /> | ||
</linearGradient> | ||
<use href="#shape" fill="url('#fade')" /> | ||
</mask> | ||
</defs> | ||
<rect width="900" height="600" fill="#6600FF"></rect> | ||
<g filter="url(#blur1)"> | ||
<circle cx="28" cy="89" fill="#00CC99" r="357"></circle> | ||
<circle cx="845" cy="44" fill="#6600FF" r="357"></circle> | ||
<circle cx="500" cy="119" fill="#00CC99" r="357"></circle> | ||
<circle cx="197" cy="377" fill="#00CC99" r="357"></circle> | ||
<circle cx="106" cy="591" fill="#6600FF" r="357"></circle> | ||
<circle cx="309" cy="517" fill="#00CC99" r="357"></circle> | ||
</g> | ||
<use href="#shape" fill="hsl(337, 92%, 69%)" mask="url(#gradient)" filter="url('#noise')" /> | ||
</svg> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import SendmePage from '@/components/SendmePage' | ||
|
||
export const metadata = { | ||
title: 'Sendme', | ||
description: | ||
'send files over the internet', | ||
} | ||
|
||
export const sections = [ | ||
{title: 'Guides', id: 'guides'}, | ||
{title: 'Resources', id: 'resources'}, | ||
] | ||
|
||
<SendmePage /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
'use client'; | ||
|
||
import React from 'react' | ||
import Image from 'next/image' | ||
import localFont from 'next/font/local' | ||
import clsx from 'clsx' | ||
import { | ||
ChatBubbleLeftIcon, | ||
ClipboardDocumentIcon, | ||
ClipboardDocumentCheckIcon | ||
} from '@heroicons/react/24/outline' | ||
import { Button } from './Button' | ||
|
||
const koulen = localFont({ | ||
src: '../fonts/Koulen-Regular.ttf', | ||
display: 'swap', | ||
variable: '--font-koulen-regular', | ||
weight: '200 900', | ||
}) | ||
|
||
export default function SendmePage() { | ||
const install = `curl -fsSL https://iroh.computer/sendme.sh | sh` | ||
const [copied, setCopied] = React.useState(false) | ||
|
||
const handleCopy = () => { | ||
navigator.clipboard.writeText(install); | ||
setCopied(true); | ||
setTimeout(() => { | ||
setCopied(false); | ||
}, 1300); | ||
} | ||
|
||
return ( | ||
<div className={clsx('w-full h-full bg-white text-zinc-700', koulen.variable)}> | ||
<div className="pt-10 mx-auto lg:max-w-5xl"> | ||
<div className='max-w-5xl mx-auto text-center mt-20'> | ||
<p className='text-lg text-zinc-500 font-koulen'>New to send files? Try</p> | ||
<h1 className='text-5xl lg:text-7xl font-koulen'>Sendme</h1> | ||
<p className='text-lg text-zinc-500'>Unlimited file size. Free. No account required.</p> | ||
</div> | ||
<Image src="/img/sendme/sendme_hero_1.svg" alt='one computer sending files to another computer through a pipe' width='1600' height='900' className='md:-mt-20' /> | ||
|
||
<div className='md:-mt-20 mx-5 md:mx-0 h-10 border-l border-r shadow-sm' /> | ||
<div className='mx-5 md:mx-0 border-t border-l border-r shadow-sm'> | ||
<div className='md:flex'> | ||
<div className='px-5 py-10 border-b md:border-r md:w-5/12'> | ||
<h2 className='text-4xl text-zinc-700 font-koulen'>File transfer<br />doesn't need to be complicated</h2> | ||
<p className='mt-1 text-sm/6 text-gray-500'>It's like <span className='font-space-mono'>scp</span> without needing to know the IP address. Add some files to sendme, and it will give you a pastable ticket that you can give to anyone who needs your files. Sendme will connect your devices directly & transfer the data without any accounts or configuration.</p> | ||
</div> | ||
|
||
<div className='px-5 py-10 border-b flex-1 md:w-7/12'> | ||
<h3 className='text-3xl font-koulen'>Install</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>Add sendme to your machine using shell:</p> | ||
<button className='text-xs md:text rounded bg-zinc-100 p-2 mt-2 flex plausible-event-name=Sendme+Copy+Install+Script+Click' onClick={handleCopy}> | ||
<div className='grow mr-10 font-spaceMono'>$ {install}</div> | ||
{copied | ||
? <span className='w-10 mr-1'>copied!</span> | ||
: <span className='w-10 mr-1'></span> } | ||
{copied | ||
? <ClipboardDocumentCheckIcon className="h-5 w-5 text-zinc-500" /> | ||
: <ClipboardDocumentIcon className="h-5 w-5 text-zinc-500" />} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className='mx-5 md:mx-0 h-5 border-l border-r shadow-sm' /> | ||
<div className='mx-5 md:mx-0 border-t border-l border-r shadow-sm'> | ||
<div className='px-5 pt-10'> | ||
<h3 className='font-koulen text-zinc-600 text-xl'>USING SENDME:</h3> | ||
</div> | ||
<div className='md:flex sm:gap-5 border-b'> | ||
<div className='md:w-1/3 p-5 pb-10'> | ||
<div className='relative rounded border border-zinc-300 bg-zinc-100 p-2 py-8 h-40 mb-5'> | ||
<div className='absolute top-0 left-0 p-2 flex gap-1'> | ||
<div className='border border-zinc-400 w-3 h-3 rounded-full' /> | ||
<div className='border border-zinc-400 w-3 h-3 rounded-full' /> | ||
<div className='border border-zinc-400 w-3 h-3 rounded-full' /> | ||
</div> | ||
<p className='font-mono font-bold text-sm'>{'>'} $ sendme provide ~/great_photos</p> | ||
<p className='font-mono text-zinc-400 text-sm'>content added</p> | ||
<p className='font-mono text-zinc-400 text-sm'>run sendme get blobQmFoo...</p> | ||
</div> | ||
<h3 className='font-koulen text-3xl'>1. Setup</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>pass a file or folder you want to share to sendme. It'll spit out a ticket.</p> | ||
</div> | ||
<div className='md:w-1/3 p-5 pb-10'> | ||
<div className='relative p-2 flex h-40 mb-5'> | ||
<ChatBubbleLeftIcon className='w-6 h-6 mr-2' /> | ||
<div className='rounded-tr-lg rounded-br-lg rounded-bl-lg border bg-zinc-50 p-2 pb-10 mb-2 h-20'> | ||
hey here have some great photos: | ||
blobQmFoo... | ||
</div> | ||
</div> | ||
<h3 className='font-koulen text-3xl'>2. Paste</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>copy-paste the ticket to your friend.</p> | ||
</div> | ||
<div className='md:w-1/3 p-5 pb-10'> | ||
<div className='relative rounded border border-zinc-300 bg-zinc-100 p-2 py-8 h-40 mb-5'> | ||
<div className='absolute top-0 left-0 p-2 flex gap-1'> | ||
<div className='border border-zinc-400 w-3 h-3 rounded-full' /> | ||
<div className='border border-zinc-400 w-3 h-3 rounded-full' /> | ||
<div className='border border-zinc-400 w-3 h-3 rounded-full' /> | ||
</div> | ||
<p className='font-mono font-bold text-sm'>{'>'} $ sendme get blobQmFoo...</p> | ||
<p className='font-mono text-zinc-400 text-sm'>fetched to great_photos</p> | ||
</div> | ||
<h3 className='font-koulen text-3xl'>3. Download</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>run get to fetch data directly from your friend.</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className='mx-5 md:mx-0 h-5 border-l border-r shadow-sm' /> | ||
<div className='mx-5 md:mx-0 border-t border-l border-r shadow-sm'> | ||
<div> | ||
<div className='p-5'> | ||
<h3 className='text-2xl md:text-3xl font-koulen'>Free, for files & folders of any size</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>sendme works by connecting sender and receiver directly, so there's no need to upload to a server, which means no cost!</p> | ||
</div> | ||
<div className='md:flex border-t border-b'> | ||
<div className='p-5 md:border-r'> | ||
<h3 className='font-koulen text-3xl'>Fast</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>Sendme can saturate a 4Gbps connection.</p> | ||
</div> | ||
<div className='p-5 md:border-r'> | ||
<h3 className='font-koulen text-3xl'>Resumable fetching</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>Interrupted downloads pick up where they left off.</p> | ||
</div> | ||
<div className='p-5'> | ||
<h3 className='font-koulen text-3xl'>Integrity checks</h3> | ||
<p className='mt-1 text-sm/6 text-gray-500'>Data is automatically verified for correctness on both send and receive.</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className='border-t border-b bg-iroh-kv-1 p-5 py-20'> | ||
<h2 className='text-2xl font-bold font-spaceMono'>Sendme is built on <span className='text-irohPurple-500'>iroh</span></h2> | ||
<p className='md:max-w-lg mt-5'>Just like <a className='text-irohPurple-500' href="https://dumbpipe.dev">dumbpipe</a>, sendme is built on iroh. Sendme uses iroh <a className='text-irohPurple-700' href="/docs/layers/blobs">blobs</a> to send and verfiy your files, and <a className='text-irohPurple-700' href='/docs/layers/connections'>connections</a> to establish direct links between devices for data transfer</p> | ||
<Button href='/' variant='filled' className='mt-5 plausible-event-name=Sendme+Iroh+CTA+Click'>BUILD ON IROH</Button> | ||
</div> | ||
</div> | ||
<div className='mx-5 mb-20 md:mx-0 h-5 border-l border-r' /> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import {mdxAnnotations} from 'mdx-annotations'; | ||
|
||
export const recmaPlugins = [mdxAnnotations.recma]; |
Oops, something went wrong.