PulsePoll is a lightweight, modular Node.js backend designed for client and polling management. It follows a clear separation of concerns, uses JSON-based persistence, and is structured for readability, maintainability, and extensibility. The system incorporates an event-driven logging mechanism to ensure consistent, centralized tracking of application behavior.
- Modular HTTP routing with verb-specific handlers
- Centralized business logic via service layer
- JSON-based persistent storage (no database required)
- Input validation for all client operations
- Event-driven hooks using a custom event system
- Standardized API responses
- Centralized logging utility
- Environment-based configuration support
src/
├── config/ # Environment and configuration management
├── constants/ # Shared constants and symbols
├── events/ # Custom event logic
├── http/
│ ├── handlers/ # HTTP verb-specific request handlers
│ └── router.js # Central routing logic
├── services/ # Business logic and response formatting
├── store/
│ └── clients.json # JSON-based persistent data store
├── utils/ # Logging and helper utilities
├── validators/ # Input validation for client operations
└── server.js # Application entry point
Responsible only for request parsing and response dispatching. Each HTTP method has a dedicated handler.
Encapsulates all business logic, including client creation, updates, deletion, and retrieval. HTTP handlers delegate processing to services.
All incoming requests are validated before execution using dedicated validator modules.
Client data is stored and managed in a local JSON file. No external database is used.
Custom events are handled through Eventmaker.js, enabling extensible hooks such as logging and notifications.