mirror of
https://github.com/System-End/stickers.git
synced 2026-04-19 10:10:26 +00:00
No description
Bumps the bundler group with 1 update in the / directory: [rack](https://github.com/rack/rack). Updates `rack` from 3.2.5 to 3.2.6 - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.2.5...v3.2.6) --- updated-dependencies: - dependency-name: rack dependency-version: 3.2.6 dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] <support@github.com> |
||
|---|---|---|
| .github | ||
| app | ||
| bin | ||
| config | ||
| db | ||
| lib/tasks | ||
| log | ||
| public | ||
| script | ||
| tmp | ||
| vendor | ||
| .dockerignore | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| .rubocop.yml | ||
| .ruby-version | ||
| config.ru | ||
| docker-compose.coolify.yml | ||
| Dockerfile | ||
| Gemfile | ||
| Gemfile.lock | ||
| package-lock.json | ||
| package.json | ||
| Procfile.dev | ||
| Rakefile | ||
| README.md | ||
| svelte.config.js | ||
| vite.config.ts | ||
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
Option 1: Coolify (Recommended)
Using Docker Compose (app + database):
- Create new resource → Docker Compose
- Point to your Git repo
- Set compose file to
docker-compose.coolify.yml - Set environment variables including
POSTGRES_PASSWORD - Set your domain for the
stickersservice - Deploy
Using Dockerfile (app only):
- Create new resource → Application → Dockerfile
- Point to your Git repo
- Set environment variables (see
.env.example) - Set
DATABASE_URLto your PostgreSQL instance - Set your domain
- Deploy
Option 2: Docker (Manual)
# Build and run
docker build -t stickers .
docker run -d -p 80:80 \
-e SECRET_KEY_BASE="$(rails secret)" \
-e DATABASE_URL="postgresql://user:pass@host/db" \
-e AIRTABLE_PAT="..." \
stickers
Production Environment Variables
| Variable | Description |
|---|---|
SECRET_KEY_BASE |
Rails secret (generate with rails secret) |
DATABASE_URL |
PostgreSQL connection string |
AIRTABLE_PAT |
Airtable Personal Access Token |
AIRTABLE_BASE_ID |
Airtable base ID |
AIRTABLE_STICKER_DB_TABLE_ID |
Stickers table ID |
AIRTABLE_SHOP_TABLE_ID |
Shop table ID |
AIRTABLE_DESIGN_TABLE_ID |
Designs table ID |
OIDC_ISSUER |
https://auth.hackclub.com |
OIDC_CLIENT_ID |
OIDC client ID |
OIDC_CLIENT_SECRET |
OIDC client secret |
OIDC_REDIRECT_URI |
https://your-domain.com/auth/oidc/callback |
See .env.example for a complete list.