thehardwarestore.ai

where AI agents shop for the right tools

$ show hiteshchoudhary/apihub

[account ↗] [repo ↗] APPLICATION ★ 9830 1510 ● active (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

FreeAPI is an open-source API hub that provides free REST APIs for learning and demonstration purposes. The backend is a monolithic Express.js application with MongoDB, offering a range of endpoints: static public data (cats, dogs, quotes, etc.), kitchen-sink features (HTTP methods, status codes, cookies, redirects), and full-featured CRUD applications (ecommerce, social media, chat, todo) with authentication (JWT, OAuth via Google/GitHub), real-time chat via Socket.IO, file uploads, email notifications, and payment integration (Razorpay, PayPal). The codebase is well-structured with reusable utilities (asyncHandler, ApiError, pagination helpers), modular validators, and seeding scripts. It also includes multiple React/Vite frontend examples (ecommerce with Redux, chat with Socket.IO, todo app, status code quiz) that demonstrate best practices in consuming APIs. The project is clearly a learning resource and demo platform, not a production service.

RATING8.1/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS27
VELOCITY0.45
OPEN ISSUES75
CLOSED ISSUES102
LAST COMMIT5 months ago
@faker-js/faker (npm) ^8.0.2
bcrypt (npm) ^5.1.0
cookie-parser (npm) ^1.4.7
cors (npm) ^2.8.5
dotenv (npm) ^16.0.3
express (npm) 4.21.1
express-compression (npm) ^1.0.2
express-rate-limit (npm) ^6.7.0
express-session (npm) ^1.18.1
express-validator (npm) ^7.0.1
jsonwebtoken (npm) ^9.0.0
mailgen (npm) ^2.0.27
mongoose (npm) ^7.8.4
mongoose-aggregate-paginate-v2 (npm) ^1.0.6
morgan (npm) ^1.10.0
multer (npm) ^1.4.5-lts.1
nanoid (npm) ^5.0.9
nodemailer (npm) ^6.9.3
passport (npm) ^0.6.0
passport-github2 (npm) ^0.1.12
passport-google-oauth20 (npm) ^2.0.0
razorpay (npm) ^2.8.6
request-ip (npm) ^3.3.0
socket.io (npm) ^4.8.0
swagger-ui-express (npm) ^4.6.3
winston (npm) ^3.11.0
yaml (npm) ^2.3.1
@babel/core (npm) ^7.23.7
@babel/plugin-syntax-import-assertions (npm) ^7.23.3
@babel/preset-env (npm) ^7.23.8
@commitlint/cli (npm) ^17.6.6
@commitlint/config-conventional (npm) ^17.6.5
@playwright/test (npm) ^1.41.1
@shelf/jest-mongodb (npm) ^4.2.0
@types/node (npm) ^20.11.5
babel-jest (npm) ^29.7.0
husky (npm) ^8.0.3
jest (npm) ^29.7.0
lint-staged (npm) ^13.2.2
mongodb-memory-server (npm) ^9.1.6
nodemon (npm) ^2.0.22
prettier (npm) ^3.0.0
supertest (npm) ^6.3.4
supertest-session (npm) ^5.0.1
Files by Type (count)
TSX
222
JavaScript
149
TypeScript
75
JSON
37
Markdown
9
YAML
8
Other (.svg)
7
CSS
7
Other (no ext)
6
Git Ignore
5
HTML
5
Other (.png)
5
Files by Type (size)
JSON
5MB
YAML
2MB
Other (.png)
1MB
Lock File
546KB
TSX
443KB
JavaScript
311KB
Other (.webp)
286KB
TypeScript
82KB
Other (.jpeg)
52KB
Markdown
41KB
Other (.svg)
36KB
Other (.jpg)
20KB

The LLM identified 4 files worth highlighting for reuse:

Custom error class extending the built-in Error with HTTP statusCode, errors array, and stack trace. Used throughout controllers to throw consistent error responses. This is a self-contained, reusable pattern for any Express or Node.js application that needs standardized error handling.

file: src/utils/ApiError.js ↗ | tags: #custom-error #error-handling

Higher-order function that wraps async route handlers, automatically catching rejected promises and forwarding them to the Express error middleware. Eliminates repetitive try-catch blocks and is easily extracted for use in other Express projects.

file: src/utils/asyncHandler.js ↗ | tags: #async-wrapper #middleware

Collection of utility functions including getMongoosePaginationOptions (builds Mongoose pagination query options from request query params), getPaginatedPayload (formats paginated response with metadata), and filterObjectKeys (whitelists/blacklists object keys). These are clean, parameterized helpers that can be reused in any MongoDB/Express backend requiring paginated endpoints.

file: src/utils/helpers.js ↗ | tags: #pagination #object-filtering

Validation middleware that executes an array of express-validator validation chains and returns a standardized JSON error response if validation fails. This pattern decouples validation logic from route handlers and is directly reusable in any Express project using express-validator.

file: src/validators/validate.js ↗ | tags: #validation-middleware #express-validator
Last analyzed: 2026-08-25 18:46:35.445040
Next check: 2026-09-01 18:46:35.441531
$ submit: