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/dnywh/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 |
Deno and Docker are 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
│ └── middleware.ts # Next.js middleware for auth
├── 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. You’ll probably need the shared development keys for Supabase, so please introduce yourself and tell us how you plan to help on the discussion board. We’ll go from there.
Note: We’re exploring ways to make local development work without a shared development key for Supabase, probably by seeding example data and doing something similar for authentication. We’d love your help with this.
Environmental variables can also be optionally added to Supabase edge functions for local testing. You’re unlikely to need these though, as each edge function currently requires user information and interaction.
-
Clone and set up codebase:
git clone https://github.com/dnywh/peels.git cd peels npm install
-
Populate environment variables:
- Copy
.env.example
to.env.local
- Request development credentials via our discussions board
- Copy
-
Start development:
npm run dev
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
- We use Pigment CSS for styling at a component-level
- We’re slowly moving towards TypeScript for type safety
- Heavy commenting is encouraged to make the codebase accessible to others
- Code formatting is handled by Prettier. Please ensure your code is formatted according to
.prettierrc
before submitting a pull request
- Check existing issues for known problems
- Create a new issue if you find a bug or have a feature request
- Join our discussion board for anything else
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:
- Follow the services setup in Prerequisites
- Copy
.env.example
to.env.local
- Add your API keys to
.env.local
-
Initialize and run:
npx supabase db push npm run dev