mirror of
https://github.com/System-End/stickers.git
synced 2026-04-19 18:35:15 +00:00
3.5 KiB
3.5 KiB
Hack Club Stickers
Every Hack Clubber gets free, high-quality stickers. Completing programs and attending hackathons can earn more event-specific merch!
Features
- Trade stickers with other Hack Clubbers
- Browse an archive of all printed Hack Club stickers
- Submit new sticker designs
- Vote on your favourite designs
- Hack to earn monthly sticker shipments
- Use as an API for sticker designs
Contributing
- Help archive stickers at forms.hackclub.com/archive
Development Setup
git clone https://github.com/hackclub/stickers cd stickers # Install dependencies bundle install pnpm install # Set up environment cp .env.example .env # Edit .env with your credentials # Set up database bin/rails db:create db:migrate # Start the server (runs on port 3100) bin/dev
Environment Variables
Required environment variables in .env:
# Airtable AIRTABLE_PAT=your_personal_access_token AIRTABLE_BASE_ID=your_base_id AIRTABLE_STICKER_DB_TABLE_ID=your_stickers_table_id AIRTABLE_DESIGN_TABLE_ID=your_designs_table_id AIRTABLE_SHOP_TABLE_ID=your_shop_table_id # OAuth (auth.hackclub.com) OIDC_CLIENT_ID=your_client_id OIDC_CLIENT_SECRET=your_client_secret OIDC_REDIRECT_URI=http://localhost:3100/auth/oidc/callback
API Usage
You can use stickers.hackclub.com/api/ to get a list of all Hack Club stickers in JSON. Please don't hammer it too hard — let us know what you're up to and we can help you coexist within the rate limit.
Stickers
GET /api/stickers- List all visible stickersGET /api/stickers/:id- Get sticker details
Designs
GET /api/designs- List current user's designs (requires auth)GET /api/designs/all- List all designs (requires auth)POST /api/designs- Submit a new design (requires auth)POST /api/designs/:id/vote- Toggle vote on a design (requires auth)
Our Airtable has no passwords or secrets — if you want a read-only personal access token scoped to the base we can provide it! In general we're happy to help you over DM, but please have a glance over the code first!
Deployment
The app is deployed using Docker. To deploy:
# Build assets for production bin/rails assets:precompile
deploy with Docker directly:
docker build -t stickers . docker run -p 3000:3000 --env-file .env stickers
