Hiring Without Whiteboards - Deployment & Usage Guide
Prerequisites
- Node.js (v16.x or higher) and npm (v8.x or higher)
- Git (v2.30 or higher)
- Airtable account (for database integration)
- GitHub account (for contributions and webhooks)
- Text editor with Markdown linting support (VS Code recommended)
Installation
1. Clone the Repository
git clone https://github.com/poteto/hiring-without-whiteboards.git
cd hiring-without-whiteboards
2. Install Linting Dependencies
npm install
3. Clone the API Repository (Optional)
For Airtable integration functionality:
git clone https://github.com/poteto/hww-api.git
cd hww-api
npm install
Configuration
Environment Variables
Create a .env file in the hww-api directory:
AIRTABLE_API_KEY=your_airtable_api_key
AIRTABLE_BASE_ID=your_base_id
AIRTABLE_TABLE_NAME=Companies
GITHUB_WEBHOOK_SECRET=your_webhook_secret
PORT=3000
Airtable Setup
-
Create a new base in Airtable
-
Create a table named "Companies" with the following fields:
Name(Single line text)URL(URL)Location(Single line text)Description(Long text)Keywords(Multiple select)
-
Generate an API key from your Airtable account settings
GitHub Webhook Configuration
- Go to repository Settings > Webhooks > Add webhook
- Payload URL:
https://your-api-domain.com/webhook - Content type:
application/json - Secret: Match your
GITHUB_WEBHOOK_SECRETenv variable - Events: Select "Pull requests"
Build & Run
Linting the Main Repository
Validate Markdown formatting and company entries:
npm run lint
Auto-fix linting errors:
npm run lint:fix
Running the API Locally (Development)
cd hww-api
npm run dev
The API will be available at http://localhost:3000
Production Build for API
cd hww-api
npm run build
npm start
Deployment
Deploying the API (Node.js)
Option 1: Vercel (Recommended)
npm i -g vercel
cd hww-api
vercel --prod
Configure environment variables in Vercel dashboard.
Option 2: Heroku
cd hww-api
heroku create hww-api
git push heroku main
heroku config:set AIRTABLE_API_KEY=your_key
Option 3: Docker
Create a Dockerfile in hww-api:
FROM node:16-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]
Build and run:
docker build -t hww-api .
docker run -p 3000:3000 --env-file .env hww-api
Static Site Deployment (GitHub Pages)
The main repository auto-renders on GitHub. To enable custom domain:
- Add a
CNAMEfile with your domain - Configure DNS to point to GitHub Pages
- Enable HTTPS in repository settings
Airtable Automation
The webhook integration automatically syncs merged PRs to Airtable. Ensure:
- GitHub webhook is active
- API service is running and accessible
- Airtable API key has write permissions
Troubleshooting
Linting Errors
Issue: remark-lint errors on company entries
Solution: Ensure entries follow the format:
- [Company Name](https://url.com/careers) | Location | Description
Run npm run lint:fix to auto-correct formatting.
Airtable Sync Failures
Issue: Webhook returns 500 error Check:
- Verify
AIRTABLE_API_KEYis valid and not expired - Confirm
AIRTABLE_BASE_IDmatches your base URL - Check that table name "Companies" exists with correct schema
- Review logs:
heroku logs --tailorvercel logs
GitHub Webhook Not Triggering
Issue: PR merges not syncing to Airtable Solution:
- Verify webhook secret matches between GitHub and env variable
- Check payload URL is correct and SSL certificate is valid
- Ensure "Pull requests" event is selected in webhook settings
- Test with a sample PR:
curl -X POST -H "Content-Type: application/json" -d '{"action":"closed","pull_request":{"merged":true}}' https://your-api/webhook
CORS Errors
Issue: Frontend cannot access API
Solution: Add CORS headers in hww-api middleware:
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
next();
});
Rate Limiting
Issue: Airtable API rate limits exceeded (5 requests per second) Solution: Implement request queuing or caching in the API layer. Use a Redis cache for read operations to reduce Airtable API calls.