Skip to content

Commit

Permalink
Refactor frontend structure and configuration; migrate from Next.js t…
Browse files Browse the repository at this point in the history
…o Vite

- Removed Next.js configuration and related files, transitioning to a Vite-based setup.
- Updated package.json to reflect new dependencies and scripts for Vite.
- Introduced new HTML entry point and main application structure using React Router.
- Added basic routing and navigation components for the frontend application.
- Enhanced TypeScript configuration for better module resolution and strict type checking.
- Updated CSS styles for the new layout and components.
  • Loading branch information
valon-loshaj committed Jan 2, 2025
1 parent 065f83e commit ed33b18
Show file tree
Hide file tree
Showing 20 changed files with 575 additions and 1,162 deletions.
13 changes: 13 additions & 0 deletions apps/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Side Quest</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
7 changes: 0 additions & 7 deletions apps/frontend/next.config.ts

This file was deleted.

35 changes: 17 additions & 18 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
{
"name": "frontend",
"version": "0.1.0",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
"build": "tsc && vite build",
"dev": "vite",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"next": "15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^7.1.1"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "15.0.3",
"eslint-config-prettier": "^9.0.0",
"prettier-plugin-curly": "^0.3.1",
"prettier-plugin-packagejson": "^2.5.3",
"prettier-plugin-sh": "^0.14.0",
"typescript": "^5"
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.55.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.0.0"
}
}
19 changes: 19 additions & 0 deletions apps/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Home from "./pages/Home";

Check failure on line 2 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './pages/Home.js'?
import Navigation from "./components/Navigation";

Check failure on line 3 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './components/Navigation.js'?

const App = (): JSX.Element => {
return (
<Router>

Check failure on line 7 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Cannot use JSX unless the '--jsx' flag is provided.
<div className="app">

Check failure on line 8 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Cannot use JSX unless the '--jsx' flag is provided.
<Navigation />

Check failure on line 9 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Cannot use JSX unless the '--jsx' flag is provided.
<Routes>

Check failure on line 10 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Cannot use JSX unless the '--jsx' flag is provided.
<Route path="/" element={<Home />} />

Check failure on line 11 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Cannot use JSX unless the '--jsx' flag is provided.

Check failure on line 11 in apps/frontend/src/App.tsx

View workflow job for this annotation

GitHub Actions / Type Check

Cannot use JSX unless the '--jsx' flag is provided.
{/* Add more routes here as needed */}
</Routes>
</div>
</Router>
);
};

export default App;
Binary file removed apps/frontend/src/app/favicon.ico
Binary file not shown.
Binary file removed apps/frontend/src/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file removed apps/frontend/src/app/fonts/GeistVF.woff
Binary file not shown.
42 changes: 0 additions & 42 deletions apps/frontend/src/app/globals.css

This file was deleted.

33 changes: 0 additions & 33 deletions apps/frontend/src/app/layout.tsx

This file was deleted.

168 changes: 0 additions & 168 deletions apps/frontend/src/app/page.module.css

This file was deleted.

Loading

0 comments on commit ed33b18

Please sign in to comment.