Angular 19
Angular Material - UI components
Chart.js with ng2-charts - Data visualization
RxJS - Reactive programming
Node.js with TypeScript and Express
ts-node 10.9 - TypeScript execution environment
MongoDB - Primary data storage for raw error events
Elasticsearch - Indexed search and analytics
Redis - Query caching and performance optimization
Before running this project, ensure you have the following installed:
Node.js (v20.19.0 or newer)
MongoDB (v6.2 or higher)
Elasticsearch (v16.7.3)
Redis (v6 or higher)
Windows 11:
Download MongoDB Community Server from MongoDB Download Center
Run the installer and follow the setup wizard
Download MongoDB Compass from MongoDB Compass Download
Install Compass and connect to mongodb://localhost:27017
Ubuntu Linux:
# Import MongoDB public GPG key
wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add -
# Create list file for MongoDB
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
# Update package database
sudo apt-get update
# Install MongoDB
sudo apt-get install -y mongodb-org
# Start MongoDB
sudo systemctl start mongod
sudo systemctl enable mongod
# Install MongoDB Compass
wget https://downloads.mongodb.com/compass/mongodb-compass_1.40.4_amd64.deb
sudo dpkg -i mongodb-compass_1.40.4_amd64.debWindows 11:
# Enable WSL2 (run as Administrator in PowerShell)
wsl --install
# Install Redis on Ubuntu WSL
wsl
sudo apt update
sudo apt install redis-server
sudo service redis-server startUbuntu Linux:
# Update package index
sudo apt update
# Install Redis
sudo apt install redis-server
# Configure Redis to start on boot
sudo systemctl enable redis-server
# Start Redis service
sudo systemctl start redis-server
# Test Redis connection
redis-cli ping
# Should return: PONG# Clone the repository
git clone git@github.com:omnidyon/insightful.git
cd insightful
# Backend setup
cd backend
npm install
# Frontend setup
cd ../frontend
npm installCheck MongoDB:
mongosh --eval "db.adminCommand('ping')"
# Should return: { "ok" : 1 }Check Redis:
redis-cli ping
# Should return: PONGFor Local:
cd backend
npm run localExpected result:
For Local in Debug mode (logging calls):
cd backend
npm run local-debugOther fully usabel enviroment is dev.
cd frontend
ng serveFrontend application will be available at http://localhost:4200
cd backend
npm run testExpected result:
cd frontend
ng run testExpected result:
GET /events/search - Search error events with filters
GET /events/stats - Get error statistics and aggregations
GET /health - Health check endpoint
GET /events/event/:id- Get a single event by id from MongoDB
GET /diagnostics/elasticsearch - Retrives Elasticsearch connection information
PUT /events/event/:id - Updates an event on Elasticsearch
POST /events/event - Creates a new event on Elasticsearch
POST /events/new-event- Creates a new event on MongoDB
DELETE /events/event/:id - Deletes an event from MongoDB
Postman collections is also provided in the porstman-collection folder.
Ensure MongoDB service is running: sudo systemctl status mongod
Check connection string in configuration
Verify MongoDB Compass can connect to localhost:27017
Confirm Redis server is running: sudo systemctl status redis-server
Check Redis configuration: sudo nano /etc/redis/redis.conf
Verify no firewall blocking port 6379
Clear node_modules and reinstall: rm -rf node_modules && npm install
Ensure using Node.js v20.19.0 or newer: node --version
Check Angular CLI version: ng version
Backend (3000): lsof -ti:3000 | xargs kill -9
Frontend (4200): lsof -ti:4200 | xargs kill -9





