Server
A production-ready REST API server built with Express 5. Covers the full backend stack: authentication, database access, webhooks, admin metrics, and a complete test suite.
Features
- User registration and login with JWT authentication
- Argon2 password hashing (resistant to GPU and ASIC attacks)
- Chirps (posts): create, retrieve, and delete
- Webhook endpoint for external integrations
- Admin metrics and usage tracking
- Database migrations with Drizzle ORM
- Full test suite with Vitest
Architecture
The API follows a clean middleware → handler → database pipeline. Every protected route runs through a JWT validation middleware that extracts and verifies the token before the handler ever sees the request.
Passwords are never stored — only argon2 hashes, which are memory-hard by design. Database access is fully typed through Drizzle ORM, keeping queries safe and schema changes trackable via migrations.
The metrics endpoint surfaces request counts and error rates for observability without needing an external tool.
Tech Stack
- Language: TypeScript
- Framework: Express 5
- Database: PostgreSQL via Drizzle ORM
- Auth: JWT (jsonwebtoken)
- Password hashing: Argon2
- Testing: Vitest