Welcome to my personal backend development journal! π This repository is a collection of mini backend projects, each built with TypeScript, Express, and other helpful tools like Zod, UUID, ts-node, Drizzle ORM, and more.
The purpose of this repo is to learn, practice, and document important backend concepts including:
- Error handling
- Input validation
- CRUD operations
- Middleware
- Authentication & Authorization
- Password reset flows
- Rate limiting & security
- Testing
- Dockerization
- Deployment
Each project is located in its own folder under the src directory and includes documentation or comments explaining the thought process and what was learned.
A simple CRUD API for managing books with custom error handling using
ZodandExpress.
-
Demonstrates:
- Basic
Expresssetup with TypeScript - Using
Zodfor input validation - UUID generation for IDs
- Centralized error responses
- Clean code separation and use of interfaces
- Basic
Technologies Used:
- Node.js, TypeScript, Express, Zod, UUID, TSX
Steps to Run:
-
Install dependencies:
npm install
-
Run development server:
npm run dev
A complete authentication system with role-based access, JWT tokens, refresh tokens, and password reset functionality.
-
Demonstrates:
- User registration and login
- Password hashing with
bcrypt - JWT-based authentication and token refresh
- Role-based access control (RBAC)
- Rate limiting for security (login, registration, password reset)
- Password reset flow (with Postmark email support)
- Middleware for authentication, authorization, and validation
- Integration with
Drizzle ORMand Neon serverless database - Logging with
Winston - Validation with
Zodschemas
Technologies Used:
- Node.js
- TypeScript
- Express
- Zod β Schema validation
- JWT β Authentication tokens
- Bcrypt β Password hashing
- Postmark β Email sending
- Express-rate-limit β Security
- Drizzle ORM β Database modeling
- Neon (Postgres serverless)
- Winston β Logging
- TSX / ts-node β For running TypeScript
Steps to Run:
-
Install dependencies:
npm install
-
Copy the example environment variables:
cp .env.example .env
Then fill in the values (Neon DB URL, JWT secret, Postmark token, verified From email, APP URL, etc.).
-
Push migrations and generate schema with Drizzle:
npm run db:push npm run db:generate
-
Run the development server:
npm run dev
Learning Milestones Achieved:
- Implemented secure authentication flow with JWT
- Role-based access control (RBAC)
- Password reset flows with tokens
- Rate limiting for key endpoints
- Centralized error handling
- Integration with serverless database (Neon) and Drizzle ORM