Skip to content

kxxg1/ai-sambo-blog

Repository files navigation

The Sambo Store Blog (React + TypeScript + Vite)

This is a React + TypeScript + Vite project that powers The Sambo Store blog UI. It includes Tailwind CSS for styling and optional AI assistant features.

Prerequisites

  • Node.js 18+ (LTS recommended)
  • npm (comes with Node) or yarn/pnpm

Check your versions:

node -v
npm -v

Install Dependencies

From the project root:

npm install

This installs all required packages, including React, Vite, Tailwind CSS, TypeScript, and ESLint tooling.

Run the App (Development)

npm run dev

Vite will start the dev server and show the local URL in your terminal.

Build and Preview

npm run build   # Type-check + production build
npm run preview # Preview built app locally

Environment Variables (Optional: AI Assistant)

The AI assistant component reads keys from Vite environment variables. For local testing, you can create a .env.local file in the project root and add one of the following:

# Gemini (Google)
VITE_GEMINI_API_KEY=your_gemini_key_here

# OR OpenAI
VITE_OPENAI_API_KEY=your_openai_key_here
# Optional, defaults to "gpt-5" in code
VITE_OPENAI_MODEL=gpt-5

Notes:

  • Vite inlines any VITE_ variables into the client bundle. Do not use real production secrets on the client. Prefer a server proxy for production.
  • Consider adding .env* to .gitignore to avoid accidental commits.

Project Scripts

  • npm run dev: Start Vite dev server
  • npm run build: Type-check and build for production
  • npm run preview: Preview the production build locally
  • npm run lint: Run ESLint

Tech Stack

  • React 19, React Router
  • Vite 7
  • TypeScript 5
  • Tailwind CSS 3

Optional Sub-App: the-sambo-store-blog/

There is an additional Vite project under the-sambo-store-blog/. To run it separately:

cd the-sambo-store-blog
npm install
npm run dev

That sub-app’s dev server is configured to use port 3000 in its Vite config.

Troubleshooting

  • Ensure Node 18+.
  • If the dev server doesn’t open, check for port conflicts and try again.
  • If AI features error with missing keys, add the appropriate key to your local .env.local (see above) or disable the assistant UI when testing.

About

Sambo Blog Page Mock

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published