A light, high-performance RESTful API built with Node.js (ES Modules), Express.js, and Neon Serverless PostgreSQL. Features secure password hashing with bcrypt, CRUD operations for user logs, centralized error handling, and zero-config deployment to Vercel.
- Runtime: Node.js (ES6+ ES Modules)
- Framework: Express.js
- Database: PostgreSQL (Hosted on Neon)
- Database Client:
pg(node-postgres with connection pooling) - Security:
bcrypt/bcryptjspassword hashing - Deployment: Vercel Serverless Functions
- User Authentication: Secure registration and login flow with
bcryptsalt hashing. - Log Management: Full CRUD (Create, Read, Update, Delete) capability for user daily entries.
- Centralized Async Handling: Async wrapper to eliminate boilerplate
try...catchblocks. - Production-Ready Security: Environment variable isolation for database secrets using
dotenv. - Serverless Prepared: Modularized setup with
vercel.jsonfor rapid deployment.
.
βββ middleware/
β βββ errorHandler.js # Async wrapper & centralized error handler
βββ public/ # Static assets & frontend UI
βββ .env.example # Example environment template
βββ .gitignore # Git exclusion rules
βββ db.js # PostgreSQL Pool configuration
βββ package.json # Dependencies and scripts
βββ server.js # Express app routing and configuration
βββ vercel.json # Vercel deployment routing rules
βββ README.md # Project documentation