A modern, fast, secure, and deployment-ready web application to detect whether an email address has been compromised in public data breach incidents. The application is tailored for Indonesian users, featuring a 100 percent Indonesian user interface.
The application utilizes a clean architecture combining high-performance technologies:
- Frontend: Astro, TypeScript, Tailwind CSS (utilizing Static Site Generation for instant load times and a Largest Contentful Paint under 2 seconds).
- Backend: Python 3.13, FastAPI, Uvicorn, HTTPX, and Async (utilizing custom risk scoring and a rule-based mitigation recommendation engine).
- Deployment: Vercel Serverless (Astro static edge hosting and FastAPI Serverless Functions).
- Fast and Lightweight Examination: Direct integration with a public data breach API database with optimal client-side rendering.
- Custom Risk Evaluation: An algorithm calculating risk scores from 0 to 100 and risk categories (Safe, Low, Moderate, High, Critical).
- Intelligent Recommendation Engine: Specific security mitigation actions provided in Indonesian, tailored to the type of compromise (such as password, telephone number, username, new credentials, or old credentials).
- Protection and Security:
- A thread-safe in-memory cache with a 10-minute Time-To-Live (TTL) to reduce redundant external API requests.
- IP-based rate limiting (maximum of 10 requests per minute per IP address) to prevent API exploitation.
- Comprehensive security headers including Content Security Policy (CSP), Strict Transport Security (HSTS), X-Frame-Options, and X-Content-Type-Options.
- Safe error handling that prevents internal system stack traces from being exposed to the client.
- Accessibility (A11y): Built with full keyboard navigation support, semantic HTML elements, high-contrast focus rings, and Accessible Rich Internet Applications (ARIA) attributes.
- SEO Optimization: Fully integrated JSON-LD structured schema metadata (WebSite and FAQPage), robots.txt, sitemap.xml, comprehensive Open Graph and Twitter Card tags, and Cumulative Layout Shift (CLS) values near zero.
- Python: Version 3.13 or newer.
- Node.js: Version 18.x, 20.x, or newer.
- Vercel CLI (optional, for local deployment simulation).
Verify that you are in the workspace root directory. Copy the environment configuration file:
cp .env.example .env- Create a virtual environment (recommended):
python -m venv venv # On Windows: .\venv\Scripts\activate # On macOS or Linux: source venv/bin/activate
- Install Python dependencies:
pip install -r requirements.txt
- Start the FastAPI server using Uvicorn:
Note: The backend will be accessible at http://localhost:8000.
uvicorn api.index:app --reload --port 8000
- Open a new terminal session and install Node.js dependencies:
npm install
- Start the Astro development server:
Note: The frontend will be accessible at http://localhost:4321.
npm run dev
To replicate the Vercel production environment locally, which automatically routes static frontend pages and serverless backend functions, use the Vercel CLI:
- Install the Vercel CLI globally:
npm install -g vercel
- Start the local simulation:
Note: The Vercel CLI will build the frontend assets and run the FastAPI serverless functions under a single unified local address (typically http://localhost:3000).
vercel dev
The application is structured for zero-configuration deployment:
- Connect this repository to your Vercel account.
- Vercel will automatically identify the Astro framework.
- Click the Deploy button. The serverless functions inside the
api/directory will be built automatically using the Python runtime.
This project is licensed under the MIT License - see the LICENSE file for details.