Thanks for taking the time to contribute! Here's how to get started.
git clone https://github.com/30jannik06/stack-api.git
cd stack-api
npm install
cp .env.example .env.local
npm run devstack-api/
├── app/
│ ├── api/
│ │ ├── discord/ # Discord endpoints
│ │ ├── github/ # GitHub endpoints
│ │ ├── npm/ # NPM endpoints
│ │ ├── twitch/ # Twitch endpoints
│ │ ├── steam/ # Steam endpoints
│ │ └── health/ # Health check
│ ├── discord/ # Discord preview page
│ ├── github/ # GitHub preview page
│ ├── npm/ # NPM preview page
│ ├── twitch/ # Twitch preview page
│ ├── steam/ # Steam preview page
│ └── page.tsx # Landing page
├── .env.example
├── vercel.json
└── next.config.mjs
- Create the API route under
app/api/<service>/ - Create the preview page under
app/<service>/page.tsx - Add the endpoints to the landing page
app/page.tsx - Update
.env.exampleif new environment variables are needed - Update
README.mdwith the new endpoints
- TypeScript – all files must be
.tsor.tsx, noanywhere avoidable - Error handling – every route must return proper error responses with
{ error: string } - Cache headers – always set
Cache-Controlon responses - Formatting – run
npm run formatbefore committing
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm run lint |
Run ESLint |
npm run format |
Run Prettier |
- TypeScript types correct
- Error handling on all code paths
-
Cache-Controlheader set -
.env.exampleupdated if needed -
README.mdupdated -
npm run lintpasses -
npm run formatrun
Open an issue using the Bug Report template.
Open an issue using the Feature Request template.