尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Find a home for your food scraps.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Peels connects folks with food scraps to those who compost. It’s a free, non-commercial, community project.
Peels is built on top of Next.js and Supabase. The code is open source and could be used as a starting point for your own circular economy projects.
# Clone the repository
git clone https://github.com/peels-org/peels.git
cd peels
# Install dependencies
npm install
# Copy environment file (then add API keys)
cp .env.example .env.local
# Start development server
npm run dev
# Go to http://localhost:3000
Note: You'll need some API keys for full functionality. See Required Services below.
| Requirement | Version |
|---|---|
| Node.js | 18+ (LTS recommended) |
| npm/yarn | Latest stable |
| Git | Latest stable |
| Docker | Latest stable |
| Supabase CLI | Latest stable |
Deno is also required if you plan to work on Supabase edge functions.
You’ll need to populate the environment variables with keys from following services:
See Contributing if you need access to shared development keys.
peels/
├── src/ # Source code
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── lib/ # Utility functions and shared logic
│ └── proxy.ts # Next.js proxy for auth-aware routing
├── public/ # Static assets
├── supabase/ # Supabase configurations and migrations
└── package.json # Project dependencies and scripts
Thank you for contributing! Please read our Code of Conduct and contributing guidelines before you start.
Check out the list of issues you could help out on, discussions about future improvements, and our Wiki for information on how things are set up.
For minor improvements, feel free to just go ahead and create a pull request. For major changes, please open an issue first to discuss what you would like to change.
Personal keys for MapTiler and Protomaps will work just fine for local development.
For local-first Supabase development:
.env.example to .env.localnpm run supabase:startnpm run supabase:env.env.local contains NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331 (from npm run supabase:env)ANON_KEY value into NEXT_PUBLIC_SUPABASE_ANON_KEY in .env.localSERVICE_ROLE_KEY value into SUPABASE_SERVICE_ROLE_KEY in .env.localThe repo defaults NEXT_PUBLIC_SUPABASE_URL to the local stack so development does not need the hosted Peels project. Peels uses ports 54331–54334 so it can run beside other local Supabase projects. If .env.local still points at hosted Supabase, update it; copying .env.example later may not overwrite an existing file.
Keep the local URL, anon key, and service-role key together. Never reuse the hosted secret key for local development.
If you need to serve Supabase edge functions locally, copy supabase/functions/.env.example to supabase/functions/.env. That file is loaded by supabase start. Use supabase functions serve only when you want hot reload while editing function code. Production secrets should remain dashboard-managed for now.
For the fuller operational walkthrough, including GitHub/Vercel dashboard setup and fresh-computer bootstrap, see docs/supabase-local-first.md.
For how auth/session forwarding, public-page performance, footer locale state, unread chat dots, and deferred homepage demos fit together, see docs/auth-session-architecture.md.
Clone and set up codebase:
git clone https://github.com/peels-org/peels.git
cd peels
npm install
Populate environment variables:
.env.example to .env.localnpm run supabase:startnpm run supabase:env.env.local uses NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331ANON_KEY into NEXT_PUBLIC_SUPABASE_ANON_KEYSERVICE_ROLE_KEY into SUPABASE_SERVICE_ROLE_KEYStart development:
npm run supabase:start
npm run dev
Use the Supabase CLI as the default path for schema work:
# Start the local backend
npm run supabase:start
# See local connection details
npm run supabase:env
# Rebuild the local database from migrations + seed
npm run supabase:reset
For day-to-day development:
supabase/migrations/npm run supabase:resetnpm run devUse local Studio, psql, or the hosted Supabase dashboard for browsing rows and running ad hoc queries. Use the CLI for schema lifecycle, not as the main data browser.
supabase/config.tomlsupabase/seed.sqlsupabase/storage/npm run supabase:reset rebuilds the local database schema and datanpm run seed:local-media uploads local demo media into local Supabase bucketsThe demo media under supabase/storage/ is for local development only. Hosted Supabase branches and production should not sync bucket objects from Git.
Keep all local and preview data sanitized. Do not export or commit production data.
Peels already had schema history in the hosted project before migrations were committed to Git. If you need to re-bootstrap the repo from production, use this order:
supabase login
supabase link --project-ref mfnaqdyunuafbwukbbyr
supabase migration fetch
supabase db dump --schema public --file supabase/migrations/20251026060000_baseline_schema.sql
supabase migration repair 20251026060000 --status applied --linked
The important bit is that the baseline migration must exist in Git before the first fetched remote migration, and the hosted project must be marked as already having that baseline. That keeps local resets reproducible without asking production to replay the whole schema.
If you have custom auth or storage schema objects beyond the defaults, audit and pull those explicitly after the public baseline:
supabase db pull auth_schema --schema auth
supabase db pull storage_schema --schema storage
Do not use the Supabase dashboard for routine schema changes once a migration exists in Git. If an emergency dashboard hotfix is unavoidable, pull it back into the repo immediately before making the next change.
One-time manual setup in Supabase/GitHub should be:
supabase/**Automatic branchingSupabase changes onlymain as the production branchSupabase Preview check before mergeThe repo also includes a GitHub Actions workflow that replays the local Supabase setup on PRs touching supabase/**.
If Peels preview deployments run on Vercel, make sure the preview environment uses the branch-specific NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY values that Supabase provides for each preview branch instead of production credentials.
Some setup still lives in web dashboards because Git cannot store everything:
supabase/**Supabase Preview check before mergeIn plain English: the repo now tells Supabase and the app how to behave, but Supabase, GitHub, and Vercel still each need one “please use preview mode for PRs” switch turned on in their own settings pages.
You might need to clear out and restart your Next.js development server in the case that you add environment variables after the above steps. Here’s how to do that:
rm -rf .next
npm run dev
.prettierrc before submitting a pull requestsiteConfig.showNewsletterOnHomepage in src/config/site.ts. Turn it on when there is a recent issue to promote and off when the latest issue is no longer timely.Peels now keeps its product translations fully in-repo with next-intl. English lives in messages/en.json and is the source catalogue. Whenever you add or change user-facing UI copy, update en first and keep es and de complete alongside it. fr and pt-BR are also supported locales and should be updated when the change affects translated surfaces that already exist.
For app UI and metadata:
messages/*.jsonnpm run i18n:check after editing message filesnpm run check before handing work backFor newsletter issues:
src/content/newsletter/<slug>.mdxsrc/content/newsletter/<locale>/<slug>.mdxmetadata and customMetadata still need to be present for each locale-specific issue file so the newsletter index, issue page, and RSS feed can show the correct localised title and description/newsletter/feed.xml?locale=<locale>, so locale-specific metadata will flow through to the feed automaticallyFor legal and reference pages:
src/content/legal/<slug>.mdxsrc/content/legal/<locale>/<slug>.mdxFor newsletter issue emails:
supabase/functions/_shared/newsletter.tssupabase/functions/_templates/newsletter-issue-email.tsx, which links people to the web version of the issueNEWSLETTER_AUDIENCE_ID_EN, NEWSLETTER_AUDIENCE_ID_ES, NEWSLETTER_AUDIENCE_ID_DE, NEWSLETTER_AUDIENCE_ID_PT_BR, and NEWSLETTER_AUDIENCE_ID_FRIn plain English: new UI strings belong in messages/, longform newsletter and legal content belongs in locale-aware MDX files under src/content/, and newsletter emails need the current issue config updated in supabase/functions/_shared/newsletter.ts before sending.
Peels keeps testing intentionally small:
npm run check for i18n and formatting checksnpm run build for the production buildnpm run test:e2e for the local headless Playwright smoke suitenpm run test:e2e:prod for the production-like Playwright smoke suiteThe smoke suite covers seeded sign-in, public listing, profile, and chat flows against local Supabase data. It is designed to stay small and high-signal rather than grow into a broad frontend testing matrix.
Before npm run test:e2e or npm run test:e2e:prod, make sure you are using the local seeded app stack, not hosted Supabase:
npm run supabase:startnpm run supabase:resetnpm run seed:local-medianpm run supabase:env.env.local uses NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331ANON_KEY into NEXT_PUBLIC_SUPABASE_ANON_KEYSERVICE_ROLE_KEY into SUPABASE_SERVICE_ROLE_KEYIf your .env.local was previously set up for the hosted Peels project, update it before running Playwright. A working local test setup looks like:
NEXT_PUBLIC_SITE_URL=http://127.0.0.1:3000
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331
NEXT_PUBLIC_SUPABASE_ANON_KEY=<paste the ANON_KEY from npm run supabase:env>
SUPABASE_SERVICE_ROLE_KEY=<paste the SERVICE_ROLE_KEY from npm run supabase:env>
Then run either:
npm run test:e2e
or:
npm run test:e2e:prod
Use the local anon key that matches the running local Supabase stack. Do not mix the hosted project URL with the local anon key, or the local URL with a hosted anon key.
By default, Playwright starts its own app server on 127.0.0.1:3001, so it does not collide with the usual local next dev server on port 3000. Set PLAYWRIGHT_PORT if you need a different port.
In CI, pull requests run npm run check and npm run build. Pushes to main also run the production-like Playwright smoke suite.
For the first local Playwright run, install the browser once with:
npx playwright install chromium
Map changes are still a manual smoke-check area. When you touch /map, verify that the page loads, listing selection still works, search still works, and nothing obviously breaks in the browser.
Please review our License before you fork and built upon Peels for your own purposes.
Peels is designed to facilitate the sharing and repurposing of resources at a local community level. It’s therefore best suited as a foundation for similar circular economy projects. For example, you could use it to help kickstart a creative materials exchange platform or tool sharing platform. Let us know what you build!
This project is licensed under the GNU General Public License version 3 (GPLv3). See the LICENSE file for details.
In short: you can use Peels as a base for your own projects but only if you share-alike. That means you must license whatever you make under the same GLPv3 license and make the source code similarly available as we do with Peels.
Check out the Next.js and Supabase Starter Kit if your project doesn’t fit our license requirements.
Fork and clone:
git clone https://github.com/your-username/your-fork.git
cd your-fork
npm install
Set up your environment:
.env.example to .env.local.env.localInitialize and run:
npm run supabase:start
npm run supabase:reset
npm run dev