Skip to content

Commit e826f40

Browse files
committed
add peels.org phase one page
1 parent 6368f89 commit e826f40

11 files changed

Lines changed: 387 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# next.js
1616
/.next/
1717
/out/
18+
peels-org/dist/
1819
/.swc/
1920

2021
# production

peels-org/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Peels.org Phase 1
2+
3+
This is the temporary static identity page for `peels.org`.
4+
5+
Phase 1 exists to make `peels.org` a stable, legitimate, low-risk domain while
6+
the working Peels app remains at [peels.app](https://peels.app). This site does
7+
not dual-host the app and does not redirect `peels.app`.
8+
9+
## Run locally
10+
11+
```sh
12+
npm run dev
13+
```
14+
15+
The local server defaults to [http://127.0.0.1:3001](http://127.0.0.1:3001).
16+
Set `PORT` to use another port.
17+
18+
## Build
19+
20+
```sh
21+
npm run build
22+
```
23+
24+
The static output is written to `dist/`.
25+
26+
## Preview the build
27+
28+
```sh
29+
npm run preview
30+
```
31+
32+
## Cloudflare Pages
33+
34+
Use these settings:
35+
36+
- Project root: `peels-org`
37+
- Build command: `npm run build`
38+
- Build output directory: `dist`
39+
40+
The page intentionally includes `noindex, follow` robots metadata for this
41+
temporary phase.

peels-org/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "peels-org",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "node scripts/serve.mjs src",
7+
"build": "node scripts/build.mjs",
8+
"preview": "node scripts/serve.mjs dist"
9+
}
10+
}

peels-org/scripts/build.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { cp, rm } from "node:fs/promises";
2+
import { dirname, join } from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
5+
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
6+
const sourceDir = join(projectRoot, "src");
7+
const outputDir = join(projectRoot, "dist");
8+
9+
await rm(outputDir, { force: true, recursive: true });
10+
await cp(sourceDir, outputDir, { recursive: true });
11+
12+
console.log("Built peels-org static site to dist/");

peels-org/scripts/serve.mjs

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { createReadStream } from "node:fs";
2+
import { stat } from "node:fs/promises";
3+
import { createServer } from "node:http";
4+
import { dirname, extname, join, normalize, sep } from "node:path";
5+
import { fileURLToPath } from "node:url";
6+
7+
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
8+
const requestedDir = process.argv[2] ?? "src";
9+
const rootDir = join(projectRoot, requestedDir);
10+
const port = Number(process.env.PORT ?? 3001);
11+
12+
const mimeTypes = {
13+
".css": "text/css; charset=utf-8",
14+
".html": "text/html; charset=utf-8",
15+
".ico": "image/x-icon",
16+
".jpg": "image/jpeg",
17+
".js": "text/javascript; charset=utf-8",
18+
".png": "image/png",
19+
};
20+
21+
function getFilePath(url) {
22+
const pathname = decodeURIComponent(
23+
new URL(url, `http://localhost`).pathname
24+
);
25+
const relativePath = pathname === "/" ? "index.html" : pathname.slice(1);
26+
const filePath = normalize(join(rootDir, relativePath));
27+
28+
if (!filePath.startsWith(`${rootDir}${sep}`) && filePath !== rootDir) {
29+
return null;
30+
}
31+
32+
return filePath;
33+
}
34+
35+
const server = createServer(async (request, response) => {
36+
const filePath = getFilePath(request.url ?? "/");
37+
38+
if (!filePath) {
39+
response.writeHead(400);
40+
response.end("Bad request");
41+
return;
42+
}
43+
44+
try {
45+
const fileStat = await stat(filePath);
46+
47+
if (!fileStat.isFile()) {
48+
response.writeHead(404);
49+
response.end("Not found");
50+
return;
51+
}
52+
53+
response.writeHead(200, {
54+
"Content-Length": fileStat.size,
55+
"Content-Type":
56+
mimeTypes[extname(filePath)] ?? "application/octet-stream",
57+
});
58+
createReadStream(filePath).pipe(response);
59+
} catch {
60+
response.writeHead(404);
61+
response.end("Not found");
62+
}
63+
});
64+
65+
server.listen(port, "127.0.0.1", () => {
66+
console.log(`Serving ${requestedDir}/ at http://127.0.0.1:${port}`);
67+
});
5.77 KB
Loading

peels-org/src/assets/favicon.ico

5.61 KB
Binary file not shown.

peels-org/src/assets/icon.png

5.92 KB
Loading
62.1 KB
Loading

