[PR #320] [MERGED] Add Website Maker: LLM intake, Exa enrichment, preview & deploy (GitHub + Netlify), SEO and AI CSS #287

Closed
opened 2026-03-02 23:34:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/320
Author: @AJaySi
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @AJaySi

Base: mainHead: codex/review-onboarding-code-and-propose-website-templates-hndj03


📝 Commits (1)

  • ea250ef Add website maker implementation guide

📊 Changes

20 files changed (+1985 additions, -45 deletions)

View changed files

📝 backend/alwrity_utils/onboarding_manager.py (+18 -0)
📝 backend/api/onboarding_endpoints.py (+3 -1)
📝 backend/api/onboarding_utils/endpoints_config_data.py (+81 -1)
📝 backend/api/onboarding_utils/onboarding_summary_service.py (+6 -1)
backend/api/onboarding_utils/website_automation_service.py (+301 -0)
backend/database/migrations/add_user_websites_table.sql (+26 -0)
backend/models/user_website.py (+50 -0)
backend/models/user_website_request.py (+30 -0)
backend/scripts/run_user_websites_migration.py (+43 -0)
📝 backend/services/database.py (+3 -1)
backend/services/onboarding/website_intake_service.py (+170 -0)
backend/services/onboarding/website_style_service.py (+130 -0)
📝 backend/services/research/exa_service.py (+95 -1)
backend/services/user_website_service.py (+98 -0)
backend/services/website_automation_service.py (+286 -0)
docs/Onboarding/WEBSITE_MAKER_IMPLEMENTATION.md (+269 -0)
📝 frontend/src/api/onboarding.ts (+11 -1)
📝 frontend/src/components/OnboardingWizard/BusinessDescriptionStep.tsx (+284 -38)
📝 frontend/src/components/OnboardingWizard/FinalStep/FinalStep.tsx (+80 -1)
📝 frontend/src/services/onboardingCache.ts (+1 -0)

📄 Description

Motivation

  • Provide a first-class “Don’t have a website” flow that generates an AI-driven starter site from minimal user input and keeps the experience black-box for non-technical users.
  • Produce a reproducible, template-driven static site pipeline (Hugo) that can be previewed in onboarding and deployed automatically to GitHub + Netlify.
  • Ensure generated sites are usable for SEO and brand identity by adding page metadata, JSON-LD for shop templates, and per-user safe CSS theming via LLM tokens.
  • Reuse existing Exa research and LLM text-gen capabilities to enrich content and keep the system subscription-aware and cost-tracked.

Description

  • Backend: added LLM intake and schema in services/onboarding/website_intake_service.py to produce site_brief + exa_query_map, and services/onboarding/website_style_service.py to request safe design tokens and render scoped CSS (render_css).
  • Preview & automation: implemented local preview generation in services/website_automation_service.py that writes HTML/CSS to generated_sites/ with meta tags, Open Graph/Twitter, canonical URL logic, and shop ItemList JSON-LD; added GitHub + Netlify orchestration in api/onboarding_utils/website_automation_service.py to create repos from templates, commit Hugo config.toml and content/ pages, inject static/custom.css, and call Netlify POST /sites.
  • Persistence & wiring: added user_websites DB migration (backend/database/migrations/add_user_websites_table.sql), SQLAlchemy model (backend/models/user_website.py), Pydantic request/response (backend/models/user_website_request.py), service (backend/services/user_website_service.py), migration runner (backend/scripts/run_user_websites_migration.py), and registered the model in services/database.py so tables are created during initialization.
  • API & endpoints: exposed preview and deploy handlers in backend/api/onboarding_utils/endpoints_config_data.py (generate_website_preview and deploy_website) and wired routes into onboarding (manager and endpoints), and extended the onboarding summary to expose preview_url and live_url via OnboardingSummaryService.
  • Frontend: expanded Step 2 intake UI to website-focused fields and caching in BusinessDescriptionStep.tsx, added generateWebsitePreview and deployWebsite calls in frontend/src/api/onboarding.ts, and added a preview iframe + deploy action in FinalStep.tsx to surface preview HTML and trigger deployment.
  • Exa integration: extended ExaService with search_with_contents(...) aligned to Exa /search OpenAPI, including subscription preflight validation and usage tracking; intake schema produces exa_query_map to be executed in future enrichment steps.
  • SEO & assets: added programmatic meta description generation, canonical URL preference for Netlify domains, Open Graph/Twitter tags, and shop ItemList/Product JSON-LD; product asset handling and simple image references are included in preview/markdown outputs.
  • Documentation: added a comprehensive developer SSOT at docs/Onboarding/WEBSITE_MAKER_IMPLEMENTATION.md describing flow, files, environment variables, limitations, and next steps.

Testing

  • No automated tests were executed for these changes in this environment.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/320 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `codex/review-onboarding-code-and-propose-website-templates-hndj03` --- ### 📝 Commits (1) - [`ea250ef`](https://github.com/AJaySi/ALwrity/commit/ea250efcfe2ce446cf2fdb6e7e93c83d174eb577) Add website maker implementation guide ### 📊 Changes **20 files changed** (+1985 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `backend/alwrity_utils/onboarding_manager.py` (+18 -0) 📝 `backend/api/onboarding_endpoints.py` (+3 -1) 📝 `backend/api/onboarding_utils/endpoints_config_data.py` (+81 -1) 📝 `backend/api/onboarding_utils/onboarding_summary_service.py` (+6 -1) ➕ `backend/api/onboarding_utils/website_automation_service.py` (+301 -0) ➕ `backend/database/migrations/add_user_websites_table.sql` (+26 -0) ➕ `backend/models/user_website.py` (+50 -0) ➕ `backend/models/user_website_request.py` (+30 -0) ➕ `backend/scripts/run_user_websites_migration.py` (+43 -0) 📝 `backend/services/database.py` (+3 -1) ➕ `backend/services/onboarding/website_intake_service.py` (+170 -0) ➕ `backend/services/onboarding/website_style_service.py` (+130 -0) 📝 `backend/services/research/exa_service.py` (+95 -1) ➕ `backend/services/user_website_service.py` (+98 -0) ➕ `backend/services/website_automation_service.py` (+286 -0) ➕ `docs/Onboarding/WEBSITE_MAKER_IMPLEMENTATION.md` (+269 -0) 📝 `frontend/src/api/onboarding.ts` (+11 -1) 📝 `frontend/src/components/OnboardingWizard/BusinessDescriptionStep.tsx` (+284 -38) 📝 `frontend/src/components/OnboardingWizard/FinalStep/FinalStep.tsx` (+80 -1) 📝 `frontend/src/services/onboardingCache.ts` (+1 -0) </details> ### 📄 Description ### Motivation - Provide a first-class “Don’t have a website” flow that generates an AI-driven starter site from minimal user input and keeps the experience black-box for non-technical users. - Produce a reproducible, template-driven static site pipeline (Hugo) that can be previewed in onboarding and deployed automatically to GitHub + Netlify. - Ensure generated sites are usable for SEO and brand identity by adding page metadata, JSON-LD for shop templates, and per-user safe CSS theming via LLM tokens. - Reuse existing Exa research and LLM text-gen capabilities to enrich content and keep the system subscription-aware and cost-tracked. ### Description - Backend: added LLM intake and schema in `services/onboarding/website_intake_service.py` to produce `site_brief` + `exa_query_map`, and `services/onboarding/website_style_service.py` to request safe design tokens and render scoped CSS (`render_css`). - Preview & automation: implemented local preview generation in `services/website_automation_service.py` that writes HTML/CSS to `generated_sites/` with meta tags, Open Graph/Twitter, canonical URL logic, and shop `ItemList` JSON-LD; added GitHub + Netlify orchestration in `api/onboarding_utils/website_automation_service.py` to create repos from templates, commit Hugo `config.toml` and `content/` pages, inject `static/custom.css`, and call Netlify `POST /sites`. - Persistence & wiring: added `user_websites` DB migration (`backend/database/migrations/add_user_websites_table.sql`), SQLAlchemy model (`backend/models/user_website.py`), Pydantic request/response (`backend/models/user_website_request.py`), service (`backend/services/user_website_service.py`), migration runner (`backend/scripts/run_user_websites_migration.py`), and registered the model in `services/database.py` so tables are created during initialization. - API & endpoints: exposed preview and deploy handlers in `backend/api/onboarding_utils/endpoints_config_data.py` (`generate_website_preview` and `deploy_website`) and wired routes into onboarding (manager and endpoints), and extended the onboarding summary to expose `preview_url` and `live_url` via `OnboardingSummaryService`. - Frontend: expanded Step 2 intake UI to website-focused fields and caching in `BusinessDescriptionStep.tsx`, added `generateWebsitePreview` and `deployWebsite` calls in `frontend/src/api/onboarding.ts`, and added a preview iframe + deploy action in `FinalStep.tsx` to surface preview HTML and trigger deployment. - Exa integration: extended `ExaService` with `search_with_contents(...)` aligned to Exa `/search` OpenAPI, including subscription preflight validation and usage tracking; intake schema produces `exa_query_map` to be executed in future enrichment steps. - SEO & assets: added programmatic meta description generation, canonical URL preference for Netlify domains, Open Graph/Twitter tags, and shop `ItemList`/`Product` JSON-LD; product asset handling and simple image references are included in preview/markdown outputs. - Documentation: added a comprehensive developer SSOT at `docs/Onboarding/WEBSITE_MAKER_IMPLEMENTATION.md` describing flow, files, environment variables, limitations, and next steps. ### Testing - No automated tests were executed for these changes in this environment. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69820257af1c83289a826ea7a9d6d3de) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:34:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#287
No description provided.