Need a Frontend partner?

const { SESClient, SendEmailCommand } = require("@aws-sdk/client-ses"); let fetch; (async () => { fetch = (await import("node-fetch")).default; })(); console.log("AWS REGION: ${process.env.MY_AWS_REGION}"); console.log("AWS ACCESS KEY ID: ${process.env.MY_AWS_ACCESS_KEY_ID ? "SET" : "NOT SET"}"); console.log("EMAIL USER: ${process.env.EMAIL_USER}"); console.log("TELEGRAM BOT TOKEN SET: ${process.env.TELEGRAM_BOT_TOKEN ? "YES" : "NO"}"); console.log("TELEGRAM USER SET: ${process.env.TELEGRAM_USER ? "YES" : "NO"}"); const sesClient = new SESClient({ region: process.env.MY_AWS_REGION, credentials: { accessKeyId: process.env.MY_AWS_ACCESS_KEY_ID, secretAccessKey: process.env.MY_AWS_SECRET_ACCESS_KEY, }, }); exports.handler = async function (event, context) { console.log("Lambda function triggered"); if (!event.body) { console.error("Request body is missing"); return { statusCode: 400, body: JSON.stringify({ message: "Missing request body" }), }; } let body; // Support for both JSON and URL-encoded data const contentType = event.headers["content-type"] || event.headers["Content-Type"] || ""; if (contentType.includes("application/x-www-form-urlencoded")) { const qs = require("querystring"); body = qs.parse(event.body); } else { try { body = JSON.parse(event.body); } catch (error) { console.error("Invalid JSON input:", error); return { statusCode: 400, body: JSON.stringify({ message: "Invalid JSON input" }), }; } } const { name, sendSwitcher, message, contactInfo } = body; console.log("Received request with sendSwitcher: ${sendSwitcher}"); if (sendSwitcher === "telegram") { const telegramMessage = `Name: ${name} Telegram: ${contactInfo} Message: ${message}`; const telegramURL = `https://api.telegram.org/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMessage`; console.log("Telegram Message: ${telegramMessage}"); console.log("Sending request to Telegram API: ${telegramURL}"); try { const response = await fetch(telegramURL, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ chat_id: process.env.TELEGRAM_USER, text: telegramMessage, }), }); const data = await response.json(); console.log("Telegram API Response: ${JSON.stringify(data)}"); if (!response.ok) { throw new Error(`Telegram API Error: ${JSON.stringify(data)}`); } return { statusCode: 200, body: JSON.stringify({ message: "Request sent via Telegram", data, }), }; } catch (error) { console.error("Telegram API error: ${error.message}"); return { statusCode: 500, body: JSON.stringify({ message: "Sending error via Telegram", error: error.message, }), }; } } else if (sendSwitcher === "email") { console.log("Preparing to send email..."); const emailParams = { Destination: { ToAddresses: [process.env.EMAIL_USER] }, Message: { Body: { Text: { Data: `Name: ${name} Email: ${contactInfo} Message: ${message}`, }, }, Subject: { Data: "Form Request" }, }, Source: process.env.EMAIL_USER, }; try { const data = await sesClient.send( new SendEmailCommand(emailParams) ); console.log("Email sent successfully: ${JSON.stringify(data)}"); return { statusCode: 200, body: JSON.stringify({ message: "Request sent via email", data, }), }; } catch (error) { console.error("Email send error: ${error.message}"); return { statusCode: 500, body: JSON.stringify({ message: "Error sending via email", error: error.message, }), }; } } return { statusCode: 400, body: JSON.stringify({ message: "Invalid sendSwitcher" }), }; };

Досвід використання технологій

  • Frontend

    HTML, CSS/SCSS/LESS, JavaScript, React, Responsive/Flexbox, Bootstrap, BEM, LazyBlocks, Figma, Photoshop, WordPress/WooCommerce, TypeScript.
  • Backend

    Node.js, Express, Nginx, SQL, PHP, XAMPP, Open Server, MongoDB, Mongoose.
  • DevOps/Tools

    Git, Npm, GitHub, Bitbucket, REST API, Vercel, Netlify, Firebase, Paid Hosting, Webpack, Vite.
SQLHTMLNginxFigmaPhotoshopJavaScriptWooCommerceSCSS/LESSPHPFlexboxNetlifyNode.jsBitbucketFullStackPaid HostingVercelGitYarnJQueryREST APIBEMFirebaseBootstrapNpmGitHubBackendResponsiveSemanticReactVS CodeWordPressCSSLinkbuildingOpen ServerWeb DevelopmentMobile FirstDesktop FirstGulpWebpackViteLazyBlocks
SQLHTMLNginxFigmaPhotoshopJavaScriptWooCommerceSCSS/LESSPHPFlexboxNetlifyNode.jsBitbucketFullStackPaid HostingVercelGitYarnJQueryREST APIBEMFirebaseBootstrapNpmGitHubBackendResponsiveSemanticReactVS CodeWordPressCSSLinkbuildingOpen ServerWeb DevelopmentMobile FirstDesktop FirstGulpWebpackViteLazyBlocks
SQLHTMLNginxFigmaPhotoshopJavaScriptWooCommerceSCSS/LESSPHPFlexboxNetlifyNode.jsBitbucketFullStackPaid HostingVercelGitYarnJQueryREST APIBEMFirebaseBootstrapNpmGitHubBackendResponsiveSemanticReactVS CodeWordPressCSSLinkbuildingOpen ServerWeb DevelopmentMobile FirstDesktop FirstGulpWebpackViteLazyBlocks
WebpackBitbucketPHPHTMLNode.jsBootstrapSemanticMobile FirstBEMGitSCSS/LESSGulpOpen ServerNginxReactBackendPaid HostingPhotoshopYarnLazyBlocksVS CodeGitHubNetlifyWordPressREST APIJQueryFullStackFirebaseVercelViteFigmaWooCommerceWeb DevelopmentFlexboxSQLResponsiveCSSDesktop FirstNpmJavaScriptLinkbuilding
WebpackBitbucketPHPHTMLNode.jsBootstrapSemanticMobile FirstBEMGitSCSS/LESSGulpOpen ServerNginxReactBackendPaid HostingPhotoshopYarnLazyBlocksVS CodeGitHubNetlifyWordPressREST APIJQueryFullStackFirebaseVercelViteFigmaWooCommerceWeb DevelopmentFlexboxSQLResponsiveCSSDesktop FirstNpmJavaScriptLinkbuilding
WebpackBitbucketPHPHTMLNode.jsBootstrapSemanticMobile FirstBEMGitSCSS/LESSGulpOpen ServerNginxReactBackendPaid HostingPhotoshopYarnLazyBlocksVS CodeGitHubNetlifyWordPressREST APIJQueryFullStackFirebaseVercelViteFigmaWooCommerceWeb DevelopmentFlexboxSQLResponsiveCSSDesktop FirstNpmJavaScriptLinkbuilding

Останні роботи

  • HR's лендінг

    trinity-managmenttrinity-managment

    Верстка Figma-макета з використанням: html, css, js, react, express, api визначення телефонного кода країни, telegram api для прийому повідомлень через бота.

  • WP WooCommerce
    PC shop

    comp-shopcomp-shopcomp-shopcomp-shopcomp-shopcomp-shopcomp-shopcomp-shopcomp-shopcomp-shop
    • Оплата. 1. оплата під час отримання або 2. передплата - переказ на картку по номеру замовлення.
    • Доставка. Нова Пошта відділення/поштомат або адресна доставка.
    • Замовлення. Повідомлення на пошту з номером, списком замовлення, та інструкцією по оплаті.
    • Реєстрація та авторизація користувачів. Особистим кабінет з обраним та попередніми замовленнями.
    • Wishlist для НЕзареєстрованих також доступний тимчасово.
    • Акції/знижки. Автоматично зараховується скидка за оплату від зазначеної ціни, або безкоштовна доставка від зазначеної ціни.
    • Тестувався на платному хостингу zzz.com.ua
    • Респонсивний адаптивний дизайн під всі девайси.
  • Отримати лінк на свій майбутній сайт

Collaboration

const { SESClient, SendEmailCommand } = require("@aws-sdk/client-ses"); let fetch; (async () => { fetch = (await import("node-fetch")).default; })(); console.log("AWS REGION: ${process.env.MY_AWS_REGION}"); console.log("AWS ACCESS KEY ID: ${process.env.MY_AWS_ACCESS_KEY_ID ? "SET" : "NOT SET"}"); console.log("EMAIL USER: ${process.env.EMAIL_USER}"); console.log("TELEGRAM BOT TOKEN SET: ${process.env.TELEGRAM_BOT_TOKEN ? "YES" : "NO"}"); console.log("TELEGRAM USER SET: ${process.env.TELEGRAM_USER ? "YES" : "NO"}"); const sesClient = new SESClient({ region: process.env.MY_AWS_REGION, credentials: { accessKeyId: process.env.MY_AWS_ACCESS_KEY_ID, secretAccessKey: process.env.MY_AWS_SECRET_ACCESS_KEY, }, }); exports.handler = async function (event, context) { console.log("Lambda function triggered"); if (!event.body) { console.error("Request body is missing"); return { statusCode: 400, body: JSON.stringify({ message: "Missing request body" }), }; } let body; // Support for both JSON and URL-encoded data const contentType = event.headers["content-type"] || event.headers["Content-Type"] || ""; if (contentType.includes("application/x-www-form-urlencoded")) { const qs = require("querystring"); body = qs.parse(event.body); } else { try { body = JSON.parse(event.body); } catch (error) { console.error("Invalid JSON input:", error); return { statusCode: 400, body: JSON.stringify({ message: "Invalid JSON input" }), }; } } const { name, sendSwitcher, message, contactInfo } = body; console.log("Received request with sendSwitcher: ${sendSwitcher}"); if (sendSwitcher === "telegram") { const telegramMessage = `Name: ${name} Telegram: ${contactInfo} Message: ${message}`; const telegramURL = `https://api.telegram.org/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMessage`; console.log("Telegram Message: ${telegramMessage}"); console.log("Sending request to Telegram API: ${telegramURL}"); try { const response = await fetch(telegramURL, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ chat_id: process.env.TELEGRAM_USER, text: telegramMessage, }), }); const data = await response.json(); console.log("Telegram API Response: ${JSON.stringify(data)}"); if (!response.ok) { throw new Error(`Telegram API Error: ${JSON.stringify(data)}`); } return { statusCode: 200, body: JSON.stringify({ message: "Request sent via Telegram", data, }), }; } catch (error) { console.error("Telegram API error: ${error.message}"); return { statusCode: 500, body: JSON.stringify({ message: "Sending error via Telegram", error: error.message, }), }; } } else if (sendSwitcher === "email") { console.log("Preparing to send email..."); const emailParams = { Destination: { ToAddresses: [process.env.EMAIL_USER] }, Message: { Body: { Text: { Data: `Name: ${name} Email: ${contactInfo} Message: ${message}`, }, }, Subject: { Data: "Form Request" }, }, Source: process.env.EMAIL_USER, }; try { const data = await sesClient.send( new SendEmailCommand(emailParams) ); console.log("Email sent successfully: ${JSON.stringify(data)}"); return { statusCode: 200, body: JSON.stringify({ message: "Request sent via email", data, }), }; } catch (error) { console.error("Email send error: ${error.message}"); return { statusCode: 500, body: JSON.stringify({ message: "Error sending via email", error: error.message, }), }; } } return { statusCode: 400, body: JSON.stringify({ message: "Invalid sendSwitcher" }), }; };
const { SESClient, SendEmailCommand } = require("@aws-sdk/client-ses"); let fetch; (async () => { fetch = (await import("node-fetch")).default; })(); console.log("AWS REGION: ${process.env.MY_AWS_REGION}"); console.log("AWS ACCESS KEY ID: ${process.env.MY_AWS_ACCESS_KEY_ID ? "SET" : "NOT SET"}"); console.log("EMAIL USER: ${process.env.EMAIL_USER}"); console.log("TELEGRAM BOT TOKEN SET: ${process.env.TELEGRAM_BOT_TOKEN ? "YES" : "NO"}"); console.log("TELEGRAM USER SET: ${process.env.TELEGRAM_USER ? "YES" : "NO"}"); const sesClient = new SESClient({ region: process.env.MY_AWS_REGION, credentials: { accessKeyId: process.env.MY_AWS_ACCESS_KEY_ID, secretAccessKey: process.env.MY_AWS_SECRET_ACCESS_KEY, }, }); exports.handler = async function (event, context) { console.log("Lambda function triggered"); if (!event.body) { console.error("Request body is missing"); return { statusCode: 400, body: JSON.stringify({ message: "Missing request body" }), }; } let body; // Support for both JSON and URL-encoded data const contentType = event.headers["content-type"] || event.headers["Content-Type"] || ""; if (contentType.includes("application/x-www-form-urlencoded")) { const qs = require("querystring"); body = qs.parse(event.body); } else { try { body = JSON.parse(event.body); } catch (error) { console.error("Invalid JSON input:", error); return { statusCode: 400, body: JSON.stringify({ message: "Invalid JSON input" }), }; } } const { name, sendSwitcher, message, contactInfo } = body; console.log("Received request with sendSwitcher: ${sendSwitcher}"); if (sendSwitcher === "telegram") { const telegramMessage = `Name: ${name} Telegram: ${contactInfo} Message: ${message}`; const telegramURL = `https://api.telegram.org/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMessage`; console.log("Telegram Message: ${telegramMessage}"); console.log("Sending request to Telegram API: ${telegramURL}"); try { const response = await fetch(telegramURL, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ chat_id: process.env.TELEGRAM_USER, text: telegramMessage, }), }); const data = await response.json(); console.log("Telegram API Response: ${JSON.stringify(data)}"); if (!response.ok) { throw new Error(`Telegram API Error: ${JSON.stringify(data)}`); } return { statusCode: 200, body: JSON.stringify({ message: "Request sent via Telegram", data, }), }; } catch (error) { console.error("Telegram API error: ${error.message}"); return { statusCode: 500, body: JSON.stringify({ message: "Sending error via Telegram", error: error.message, }), }; } } else if (sendSwitcher === "email") { console.log("Preparing to send email..."); const emailParams = { Destination: { ToAddresses: [process.env.EMAIL_USER] }, Message: { Body: { Text: { Data: `Name: ${name} Email: ${contactInfo} Message: ${message}`, }, }, Subject: { Data: "Form Request" }, }, Source: process.env.EMAIL_USER, }; try { const data = await sesClient.send( new SendEmailCommand(emailParams) ); console.log("Email sent successfully: ${JSON.stringify(data)}"); return { statusCode: 200, body: JSON.stringify({ message: "Request sent via email", data, }), }; } catch (error) { console.error("Email send error: ${error.message}"); return { statusCode: 500, body: JSON.stringify({ message: "Error sending via email", error: error.message, }), }; } } return { statusCode: 400, body: JSON.stringify({ message: "Invalid sendSwitcher" }), }; };