A comprehensive Node.js Express backend that serves as the API layer for a personal portfolio website. This serverless application provides various endpoints for portfolio features including work tracking, contact forms, visitor analytics, and interactive applications.
This backend server is designed to support a full-stack portfolio website with multiple interactive features. Built with Express.js and deployed as serverless functions on Vercel, it provides RESTful APIs for client applications while maintaining scalability and performance.
- Endpoint:
/workTracker - Functionality: Advanced work schedule and earnings calculator
- Features:
- Calendar generation for tax years (April-March)
- Overtime calculations and pay day tracking
- Flexible rota management with custom off-days
- JSON data storage for work patterns and rates
- Endpoint:
/contactForm - Functionality: Email handling system for portfolio inquiries
- Features:
- Email validation and processing
- Automated reply system
- Integration with nodemailer for SMTP
- Endpoint:
/visitor - Functionality: Analytics and visitor tracking
- Features:
- MongoDB integration for visitor data
- Real-time visitor counting
- Historical visit data storage
- ChatBot: Interactive chat functionality
- Tictactoe: Browser-based game with user accounts
- COVID Tracker: News and data aggregation
- User Registration/Login: Authentication system
- Express.js - Web application framework
- Node.js - JavaScript runtime environment
- MongoDB - NoSQL database for user data and analytics
- Mongoose - MongoDB object modeling
- JSON Files - Local storage for configuration and static data
- JSON Web Tokens (JWT) - Token-based authentication
- CORS - Cross-origin resource sharing
- Cookie Parser - Cookie handling middleware
- Nodemailer - Email service integration
- Axios - HTTP client for API requests
- Socket.io - Real-time communication
- Vercel - Serverless deployment platform
- Nodemon - Development server with hot reload
- Jest - Testing framework
- Google Cloud Functions - Cloud function support
- Moment.js - Date and time manipulation
- UUID - Unique identifier generation
- Dotenv - Environment variable management
Portfolio-Server/
├── routes/ # API route handlers
│ ├── WorkTracker/ # Work tracking functionality
│ ├── ContactForm/ # Email and contact handling
│ ├── VisitorsCounter/ # Analytics and visitor tracking
│ ├── Tictactoe/ # Game logic and user management
│ ├── ChatBot/ # Chat functionality
│ └── Covid/ # News and data aggregation
├── Functions/ # Google Cloud Functions
├── public/ # Static assets
├── test/ # Test suites
├── server.js # Main application entry point
├── vercel.json # Vercel deployment configuration
└── package.json # Dependencies and scripts
The application is deployed as serverless functions on Vercel, providing:
- Automatic scaling based on demand
- Global CDN distribution for optimal performance
- Zero-downtime deployments with instant rollbacks
- Environment variable management for secure configuration
Current Status: Production Ready
- ✅ Successfully deployed to Vercel
- ✅ Core WorkTracker functionality operational
- ✅ Contact form and visitor tracking ready
- ✅ Comprehensive testing suite implemented
- Test all API endpoints on deployed Vercel instance
- Implement proper error handling for production
- Add comprehensive logging for serverless environment
- Consider adding API documentation
- Set up monitoring and analytics
Production: https://your-vercel-deployment.vercel.app
Development: http://localhost:8080
GET /- Health check endpointPOST /workTracker- Work schedule and earnings calculationPOST /contactForm- Contact form submissionGET /visitor- Visitor analytics (when activated)
Built with ❤️ for portfolio demonstration and real-world application