Code Examples
Ready-to-use code snippets and sample projects you can run, modify, and learn from
Web Development
REST API with Node.js & Express
Complete REST API example with authentication, validation, and error handling using Express.js.
React Todo Application
Full-featured todo app with React hooks, state management, and local storage persistence.
Vue.js Shopping Cart
Shopping cart with Vue 3 composition API, product filtering, and checkout flow.
GraphQL Server Example
GraphQL API with Apollo Server, database queries, mutations, and subscriptions.
Backend & Data
MongoDB Queries & Aggregation
Common MongoDB patterns: filtering, aggregation pipelines, and optimization techniques.
PostgreSQL with TypeORM
Entity relationships, migrations, queries, and type-safe database interactions with TypeORM.
Redis Caching Pattern
Implementing cache-aside pattern, session storage, and rate limiting with Redis.
DevOps & Infrastructure
Docker Compose Setup
Multi-container development environment with app, database, cache, and reverse proxy.
Kubernetes Deployment
K8s manifests with deployments, services, configmaps, and persistent volumes.
GitHub Actions CI/CD
Automated testing, building, and deployment pipeline for Node.js applications.
Security & Authentication
JWT Authentication Flow
Complete JWT implementation: token generation, validation, refresh tokens, and logout.
OAuth 2.0 Integration
Social login with Google and GitHub using OAuth 2.0 authorization code flow.
API Key Authentication
API key generation, validation, rate limiting, and usage tracking middleware.
How to Use These Examples
1. Read & Understand
Review the code to understand the pattern and implementation approach
2. Clone or Copy
Fork on GitHub or copy the code into your project to get started
3. Customize
Modify dependencies, configuration, and business logic for your needs
4. Deploy
Follow the provided deployment instructions to run in your environment