A web-based interface for the Domain Monitoring System that allows users to track domain status and SSL certificate expiration.
The Domain Monitor Frontend is a web application that provides a user-friendly interface for the Domain Monitoring System. Users can register, log in, add domains to monitor, view domain status, and configure scheduled checks.
- User Authentication: Registration, login, and Google OAuth integration
- Domain Management: Add, view, and remove domains
- Status Dashboard: Visual display of domain status and SSL certificate information
- Scheduled Monitoring: Configure hourly or daily domain checks
- Responsive Design: Works on desktop and mobile devices
domain-monitor-frontend/
├── static/ # Static files
│ ├── dashboard-style.css # Dashboard styles
│ ├── style.css # Login/registration styles
│ ├── script.js # Login/registration scripts
│ ├── registration_script.js # Registration validation
│ ├── dashbored_script.js # Dashboard functionality
│ └── favicon.ico # Website favicon
├── templates/ # HTML templates
│ ├── index.html # Login page
│ ├── registration.html # Registration page
│ └── dashboard.html # Main dashboard
├── __pycache__/ # Python cache files (not tracked in git)
├── app.py # Main Flask application
├── config.py # Configuration and environment variables
├── Dockerfile # Docker configuration
├── requirements.txt # Python dependencies
├── .env # Environment variables (not tracked in git)
└── README.md # Project documentation
- Python 3.9+
- Flask and required packages
- Backend API service running
-
Clone the repository
git clone https://github.com/RazielRey/domain-monitor-frontend.git cd domain-monitor-frontend
-
Create and activate a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration, especially BACKEND_URL
-
Run the application
python app.py
-
Open your browser and navigate to
http://localhost:8080
-
Build the Docker image
docker build -t domain-monitor-frontend .
-
Run the container
docker run -p 8080:8080 -e BACKEND_URL=http://backend-service:5001 domain-monitor-frontend
The application can be configured through environment variables when running in Docker:
BACKEND_URL
: URL of the backend API (default:http://localhost:5001
)
- User login with username and password
- Registration link
- Google OAuth login option
- User registration form with validation
- Back button to return to login
- Top navigation with user profile and logout button
- Add Domain section with single domain input and bulk upload
- Schedule configuration for automated checks
- Domain table with status, SSL information, and action buttons
The frontend application interacts with the backend through the following REST API endpoints:
-
POST /api/login
: Authenticate user with username and password{ "username": "[email protected]", "password": "userpassword" }
-
POST /api/register
: Register a new user{ "username": "[email protected]", "password": "newpassword" }
-
GET /api/[email protected]
: Check if username is available- Returns:
{"available": true/false}
- Returns:
-
POST /api/google-login
: Register/login user with Google credentials{ "username": "[email protected]", "password": "googletoken", "is_google_user": true }
-
GET /api/[email protected]
: Get user's domains- Returns: Array of domain objects with status information
-
POST /api/check-domains
: Check status of provided domains{ "domains": ["example.com", "google.com"], "username": "[email protected]" }
-
DELETE /api/[email protected]&domain=example.com
: Remove a domain- Returns: Success/failure message
-
POST /api/schedule/hourly
: Configure hourly domain checks{ "username": "[email protected]", "interval": 2 }
-
POST /api/schedule/daily
: Configure daily domain checks{ "username": "[email protected]", "time": "08:00" }
-
GET /api/schedule/[email protected]
: Get current schedule status- Returns: Schedule configuration and next run time
-
POST /api/schedule/stop
: Stop scheduled domain checks{ "username": "[email protected]" }
GET /health
: Backend health check endpoint- Returns:
{"status": "healthy"}
- Returns:
The frontend manages user sessions and handles API authentication, making requests to the backend service configured in the BACKEND_URL
environment variable.
The application is compatible with:
- Google Chrome (latest 2 versions)
- Mozilla Firefox (latest 2 versions)
- Microsoft Edge (latest 2 versions)
- Safari (latest 2 versions)
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature
- Commit your changes:
git commit -am 'Add my feature'
- Push to the branch:
git push origin feature/my-feature
- Submit a pull request