diff --git a/README.md b/README.md index 7dbf7eb..d87a28a 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,46 @@ -# React + TypeScript + Vite +# Bonch Material You Client -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +A modern Material You (Material 3) client for the `bonch-open-api`. -Currently, two official plugins are available: +## Features +- **Material 3 Design:** Clean UI following Material You principles with support for light/dark modes. +- **Dynamic API Configuration:** Easily switch API domains and keys. +- **Profile View:** View student profile information (Full Name, Group, Faculty, Email). +- **Responsive:** Works well on mobile and desktop. -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) +## Stack +- **Frontend:** React + TypeScript + Vite +- **State Management:** Zustand (with persistence) +- **API Client:** Axios +- **Icons:** Lucide React +- **Routing:** React Router DOM -## React Compiler +## Getting Started -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). +1. **Clone the repository** + ```bash + git clone https://gitea.snusxd.site/adminxd/bonch-md-client.git + cd bonch-md-client + ``` -## Expanding the ESLint configuration +2. **Setup environment** + Copy `.env.example` to `.env` and set your default API domain. + ```bash + cp .env.example .env + ``` -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: +3. **Install dependencies** + ```bash + npm install + ``` -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... +4. **Run development server** + ```bash + npm run dev + ``` - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, +## Configuration +The API domain can be configured via the `VITE_API_DOMAIN` environment variable or changed directly in the app's login screen. - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` - -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: - -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` +## License +Private