A blog documenting bugs, edge cases, and difficult situations encountered throughout software engineering.
This project is licensed under the GNU GPL-3.0 license.
Main purpose is to provide free and open-source software. Feel free to use the source code. Referring to the repository would be very much appreciated.
bug-history/
├── api/ # Vercel Serverless Functions
│ └── views/ # View count tracking endpoints
├── frontend/ # Angular application
├── package.json # Root dependencies (API)
├── tsconfig.json # TypeScript config (API)
└── vercel.json # Vercel deployment configuration
- Frontend: Angular 21, TailwindCSS
- API: Vercel Edge Functions (TypeScript)
- Database: Upstash Redis
- Hosting: Vercel
cd frontend
npm install
npm startThe frontend runs at http://localhost:4200. Note that view count features require the API to be deployed.
API functions are designed to run on Vercel. For local testing, use Vercel CLI:
npm install
vercel devThis requires environment variables. Pull them from Vercel:
vercel env pull .env.local- Vercel CLI installed:
npm i -g vercel - Vercel account linked:
vercel login
-
Link the project:
vercel link
-
Create Upstash Redis database:
- Go to
Vercel Dashboard>Your Project>Storage - Select
Upstashfrom the Marketplace - Create a
Upstash for Redisdatabase - Connect it to your project
This automatically adds
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENenvironment variables. - Go to
-
Deploy:
vercel --prod
Connect your GitHub repository for automatic deployments:
vercel git connect| Variable | Description | Source |
|---|---|---|
UPSTASH_REDIS_REST_URL |
Redis REST API endpoint | Upstash integration |
UPSTASH_REDIS_REST_TOKEN |
Redis authentication token | Upstash integration |
IP_HASH_SALT |
Salt for IP hashing (optional) | Manual |
The Upstash variables are automatically injected by Vercel when Upstash is connected to the project.
To set the optional salt, go to Vercel Dashboard > Project > Settings > Environment Variables and add IP_HASH_SALT with a random string value.