Skip to content

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

84 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IsaiahWebDev Portfolio

The portfolio's canonical application now lives at the repository root. The public frontend is a TanStack Start + React 19 + Vite SSR application (migrated from a Base44-generated redesign), built as a Cloudflare Worker/Pages-compatible app. The backend/CMS is a separate native Node.js HTTP service in backend/, backed by MongoDB Atlas.

Architecture

Layer Location Notes
Frontend app src/, vite.config.js, wrangler.jsonc, package.json TanStack Start SSR, React 19, Tailwind, shadcn/Radix, TanStack Query.
Committed public assets public/ Profile/hero images, CV, and Search Console verification used by the app. Dynamic robots.txt and sitemap.xml are Worker routes, not static files.
Legacy source assets/data assets/, data/, icon/, images/, logo/ Historical source data retained locally for reference; the backend does not serve these as a website.
Backend/CMS API backend/ Native Node.js http server, MongoDB Atlas, admin cookie auth, Cloudinary media, public content APIs. Independent package.json and lockfile.
Base44 recovery copy Base44-frontend-redesign/ Local-only recovery source; ignored by Git and not a runtime dependency.

Public Routes

  • / - Home
  • /about - About
  • /process - Working process
  • /projects - Projects listing
  • /projects/:slug - Project detail (canonical)
  • /services - Services listing
  • /services/:slug - Service detail (canonical)
  • /certificates - Certificates
  • /contact - Contact
  • /resume - Resume
  • /admin/* - Admin CMS (uses existing backend cookie auth)

The root React/TanStack app is the sole owner of public pages. The backend serves APIs, CMS, authentication, and redirects only. Legacy compatibility routes redirect old URLs: /project?slug=... -> /projects/:slug, /service?slug=... -> /services/:slug, and common *.html paths. Backend requests for /projects, /projects/:slug, /admin, and /admin/ permanently redirect to the frontend origin (PUBLIC_SITE_URL, default https://isaiahweb.pages.dev).

Local Development (Frontend + Backend)

Run the backend and frontend in separate terminals. The frontend uses Vite environment variables to select the API base URL; the production fallback remains https://isaiahwebdev-api.onrender.com.

Terminal 1: Backend

cd backend
npm install
npm run dev
  • Default local URL: http://localhost:8080 (or PORT from backend/.env).
  • Dev startup uses node --watch --env-file=./.env src/index.js.
  • For browser requests from Vite, backend CORS must allow the frontend origin. In development, when CORS_ORIGINS is unset, backend defaults include http://localhost:5173 and http://127.0.0.1:5173. If CORS_ORIGINS is set in backend/.env, include your frontend origin explicitly (for example, CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173).
  • To make legacy /projects... and /admin... redirects point at the local frontend, set PUBLIC_SITE_URL=http://localhost:5173 in backend/.env. When unset, it defaults to https://isaiahweb.pages.dev.

Terminal 2: Frontend

From the repository root:

npm install
npm run dev
  • Frontend dev URL: http://localhost:5173.
  • Local API URL is configured by the root .env.development (VITE_API_BASE_URL=http://localhost:8080 by default). Adjust if the backend PORT differs.
  • The root .env.example documents the frontend variables. Do not put secrets in frontend env files.

Verify local API routing

  1. Start the backend and frontend.
  2. Open browser DevTools Network on http://localhost:5173.
  3. Confirm requests go to http://localhost:8080/api/content/... (not https://isaiahwebdev-api.onrender.com).
  4. If you see CORS errors, confirm the backend is running, VITE_API_BASE_URL points to the correct local backend, and the backend CORS_ORIGINS/development defaults include the frontend origin.

Frontend Development

From the repository root:

npm install
npm run dev
npm run build
npm run lint

Build output: dist/client, dist/server, and the Cloudflare deploy configuration. The Cloudflare Vite plugin runs server code in workerd during dev/build.

Backend Development

From backend/:

npm install
npm start

For local development with env-file watching, use npm run dev.

Tests:

npm test

The backend keeps its own package.json and lockfile. Do not merge frontend and backend dependency manifests.

Environment Variables

Frontend (.env.development / deployment environment)

  • VITE_API_BASE_URL - Backend API base URL. Local dev: http://localhost:8080 (via the root .env.development). Production fallback/default: https://isaiahwebdev-api.onrender.com.
  • VITE_MEDIA_BASE_URL - Base URL for relative CMS media paths. Default: https://isaiahweb.pages.dev.
  • VITE_PUBLIC_SITE_URL - Canonical site URL. Default: https://isaiahweb.pages.dev.
  • VITE_EMAILJS_SERVICE_ID - EmailJS service ID (public). Default fallback configured.
  • VITE_EMAILJS_TEMPLATE_ID - EmailJS template ID (public). Default fallback configured.
  • VITE_EMAILJS_PUBLIC_KEY - EmailJS public key. Default fallback configured.

See the root .env.example. Local env files are gitignored; .env.example is kept for documentation.

Backend (backend/.env)

See backend/.env.example. Key variables include PORT, NODE_ENV, CORS_ORIGINS, MONGODB_URI, PUBLIC_SITE_URL, Cloudinary credentials, and admin cookie/session settings. PUBLIC_SITE_URL is the frontend origin used for legacy page redirects and authenticated preview metadata; its production default is https://isaiahweb.pages.dev. Never commit secrets.

API / CMS

Public content endpoints (preserved):

  • GET /api/content/projects
  • GET /api/content/certificates
  • GET /api/content/certificates/:slug
  • GET /api/content/services
  • GET /api/content/services/:slug

Admin endpoints remain under /api/admin/* with cookie-based session auth. The React admin uses these existing contracts.

GET /health returns 200 with or without an Origin header so Render and monitoring probes work. Allowed browser origins still receive explicit CORS headers; wildcard CORS is never used. Other unknown routes keep the strict Origin gate.

SEO / Analytics / Discoverability

  • robots.txt is generated dynamically by src/routes/robots[.]txt.js.
  • sitemap.xml is generated dynamically by src/routes/sitemap[.]xml.js from the published Projects and Services APIs. If either content API fails, the route returns 503 instead of a successful, incomplete sitemap.
  • wrangler.jsonc routes both paths to the Worker first (assets.run_worker_first), so they are not shadowed by static assets.
  • public/google9b1538b3ddfd9a52.html is retained for Google Search Console verification.
  • public/images/profile.jpg, the three generated hero images, and public/docs/Isaiah_Adelowo_CV.pdf are the committed runtime assets referenced by the app.
  • Legacy llms.txt, ai-catalog.json, and .well-known/ard.json files remain local-only and are not part of the deployed application.

GA4 Measurement ID G-LF7NQ6SE9X is integrated in the app root with SPA page-view tracking. The contact form emits a contact_form_submit event when submission is attempted.

Canonical domain: https://isaiahweb.pages.dev.

Deployment

  • Frontend target: existing Cloudflare Pages/Workers deployment for https://isaiahweb.pages.dev.
  • Backend target: existing Render Web Service at https://isaiahwebdev-api.onrender.com.
  • Independent Render frontend: https://isaiahwebdev.onrender.com remains separate unless intentionally changed.

This app is not a plain static Vite SPA. It uses TanStack Start SSR with @cloudflare/vite-plugin and a Worker entry (src/server.js, configured in wrangler.jsonc). Deploy using the Cloudflare build/deploy flow compatible with this configuration. Do not deploy by assuming dist/client alone is a complete static site.

Before a production deploy, confirm CORS_ORIGINS on the backend includes the frontend origin and that admin cookie/CORS settings work cross-origin.

Important Directories and Files

  • src/ - React/TanStack Start application, routes, components, API clients.
  • public/ - Committed runtime assets (profile/hero images, CV) and Search Console verification.
  • backend/src/ - Backend HTTP server, routes, stores, auth, media, schema loaders.
  • backend/test/ - Backend test suite.
  • backend/src/lib/projects-schema.mjs, backend/src/lib/certificates-schema.mjs - Backend-owned schema modules used by the API.
  • docs/ - Architecture, migration and phase documentation.
  • assets/, data/, icon/, images/, logo/ - Historical source assets and data retained locally for reference; not served by the backend.
  • wrangler.jsonc - Cloudflare Worker entry configuration.
  • .env.development, .env.example - Local frontend configuration and documented template.
  • backend/.env, backend/.env.example - Local backend secrets and documented template.
  • Base44-frontend-redesign/ - Local recovery copy only; ignored by Git.

Migration Notes

  • Base44 platform dependencies (@base44/sdk, @base44/vite-plugin, Base44 scripts/auth/error capture) were removed from the runtime.
  • The original static HTML/CSS/JS public frontend was replaced by the React app. The backend no longer renders or serves public pages; legacy backend page URLs redirect to the frontend.
  • The static sitemap generator and root sitemap.xml/robots.txt files were retired. src/routes/sitemap[.]xml.js and src/routes/robots[.]txt.js are the authoritative implementations.
  • The canonical frontend was moved from custom/ to the repository root, and the backend from custom/backend/ to backend/.
  • Original backend, CMS, MongoDB, Cloudinary, and admin API contracts were preserved.
  • Base44-frontend-redesign/ remains on the local machine as recoverable source and is excluded from Git.

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages