Implement send_otp and send_msg handlers with server-side validation, captcha verification, OTP generation/verification, rate limiting, session-backed multi-step flow, and SMS gateway integration. Replace broken contact endpoint and types with Astro server actions; delete endpoints/contact.ts, types/ContactForm.ts and src/components/ContactForm.astro. Update pages/contact.astro to use astro:actions and improve captcha handling (listen for solve and set hidden input). Adjust OTP timing (step 60s → 300s, VALID_PAST_OTP_STEPS 5 → 1). Add validator, @types/validator, Prettier and prettier-plugin-astro; include .prettierrc.mjs in tsconfig include. Add Prettier config for Astro
43 lines
1.2 KiB
JSON
43 lines
1.2 KiB
JSON
{
|
|
"name": "badblocks-personal-site",
|
|
"type": "module",
|
|
"version": "0.0.1",
|
|
"scripts": {
|
|
"dev": "astro dev",
|
|
"start": "bun run ./dist/server/entry.mjs",
|
|
"check": "astro check",
|
|
"build-only": "astro build",
|
|
"build": "astro check && astro build",
|
|
"build-remote": "astro check && astro build --remote",
|
|
"preview": "astro preview",
|
|
"astro": "astro"
|
|
},
|
|
"dependencies": {
|
|
"@astrojs/alpinejs": "^0.4.9",
|
|
"@astrojs/check": "^0.9.6",
|
|
"@astrojs/db": "^0.18.3",
|
|
"@astrojs/node": "^9.5.2",
|
|
"@astrojs/partytown": "^2.1.4",
|
|
"@astrojs/sitemap": "^3.6.0",
|
|
"@astrojs/ts-plugin": "^1.10.6",
|
|
"@cap.js/server": "^4.0.5",
|
|
"@cap.js/widget": "^0.1.33",
|
|
"@nurodev/astro-bun": "^2.1.2",
|
|
"@types/alpinejs": "^3.13.11",
|
|
"alpinejs": "^3.15.3",
|
|
"android-sms-gateway": "^3.0.0",
|
|
"astro": "^5.16.6",
|
|
"astro-htmx": "^1.0.6",
|
|
"htmx.org": "^2.0.8",
|
|
"iconify-icon": "^3.0.2",
|
|
"otplib": "^12.0.1",
|
|
"typescript": "^5.9.3",
|
|
"validator": "^13.15.26"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.5",
|
|
"@types/validator": "^13.15.10",
|
|
"prettier": "^3.8.1",
|
|
"prettier-plugin-astro": "^0.14.1"
|
|
}
|
|
}
|