Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,405 changes: 1,979 additions & 426 deletions frontend/package-lock.json

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,27 @@
},
"dependencies": {
"@clerk/react": "^6.12.8",
"@tailwindcss/vite": "^4.1.14",
"@tanstack/react-query": "^5.90.5",
"axios": "^1.12.2",
"livecodex": "file:..",
"react": "^19.2.7",
"react-dom": "^19.2.7"
"react-dom": "^19.2.7",
"react-hot-toast": "^2.6.0",
"react-router": "^7.9.4",
"tailwindcss": "^4.1.14"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.3",
"@vitejs/plugin-react": "^5.2.0",
"daisyui": "^5.3.10",
"eslint": "^10.6.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.3",
"globals": "^17.7.0",
"vite": "^8.1.1"
"vite": "^7.3.6"
},
"description": "This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.",
"main": "eslint.config.js",
Expand Down
184 changes: 0 additions & 184 deletions frontend/src/App.css

This file was deleted.

37 changes: 17 additions & 20 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
import './App.css'
import { SignInButton, SignOutButton, UserButton, useUser } from '@clerk/react'
import { Routes, Route, Navigate } from 'react-router';
import HomePage from './pages/HomePage';

import ProblemsPage from './pages/ProblemsPage';
import { Toaster } from 'react-hot-toast';

function App() {
const { isSignedIn } = useUser()

return (
<div style={{ padding: '2rem', fontFamily: 'sans-serif' }}>
<h1>Welcome to the app</h1>
<p>Sign in to continue.</p>

<div style={{ marginTop: '1rem' }}>
<SignInButton mode="modal">
<button>Login</button>
</SignInButton>
</div>

<div style={{ marginTop: '1rem' }}>
<UserButton />
</div>
<>
<Routes>
<Route path="/" element={<HomePage />} />

<Route path="/problems" element={isSignedIn ? <ProblemsPage />: <Navigate to={"/"} />} />
</Routes>

{isSignedIn && (
<div style={{ marginTop: '1rem' }}>
<SignOutButton />
</div>
)}
</div>
<Toaster toastOptions={{duration:3000}} />
</>
);
}

export default App;

// tw, dausyui, react-router, react-hot-toast,
// todo: react-query, aka tanstack query, axios

113 changes: 2 additions & 111 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
@@ -1,111 +1,2 @@
:root {
--text: #6b6375;
--text-h: #08060d;
--bg: #fff;
--border: #e5e4e7;
--code-bg: #f4f3ec;
--accent: #aa3bff;
--accent-bg: rgba(170, 59, 255, 0.1);
--accent-border: rgba(170, 59, 255, 0.5);
--social-bg: rgba(244, 243, 236, 0.5);
--shadow:
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
--mono: ui-monospace, Consolas, monospace;

font: 18px/145% var(--sans);
letter-spacing: 0.18px;
color-scheme: light dark;
color: var(--text);
background: var(--bg);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

@media (max-width: 1024px) {
font-size: 16px;
}
}

@media (prefers-color-scheme: dark) {
:root {
--text: #9ca3af;
--text-h: #f3f4f6;
--bg: #16171d;
--border: #2e303a;
--code-bg: #1f2028;
--accent: #c084fc;
--accent-bg: rgba(192, 132, 252, 0.15);
--accent-border: rgba(192, 132, 252, 0.5);
--social-bg: rgba(47, 48, 58, 0.5);
--shadow:
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
}

#social .button-icon {
filter: invert(1) brightness(2);
}
}

body {
margin: 0;
}

#root {
width: 1126px;
max-width: 100%;
margin: 0 auto;
text-align: center;
border-inline: 1px solid var(--border);
min-height: 100svh;
display: flex;
flex-direction: column;
box-sizing: border-box;
}

h1,
h2 {
font-family: var(--heading);
font-weight: 500;
color: var(--text-h);
}

h1 {
font-size: 56px;
letter-spacing: -1.68px;
margin: 32px 0;
@media (max-width: 1024px) {
font-size: 36px;
margin: 20px 0;
}
}
h2 {
font-size: 24px;
line-height: 118%;
letter-spacing: -0.24px;
margin: 0 0 8px;
@media (max-width: 1024px) {
font-size: 20px;
}
}
p {
margin: 0;
}

code,
.counter {
font-family: var(--mono);
display: inline-flex;
border-radius: 4px;
color: var(--text-h);
}

code {
font-size: 15px;
line-height: 135%;
padding: 4px 8px;
background: var(--code-bg);
}
@import "tailwindcss";
@plugin "daisyui";
8 changes: 8 additions & 0 deletions frontend/src/lib/axios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import axios from "axios";

const axiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_URL,
withCredentials: true, // by adding this field browser will send the cookies to server automatically, on every single req
});

export default axiosInstance;
Loading