Modern React single-page application scaffolded with Vite. It provides a content-rich blog/news/products/resources experience with client-side routing, responsive UI, SCSS modules, Tailwind CSS v4, and motion-powered interactions.
- Overview
- Tech Stack
- Getting Started
- Usage
- Features
- Configuration
- Folder Structure
- Testing
- Deployment
- Contributing
- License
- Acknowledgements
Blog AI App is a frontend SPA that organizes content into Home, News, Products (podcasts), Resources (reports/whitepapers), and Blog detail pages. It uses react-router-dom for nested routes, SCSS modules for component-level styling, and Tailwind CSS v4 for utility styles. Media assets (images/videos) are shipped locally for an offline-friendly dev experience.
- React 19 + React DOM
- Vite 7 (dev server, build, preview)
- React Router DOM 7
- Tailwind CSS v4 (via
@tailwindcss/vite) - SCSS / CSS Modules
- Motion (animations) and React Icons
- ESLint 9 (with React Hooks and React Refresh configs)
- Node.js >= 18 and npm >= 9
- Git (optional, for version control)
Check versions:
node -v
npm -v# Clone the repository
git clone <your-repo-url> blog-AI-app
cd blog-AI-app
# Install dependencies
npm install# Start the dev server with HMR on http://localhost:5173
npm run dev
# Production build (outputs to ./dist)
npm run build
# Preview the production build locally
npm run preview
# Lint the codebase
npm run lintStart the development server:
npm run devOpen the app at http://localhost:5173.
Client-side routes are declared in src/routes/AppRoutes.jsx. Example navigation using React Router:
// src/App.jsx
import { BrowserRouter } from "react-router-dom";
import AppRoutes from "./routes/AppRoutes";
export default function App() {
return (
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
);
}// src/routes/AppRoutes.jsx (high level)
<Routes>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
<Route path="news" element={<News />} />
<Route path="products" element={<Products />} />
<Route path="resources" element={<Resources />} />
<Route path="/blogs/:slug" element={<Blog />} />
</Route>
<Route path="*" element={<NotFound />} />
</Routes>Tailwind v4 utilities are available globally (see src/styles/index.css). SCSS modules are used for component-scoped styles under src/components/**/**/*.module.scss.
- Modern tooling: Vite dev server with instant HMR and optimized production builds
- Routing: Nested routes with
react-router-dom - Styling: Tailwind CSS v4 utilities + SCSS Modules for encapsulated styles
- Media-rich UI: Local images and videos for posts, podcasts, and resources
- Animations: Smooth transitions with
motion - Linting: ESLint 9 with React Hooks and Refresh rules
- Environment variables: None required by default. If you introduce API calls, add a
.envfile and access variables viaimport.meta.envper Vite conventions (e.g.VITE_API_BASE_URL). - Vite config:
vite.config.jsenables React and Tailwind v4 via@tailwindcss/vite. - ESLint: See
eslint.config.jsfor rules and ignores.
blog-AI-app/
├─ public/
│ ├─ images/ # Static images used across pages
│ ├─ videos/ # Static videos used in news/products sections
│ └─ files/ # Downloadable assets (e.g., PDFs)
├─ src/
│ ├─ assets/ # App-bundled images/videos
│ ├─ components/ # Reusable UI components (home, news, posts, products, resources, etc.)
│ ├─ constants/ # Static data (links, cards, filters)
│ ├─ Layouts/ # Layout wrapper(s) and shared shells
│ ├─ pages/ # Route-level pages (Home, News, Products, Resources, Blog)
│ ├─ routes/ # Route definitions (AppRoutes)
│ ├─ styles/ # Global styles (Tailwind entry, variables, base)
│ └─ utils/ # Small utilities (e.g., like/heart handlers)
├─ index.html # App entry HTML
├─ vite.config.js # Vite build/dev configuration
├─ eslint.config.js # Linting rules
├─ package.json # Scripts and dependencies
└─ README.md # This file
No tests are included by default. To add unit testing with Vitest and React Testing Library:
npm i -D vitest @vitest/ui @testing-library/react @testing-library/jest-dom jsdomThen configure a vitest.config.ts and add scripts like:
{
"scripts": {
"test": "vitest",
"test:ui": "vitest --ui"
}
}This is a static SPA and can be deployed to any static host:
- Build the production bundle:
npm run build
- Preview locally (optional):
npm run preview
- Deploy the
dist/folder to your host of choice:- Vercel: set build command
npm run buildand outputdist - Netlify: set build command
npm run buildand publish directorydist - GitHub Pages: serve
dist/via a static workflow - Any static file server or CDN
- Vercel: set build command
Contributions are welcome! To propose changes:
- Fork the repository and create a feature branch
- Install dependencies and run
npm run dev - Follow existing code style and lint rules (
npm run lint) - Submit a pull request describing your changes and rationale
For non-trivial UI changes, include before/after screenshots or short screen recordings.
This project is currently private with no license declared (UNLICENSED). All rights reserved by the project owner. If you intend to open-source, consider adding a license (e.g., MIT, Apache-2.0) and updating badges accordingly.
- React and the React community
- Vite team for blazing-fast DX
- Tailwind CSS v4
- React Router
- Motion and React Icons ecosystems