Interactive AIoT Agriculture Wiki with a Trivia module. The site includes Sensors, Hardware, Connectivity and Applications, providing a structured exploration of smart agriculture technologies.
Built with React + TypeScript + Vite, with data stored in JSON inside the repository.
This README explains how to run, build, deploy and maintain the project, and documents architectural decisions to keep it easy to extend.
- Node.js 18 or higher
npm install
npm run dev
npm run build
npm run previewsrc/
assets/ Images and backgrounds
sensors/
hardware/
connectivity/
applications/
backgrounds/ Section backgrounds
components/ NavBar, Footer, SearchBar
content/
trivia/questions.json Trivia questions
wiki/ Data by section (JSON)
sensors.json
hardware.json
connectivity.json
applications.json
features/
trivia/pages/ TriviaStart, TriviaResults
wiki/pages/
Home.tsx Landing page
WikiIndex.tsx Global index with search
WikiDetail.tsx Detail view
SensorsPage.tsx
HardwarePage.tsx
ConnectivityPage.tsx
ApplicationsPage.tsx
NotFound.tsx
/Home/wikiIndex/wiki/sensors/wiki/hardware/wiki/connectivity/wiki/applications/wiki/:group/:slugDetail page/triviaTrivia game/trivia/resultsResults*404
- Each section reads JSON data from
src/content/wiki/ - Images are resolved by slug using:
import.meta.glob(...)
- File names must match slugs
- Defined in
src/index.css - Uses CSS variable
--page-bgfor backgrounds - Each section has its own visual identity
- Detail pages use a card-based layout
- Category-based questions (Sensors, Hardware, etc.)
- Difficulty levels
- Randomized answers
- Results with scoring feedback
vite.config.tsuses:base: "/aiot-agriculture/"App.tsx:<BrowserRouter basename={import.meta.env.BASE_URL}>
- GitHub Actions workflow builds and deploys
- SPA fallback:
dist/index.html → dist/404.html
- Removed all unused template assets
- Replaced Hollow Knight content with AIoT domain data
- Simplified structure for scalability
- Cleaned imports and dependencies
Ensure:
- correct
basein Vite - correct
basenamein Router - SPA fallback enabled
- File name must match slug exactly
- Check correct folder
To provide:
- A clean AIoT Agriculture knowledge base
- Structured technical content
- Interactive learning through trivia
- A scalable platform for future expansion
This project originated from a cloned template and has been fully refactored into an AIoT Agriculture-focused application.
Educational project.