Simplified Malaysia Digital Arrival Card (MDAC) registration with a beautiful web interface.
- 🎨 Beautiful UI - Clean, modern interface with blue/teal travel theme
- 💾 Local storage - Person and trip details saved in browser localStorage
- 🔒 Type-safe - Full Pydantic validation with proper enums
- 🎓 Network School - Pre-configured for Network School destination
uv syncexport TWOC_API_KEY="your_2captcha_api_key"uv run uvicorn app:app --reloadThen open http://localhost:8000 in your browser.
uv run python example.pyThe web interface provides:
- Smart defaults: Most fields pre-filled with sensible defaults
- localStorage persistence: Your personal details are saved for next time
- Advanced options: Hidden by default, expand when needed
- Fixed destination: Network School (Johor) is pre-configured
- Date validation: Ensures all dates are in DD/MM/YYYY format
-
Personal Information - Always visible
- Full name, passport number, nationality
- Date of birth, gender, passport expiry
- Email and phone number
-
Trip Information - Always visible
- Length of stay (default: 30 days)
-
Advanced Options - Hidden by default
- Arrival date (defaults to today)
- Travel mode (Air/Land/Sea)
- Embarkation point (default: Singapore)
- Vessel/flight number
GET /- Web interfacePOST /api/submit- Submit MDAC registration
curl -X POST http://localhost:8000/api/submit \
-H "Content-Type: application/json" \
-d '{
"person": {
"name": "JOHN DOE",
"passport_number": "A12345678",
"date_of_birth": "01/01/1990",
"nationality": "USA",
"gender": "1",
"passport_expiry": "31/12/2030",
"email": "[email protected]",
"phone_number": "1234567890"
},
"trip": {
"length_of_stay_days": 30,
"arrival_date": null,
"travel_mode": "2",
"embarkation_point": "SGP",
"vessel_name": "BUS"
}
}'.
├── app.py # FastAPI web application
├── mdac.py # Core MDAC logic with enums and models
├── pyproject.toml # Dependencies
├── example.py # Example usage of the MDAC registration function
└── README.md # This file
- Country: 50+ common countries (Singapore, Malaysia, USA, UK, etc.)
- Gender: Male, Female
- TravelMode: Air, Land, Sea
- AccommodationType: Hotel, Friends/Relatives, Others
- State: All 16 Malaysian states
- AccommodationPreset: Network School (pre-configured)
All dates must be in DD/MM/YYYY format:
- ✅
15/03/1990 - ✅
31/12/2030 - ❌
03/15/1990(US format) - ❌
1990-03-15(ISO format)
- Uses 2captcha for automatic CAPTCHA solving
- Requires valid 2captcha API key in
TWOC_API_KEYenvironment variable - All requests use randomized headers to avoid fingerprinting
Use at your own risk. Developer not responsible for any issues with submissions. Always verify information before submitting.
MIT