A powerful web application for password validation and log file analysis using regular expressions.
- Validates password strength against 5 criteria:
- Minimum 8 characters
- Uppercase letter
- Lowercase letter
- Number
- Special character
- Visual feedback with strength indicator
- Displays regex patterns used for validation
- Extracts and identifies:
- IPv4 addresses
- User IDs
- Email addresses
- Shows line count
- Displays unique matches
├── backend/
│ ├── server.js # Express server
│ ├── package.json # Backend dependencies
│ ├── routes/
│ │ └── analyzerRoutes.js
│ └── controllers/
│ └── analyzerController
├── frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── home.jsx
│ │ ├── config.js # API configuration
│ │ ├── index.css
│ │ ├── password-strength/
│ │ │ ├── password.jsx
│ │ │ └── style.css
│ │ └── log-analyzer/
│ │ ├── logAnalyzer.jsx
│ │ └── style.css
│ ├── package.json
│ ├── vite.config.js
│ └── index.html
└── .env.example # Environment variables example
cd backend
npm installcd frontend
npm installcd backend
npm start
# Server runs on http://localhost:5000Or on Windows, run the batch file:
cd backend
start-server.batcd frontend
npm run dev
# Frontend runs on http://localhost:5173# Frontend build
cd frontend
npm run build
# Output will be in frontend/dist/Analyzes password strength
Request:
{
"password": "MyPassword123!"
}
Response:
{
"password": "MyPassword123!",
"passedRules": 5,
"totalRules": 5,
"strength": "Strong",
"rules": [
{
"name": "Minimum 8 characters",
"description": "At least 8 characters long",
"regex": "/.{8,}/",
"passed": true
},
...
]
}Analyzes log content for patterns
Request:
{
"content": "2024-01-01 user_id=U123 IP=192.168.1.1 email=user@example.com"
}
Response:
{
"ipv4": ["192.168.1.1"],
"userIds": ["U123"],
"emails": ["user@example.com"],
"lineCount": 1
}- Node.js
- Express.js
- CORS middleware
- React 19
- Vite
- React Icons (lucide-react, react-icons)
- CSS3
Create a .env file in the root directory:
BACKEND_PORT=5000
VITE_API_URL=http://localhost:5000/apiOr use the default configuration which connects to http://localhost:5000/api
If port 5000 is already in use:
- Find the process:
netstat -ano | findstr :5000 - Kill the process:
taskkill /PID <PID> /F - Or modify
backend/server.jsto use a different PORT via environment variable
- Ensure backend is running on port 5000
- Check CORS settings in
backend/server.js - Update
frontend/src/config.jsif using a different backend port
Ensure all dependencies are installed:
cd backend && npm install
cd frontend && npm installcd frontend
npm run lintcd backend
npm run devBuilt by Kaushik K S with React and powered by Regular Expressions
ISC