peels-org/src/index.html

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>Peels</title>
7+
<meta
8+
name="description"
9+
content="Find a home for your food scraps, wherever you are."
10+
/>
11+
<meta name="robots" content="noindex, follow" />
12+
<link rel="canonical" href="https://peels.org/" />
13+
14+
<meta property="og:type" content="website" />
15+
<meta property="og:site_name" content="Peels" />
16+
<meta property="og:title" content="Peels" />
17+
<meta
18+
property="og:description"
19+
content="Find a home for your food scraps, wherever you are."
20+
/>
21+
<meta property="og:url" content="https://peels.org/" />
22+
<meta
23+
property="og:image"
24+
content="https://peels.org/assets/opengraph-image.jpg"
25+
/>
26+
<meta name="twitter:card" content="summary_large_image" />
27+
<meta name="twitter:title" content="Peels" />
28+
<meta
29+
name="twitter:description"
30+
content="Find a home for your food scraps, wherever you are."
31+
/>
32+
<meta
33+
name="twitter:image"
34+
content="https://peels.org/assets/opengraph-image.jpg"
35+
/>
36+
37+
<link rel="icon" href="/assets/favicon.ico" sizes="any" />
38+
<link rel="apple-touch-icon" href="/assets/apple-icon.png" />
39+
<link rel="stylesheet" href="/styles.css" />
40+
</head>
41+
<body>
42+
<main class="page-shell" aria-label="Peels">
43+
<section class="identity-card">
44+
<svg
45+
class="peels-logo"
46+
width="56"
47+
height="56"
48+
viewBox="0 0 40 40"
49+
fill="none"
50+
xmlns="http://www.w3.org/2000/svg"
51+
aria-hidden="true"
52+
focusable="false"
53+
>
54+
<path
55+
fill-rule="evenodd"
56+
clip-rule="evenodd"
57+
d="M22.117 25.0236C22.0626 25.1399 21.1275 27.1829 21.6387 29.0678C23.3213 35.2721 32.586 33.0404 36.0619 29.9945C36.8752 29.2788 35.6244 28.7399 34.9837 29.0678C33.5382 29.7808 32.2998 29.949 31.2795 29.9876C27.7401 30.1213 24.0955 27.8104 23.8743 24.055C23.7715 22.3169 24.1326 20.5727 24.4912 18.8408C24.6917 17.8723 24.8914 16.9077 25.0087 15.95C25.2159 14.2101 24.9198 12.4415 24.2469 10.8294C24.0203 10.2863 24.079 9.69476 24.2663 9.08082C24.3876 8.68304 24.5538 8.30151 24.7199 7.92021C24.8053 7.72428 24.8906 7.52841 24.9698 7.33042C25.2381 6.64248 24.975 5.90561 24.2572 5.6767C23.7351 5.51024 23.0765 5.60775 22.7456 6.07747C22.538 6.37215 22.461 6.73667 22.3867 7.08893C22.3703 7.16653 22.3541 7.24354 22.3366 7.31907C22.1732 8.02276 21.8981 9.17516 21.3322 9.68223C21.1805 9.81602 21.0086 9.92056 20.8367 10.0252C20.7612 10.0711 20.6857 10.1171 20.6118 10.1655C18.151 11.7797 17.3559 15.405 16.7259 18.277C16.6461 18.6408 16.569 18.9924 16.4914 19.3264C15.6954 22.7551 13.324 31.2727 8.45253 30.0095C7.74434 29.8259 6.53397 29.3077 5.94114 28.9129C5.34815 28.5179 4.3012 28.3811 4.82309 29.6186C9.5055 36.7843 19.2621 31.0815 22.117 25.0236ZM14.1864 21.7736C13.8346 22.9573 13.3777 24.2738 12.8024 25.5054C10.7569 23.9099 9.40015 21.1585 9.36067 18.7008C9.32505 16.4842 10.0315 15.6983 10.8887 17.8981C11.5861 19.6868 12.3434 21.2045 14.1864 21.7736Z"
58+
fill="currentColor"
59+
/>
60+
<rect
61+
x="4"
62+
y="1.5"
63+
width="32"
64+
height="37"
65+
rx="6.5"
66+
stroke="currentColor"
67+
stroke-width="3"
68+
stroke-linejoin="round"
69+
/>
70+
</svg>
71+
72+
<div class="copy">
73+
<p class="lead">Find a home for your food scraps, wherever you are</p>
74+
<p>
75+
Peels currently lives at peels.app. We’re preparing peels.org as
76+
Peels’ future home.
77+
</p>
78+
</div>
79+
80+
<a class="primary-link" href="https://peels.app">
81+
Open Peels at peels.app
82+
</a>
83+
84+
<a class="secondary-link" href="https://peels.app/contact">Contact</a>
85+
</section>
86+
</main>
87+
88+
<footer>© 2026 Peels</footer>
89+
</body>
90+
</html>

0 commit comments

Comments
 (0)