diff --git a/README.md b/README.md index 240671c..17c9482 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,11 @@ yarn start ``` ## Features +- Starting FSD architecture - Typescript - Eslint & Prettier - Support of runtime environment variables with dynamic values -- normalize.css and shared reset css file -- React Helmet, axios, classnames libraries +- Normalize.css and shared reset css file +- All necessary meta tags for SEO in public/index.html +- Axios instance +- React Helmet & classnames diff --git a/template.json b/template.json index ecd89f9..2121ac8 100644 --- a/template.json +++ b/template.json @@ -4,6 +4,7 @@ "@types/node": "^20.8.7", "@types/react": "^18.2.31", "@types/react-dom": "^18.2.14", + "@types/react-helmet": "^6.1.8", "axios": "^1.5.1", "classnames": "^2.3.2", "cra-envs": "^1.2.8", diff --git a/template/src/App.tsx b/template/src/app/App.tsx similarity index 73% rename from template/src/App.tsx rename to template/src/app/App.tsx index 89557a3..b01d63a 100644 --- a/template/src/App.tsx +++ b/template/src/app/App.tsx @@ -1,7 +1,7 @@ import { BrowserRouter, Routes, Route } from "react-router-dom"; -import StartPage from "./pages"; +import StartPage from "../pages"; -function App() { +export const App = () => { return ( @@ -9,6 +9,4 @@ function App() { ); -} - -export default App; +}; diff --git a/template/src/app/styles/global.css b/template/src/app/styles/global.css new file mode 100644 index 0000000..2cafeb4 --- /dev/null +++ b/template/src/app/styles/global.css @@ -0,0 +1,3 @@ +html { + font-family: Arial, sans-serif; +} diff --git a/template/src/core/head/CoreHead.tsx b/template/src/core/head/CoreHead.tsx index 6238c3a..e6d2e2a 100644 --- a/template/src/core/head/CoreHead.tsx +++ b/template/src/core/head/CoreHead.tsx @@ -5,10 +5,7 @@ export const CoreHead = () => { return ( CRA template - + diff --git a/template/src/index.tsx b/template/src/index.tsx index 17de1cb..a1418da 100644 --- a/template/src/index.tsx +++ b/template/src/index.tsx @@ -1,9 +1,10 @@ import "normalize.css"; -import "./assets/css/reset.css"; +import "./shared/assets/css/reset.css"; +import "./app/styles/global.css"; import ReactDOM from "react-dom/client"; -import App from "./App"; +import { App } from "./app/App"; import reportWebVitals from "./reportWebVitals"; const root = ReactDOM.createRoot( diff --git a/template/src/shared/api/axiosInstance.ts b/template/src/shared/api/axiosInstance.ts new file mode 100644 index 0000000..c0d35d3 --- /dev/null +++ b/template/src/shared/api/axiosInstance.ts @@ -0,0 +1,6 @@ +import axios from "axios"; +import { env } from "../../core/env"; + +export const axiosInstance = axios.create({ + baseURL: env.API_URL ?? "", +}); diff --git a/template/src/assets/css/reset.css b/template/src/shared/assets/css/reset.css similarity index 86% rename from template/src/assets/css/reset.css rename to template/src/shared/assets/css/reset.css index ffb4b5f..53cbb4b 100644 --- a/template/src/assets/css/reset.css +++ b/template/src/shared/assets/css/reset.css @@ -4,10 +4,6 @@ box-sizing: border-box; } -html { - font-family: Manrope, sans-serif; -} - h1, h2, h3, diff --git a/template/src/shared/index.ts b/template/src/shared/index.ts new file mode 100644 index 0000000..56d2764 --- /dev/null +++ b/template/src/shared/index.ts @@ -0,0 +1 @@ +export { axiosInstance } from "./api/axiosInstance";