Cablo - Car Rental System
The Blueprint
Cablo is a full-stack car rental management portal built with a decoupled React frontend and an Express.js backend connected to MongoDB Atlas. The project's security model rejects vulnerable database-level role flags, instead routing admin privileges strictly through environment variables compared directly against JWTs stored in HTTP-Only cookies to block XSS exploits. To prevent sluggish page loads, the massive admin panel was refactored into modular, memoized sub-components, reducing parent container files by over 1,500 lines while keeping React hooks and state sync controllers intact. The platform features an automated database seeder that detects fresh deployments and populates default admin records and vehicles lists on startup. Additionally, it handles DNS SRV resolution failures using legacy replica set connection fallbacks, ensuring steady connection to cloud nodes.
The Code Vault
Technical InsightBelow is a snapshot of the primary architectural logic. I designed this specific module to optimize data handling and ensure system modularity.
// Environment-Bound Administrative Access Guard
export const adminOnly = (req, res, next) => {
const systemAdminEmail = process.env.SYSTEM_ADMIN_EMAIL || 'admin@cablo.com';
if (
req.user &&
typeof req.user.email === 'string' &&
req.user.email.trim().toLowerCase() === systemAdminEmail.trim().toLowerCase()
) {
next();
} else {
res.status(403).json({ message: 'Access denied. Admin privileges required.' });
}
};Live Product
System Health
0.5s
Load Time
100%
Uptime
Architecture
- Modular Tab Component System
- Environment-Bound Admin Guards
- Database Autoseeding Engine
- CORS Whitelisting Middleware
Project Evolution
Sprint 1
May 2026
MVC Architecture & DB Schema Setup
Sprint 2
Jun 2026
HTTP-Only Cookie Auth & Admin Guards Integration
Sprint 3
Jun 2026
Admin Console Modularization & Tab System Refactoring
Sprint 4
Jul 2026
MongoDB Atlas Migration & Vercel/Render Deployment

