⚠️ This guide is for running Sherex as a web application using React or Next.js (not React Native).
Ensure your development environment includes:
-
Node.js > v18+
-
npm or Yarn
-
Git
-
(Optional) Next.js CLI if using Next:
npm install
The web version of Sherex uses:
axios
— For API requestsdotenv
— For managing environment variablesprop-types
— Type-checking React componentsreact-router-dom
— For page routing (React)next/router
— For routing (Next.js)react-intl
— For localization (web alternative toreact-native-localization
)
git clone https://github.com/your-org/sherex-web.git
cd sherex-web
yarn install
# or
npm install
Create a .env.local
file in the project root:
NEXT_PUBLIC_API_URL=https://your-api.com
NEXT_PUBLIC_PROJECT_ID=your-project-id
Use process.env.NEXT_PUBLIC_*
in your code to access them.
yarn start
# or vite
yarn dev
Then open http://localhost:3000
yarn build && yarn preview
yarn build
yarn start
sherex-web/
│
├── public/ # Static assets
├── src/
│ ├── components/ # Shared React components
│ ├── pages/ # Pages (Next.js or React Router)
│ ├── hooks/ # Custom hooks
│ ├── services/ # API logic (e.g., axios)
│ ├── locales/ # Localization files
│ └── App.tsx / page.tsx
├── .env.local
├── next.config.js / vite.config.js
└── package.json
-
Add support for tools like:
Jest
orVitest
React Testing Library
ESLint
+Prettier
for formatting and linting