diff --git a/src/enterprise.el b/src/enterprise.el index ba8be77..7c19253 100644 --- a/src/enterprise.el +++ b/src/enterprise.el @@ -86,9 +86,138 @@ fn enterprise() -> String {

The full Enterprise Agreement is published. Read it before reaching out — no NDA required to evaluate the terms.

Read the Enterprise Agreement → + + +
+

Express interest

+

I review every inquiry myself. Fill this out honestly — the questions are a filter, not a formality.

+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +

+ Neuron isn't the right fit here. I built this to expand what people can do, not to replace them. If that changes, I'm here. +

+
+ + + +
+ +
+ +
+ +
+

Received.

+

I review these personally. If it's a fit, I'll respond directly to your email — usually within a few days.

+
+
+ + + " } diff --git a/src/main.el b/src/main.el index ee2b212..af325da 100644 --- a/src/main.el +++ b/src/main.el @@ -239,6 +239,28 @@ fn handle_request(method: String, path: String, body: String) -> String { return "{\"__status__\":500,\"error\":\"Stripe session creation failed\"}" } + // ── Enterprise inquiry ──────────────────────────────────────────────────── + if str_eq(path, "/api/enterprise-inquiry") { + let resend_key: String = state_get("__resend_api_key__") + let name_val: String = if str_contains(body, "\"name\"") { "submitted" } else { "" } + if str_eq(name_val, "") { + return "{\"error\":\"invalid request\"}" + } + // Log to stdout regardless of email delivery + println("[enterprise-inquiry] " + body) + // Send via Resend if key is configured + if !str_eq(resend_key, "") { + let email_body: String = "{\"from\":\"Neuron Enterprise \",\"to\":[\"enterprise@neurontechnologies.ai\"],\"subject\":\"Enterprise Inquiry\",\"text\":" + body + "}" + let resp: String = http_post_auth( + "https://api.resend.com/emails", + resend_key, + email_body + ) + println("[enterprise-inquiry] resend: " + resp) + } + return "{\"received\":true}" + } + // ── Stripe webhook ──────────────────────────────────────────────────────── if str_eq(path, "/api/webhooks/stripe") { if str_contains(body, "checkout.session.completed") { @@ -322,11 +344,13 @@ let stripe_pub_key: String = env("STRIPE_PUBLISHABLE_KEY") let stripe_price_founding: String = env("STRIPE_PRICE_FOUNDING") let stripe_price_professional: String = env("STRIPE_PRICE_PROFESSIONAL") let license_api_url: String = env("NEURON_LICENSE_API_URL") +let resend_api_key: String = env("RESEND_API_KEY") state_set("__stripe_secret_key__", stripe_key) state_set("__stripe_publishable_key__", stripe_pub_key) state_set("__stripe_price_founding__", stripe_price_founding) state_set("__stripe_price_professional__", stripe_price_professional) state_set("__license_api_url__", license_api_url) +state_set("__resend_api_key__", resend_api_key) println(color_bold("Neuron landing") + " — http://localhost:3001") println(" HTML generated by El → " + html_path)