Skip to content

Commit 4cc71be

Browse files
committed
Merge branch 'r-main'
2 parents 979a791 + 470d911 commit 4cc71be

23 files changed

+3330
-224
lines changed

client/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Supabase Configuration
2+
# Copy this file to .env and fill in your values
3+
VITE_SUPABASE_URL=your_supabase_project_url
4+
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

client/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ dist
1212
dist-ssr
1313
*.local
1414

15+
# Environment variables (sensitive!)
16+
.env
17+
.env.local
18+
.env.*.local
19+
1520
# Editor directories and files
1621
.vscode/*
1722
!.vscode/extensions.json

client/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@vitejs/plugin-react": "^5.0.3",
3131
"autoprefixer": "^10.4.21",
3232
"babel-plugin-styled-components": "^2.1.4",
33-
"baseline-browser-mapping": "^2.8.30",
33+
"baseline-browser-mapping": "^2.9.19",
3434
"eslint": "^9.36.0",
3535
"eslint-plugin-react-hooks": "^5.2.0",
3636
"eslint-plugin-react-refresh": "^0.4.20",

client/src/App.jsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Routes, Route } from 'react-router-dom';
1+
import { Routes, Route, useLocation } from 'react-router-dom';
22
import Header from './components/Header';
33
import HomePage from './pages/HomePage';
44
import ShowroomPage from './pages/ShowroomPage';
@@ -9,10 +9,35 @@ import JoinPage from './pages/JoinPage';
99
import PrivacyPolicyPage from './pages/PrivacyPolicy';
1010
import ScrollToTop from './components/ScrollTop';
1111
import TermsAndConditionsPage from './pages/TermsAndConditions';
12+
import CodeOfConduct from './pages/CodeOfConduct';
1213

13-
14+
// Admin imports
15+
import AdminLogin from './pages/admin/AdminLogin';
16+
import Dashboard from './pages/admin/Dashboard';
17+
import ProtectedRoute from './components/ProtectedRoute';
1418

1519
export default function App() {
20+
const location = useLocation();
21+
const isAdminRoute = location.pathname.startsWith('/admin');
22+
23+
// Admin routes render without the main site layout
24+
if (isAdminRoute) {
25+
return (
26+
<Routes>
27+
<Route path="/admin/login" element={<AdminLogin />} />
28+
<Route
29+
path="/admin"
30+
element={
31+
<ProtectedRoute>
32+
<Dashboard />
33+
</ProtectedRoute>
34+
}
35+
/>
36+
</Routes>
37+
);
38+
}
39+
40+
// Main site routes
1641
return (
1742
<div className="relative min-h-screen w-full bg-base">
1843
<ScrollToTop />
@@ -28,6 +53,7 @@ export default function App() {
2853
<Route path="/privacy" element={<PrivacyPolicyPage />} />
2954
<Route path="/terms" element={<TermsAndConditionsPage />} />
3055
<Route path="/apply" element={<JoinPage />} />
56+
<Route path="/code-of-conduct" element={<CodeOfConduct />} />
3157
</Routes>
3258
</main>
3359
<Footer />

client/src/components/Footer.jsx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export default function Footer() {
55
const currentYear = new Date().getFullYear();
66
const location = useLocation(); // Get current route
77

8-
// Logic: If we are on the Join/Apply page, hide the "Ready to Forge" section
9-
const isApplyPage = location.pathname === '/join' || location.pathname === '/apply';
8+
// Logic: If we are on the Join/Apply page, hide the "Ready to Forge" section
9+
const isApplyPage = location.pathname === '/join' || location.pathname === '/apply';
1010

1111
return (
1212
<footer className="bg-black border-t border-white/5 pt-20 pb-10 relative overflow-hidden">
@@ -24,29 +24,29 @@ export default function Footer() {
2424
{/* 1. TOP SECTION: GIANT CTA */}
2525
{!isApplyPage && (
2626
<div className="mb-20 pb-20 border-b border-white/5">
27-
<div className="flex flex-col md:flex-row items-start md:items-end justify-between gap-10">
28-
<div className="max-w-2xl">
29-
<span className="font-mono text-xs text-accent tracking-[0.3em] uppercase mb-4 block">
30-
Initiate Sequence
31-
</span>
32-
<h2 className="text-5xl md:text-8xl font-heading font-bold text-white tracking-tighter leading-[0.9]">
33-
READY TO <br />
34-
<span className="text-white/40 group-hover:text-white transition-colors">FORGE?</span>
35-
</h2>
36-
</div>
37-
38-
<Link to="/apply">
39-
<button className="jelly-button">
40-
<span className="text">Start Application</span>
41-
<span className="svg-icon">
42-
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="20" viewBox="0 0 38 15" fill="none">
43-
<path d="M10 7.519l-.939-.344h0l.939.344zm14.386-1.205l-.981-.192.981.192zm1.276 5.509l.537.843.148-.094.107-.139-.792-.611zm4.819-4.304l-.385-.923h0l.385.923zm7.227.707a1 1 0 0 0 0-1.414L31.343.448a1 1 0 0 0-1.414 0 1 1 0 0 0 0 1.414l5.657 5.657-5.657 5.657a1 1 0 0 0 1.414 1.414l6.364-6.364zM1 7.519l.554.833.029-.019.094-.061.361-.23 1.277-.77c1.054-.609 2.397-1.32 3.629-1.787.617-.234 1.17-.392 1.623-.455.477-.066.707-.008.788.034.025.013.031.021.039.034a.56.56 0 0 1 .058.235c.029.327-.047.906-.39 1.842l1.878.689c.383-1.044.571-1.949.505-2.705-.072-.815-.45-1.493-1.16-1.865-.627-.329-1.358-.332-1.993-.244-.659.092-1.367.305-2.056.566-1.381.523-2.833 1.297-3.921 1.925l-1.341.808-.385.245-.104.068-.028.018c-.011.007-.011.007.543.84zm8.061-.344c-.198.54-.328 1.038-.36 1.484-.032.441.024.94.325 1.364.319.45.786.64 1.21.697.403.054.824-.001 1.21-.09.775-.179 1.694-.566 2.633-1.014l3.023-1.554c2.115-1.122 4.107-2.168 5.476-2.524.329-.086.573-.117.742-.115s.195.038.161.014c-.15-.105.085-.139-.076.685l1.963.384c.192-.98.152-2.083-.74-2.707-.405-.283-.868-.37-1.28-.376s-.849.069-1.274.179c-1.65.43-3.888 1.621-5.909 2.693l-2.948 1.517c-.92.439-1.673.743-2.221.87-.276.064-.429.065-.492.057-.043-.006.066.003.155.127.07.099.024.131.038-.063.014-.187.078-.49.243-.94l-1.878-.689zm14.343-1.053c-.361 1.844-.474 3.185-.413 4.161.059.95.294 1.72.811 2.215.567.544 1.242.546 1.664.459a2.34 2.34 0 0 0 .502-.167l.15-.076.049-.028.018-.011c.013-.008.013-.008-.524-.852l-.536-.844.019-.012c-.038.018-.064.027-.084.032-.037.008.053-.013.125.056.021.02-.151-.135-.198-.895-.046-.734.034-1.887.38-3.652l-1.963-.384zm2.257 5.701l.791.611.024-.031.08-.101.311-.377 1.093-1.213c.922-.954 2.005-1.894 2.904-2.27l-.771-1.846c-1.31.547-2.637 1.758-3.572 2.725l-1.184 1.314-.341.414-.093.117-.025.032c-.01.013-.01.013.781.624zm5.204-3.381c.989-.413 1.791-.42 2.697-.307.871.108 2.083.385 3.437.385v-2c-1.197 0-2.041-.226-3.19-.369-1.114-.139-2.297-.146-3.715.447l.771 1.846z"></path>
44-
</svg>
27+
<div className="flex flex-col md:flex-row items-start md:items-end justify-between gap-10">
28+
<div className="max-w-2xl">
29+
<span className="font-mono text-xs text-accent tracking-[0.3em] uppercase mb-4 block">
30+
Initiate Sequence
4531
</span>
46-
</button>
47-
</Link>
32+
<h2 className="text-5xl md:text-8xl font-heading font-bold text-white tracking-tighter leading-[0.9]">
33+
READY TO <br />
34+
<span className="text-white/40 group-hover:text-white transition-colors">FORGE?</span>
35+
</h2>
36+
</div>
37+
38+
<Link to="/apply">
39+
<button className="jelly-button">
40+
<span className="text">Start Application</span>
41+
<span className="svg-icon">
42+
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="20" viewBox="0 0 38 15" fill="none">
43+
<path d="M10 7.519l-.939-.344h0l.939.344zm14.386-1.205l-.981-.192.981.192zm1.276 5.509l.537.843.148-.094.107-.139-.792-.611zm4.819-4.304l-.385-.923h0l.385.923zm7.227.707a1 1 0 0 0 0-1.414L31.343.448a1 1 0 0 0-1.414 0 1 1 0 0 0 0 1.414l5.657 5.657-5.657 5.657a1 1 0 0 0 1.414 1.414l6.364-6.364zM1 7.519l.554.833.029-.019.094-.061.361-.23 1.277-.77c1.054-.609 2.397-1.32 3.629-1.787.617-.234 1.17-.392 1.623-.455.477-.066.707-.008.788.034.025.013.031.021.039.034a.56.56 0 0 1 .058.235c.029.327-.047.906-.39 1.842l1.878.689c.383-1.044.571-1.949.505-2.705-.072-.815-.45-1.493-1.16-1.865-.627-.329-1.358-.332-1.993-.244-.659.092-1.367.305-2.056.566-1.381.523-2.833 1.297-3.921 1.925l-1.341.808-.385.245-.104.068-.028.018c-.011.007-.011.007.543.84zm8.061-.344c-.198.54-.328 1.038-.36 1.484-.032.441.024.94.325 1.364.319.45.786.64 1.21.697.403.054.824-.001 1.21-.09.775-.179 1.694-.566 2.633-1.014l3.023-1.554c2.115-1.122 4.107-2.168 5.476-2.524.329-.086.573-.117.742-.115s.195.038.161.014c-.15-.105.085-.139-.076.685l1.963.384c.192-.98.152-2.083-.74-2.707-.405-.283-.868-.37-1.28-.376s-.849.069-1.274.179c-1.65.43-3.888 1.621-5.909 2.693l-2.948 1.517c-.92.439-1.673.743-2.221.87-.276.064-.429.065-.492.057-.043-.006.066.003.155.127.07.099.024.131.038-.063.014-.187.078-.49.243-.94l-1.878-.689zm14.343-1.053c-.361 1.844-.474 3.185-.413 4.161.059.95.294 1.72.811 2.215.567.544 1.242.546 1.664.459a2.34 2.34 0 0 0 .502-.167l.15-.076.049-.028.018-.011c.013-.008.013-.008-.524-.852l-.536-.844.019-.012c-.038.018-.064.027-.084.032-.037.008.053-.013.125.056.021.02-.151-.135-.198-.895-.046-.734.034-1.887.38-3.652l-1.963-.384zm2.257 5.701l.791.611.024-.031.08-.101.311-.377 1.093-1.213c.922-.954 2.005-1.894 2.904-2.27l-.771-1.846c-1.31.547-2.637 1.758-3.572 2.725l-1.184 1.314-.341.414-.093.117-.025.032c-.01.013-.01.013.781.624zm5.204-3.381c.989-.413 1.791-.42 2.697-.307.871.108 2.083.385 3.437.385v-2c-1.197 0-2.041-.226-3.19-.369-1.114-.139-2.297-.146-3.715.447l.771 1.846z"></path>
44+
</svg>
45+
</span>
46+
</button>
47+
</Link>
48+
</div>
4849
</div>
49-
</div>
5050
)}
5151

5252
{/* 2. MIDDLE SECTION: LINKS GRID */}
@@ -102,13 +102,13 @@ export default function Footer() {
102102
<h4 className="font-mono text-xs text-white/40 uppercase tracking-widest mb-6">Connect</h4>
103103
<ul className="space-y-4">
104104
{[
105-
{ name: 'Github', icon: Github },
106-
{ name: 'Twitter', icon: Twitter },
107-
{ name: 'LinkedIn', icon: Linkedin },
108-
{ name: 'Instagram', icon: Instagram }
105+
{ name: 'Github', icon: Github, href: 'https://github.com/enclope' },
106+
{ name: 'Twitter', icon: Twitter, href: 'https://twitter.com/enclope' },
107+
{ name: 'LinkedIn', icon: Linkedin, href: 'https://linkedin.com/company/enclope' },
108+
{ name: 'Instagram', icon: Instagram, href: 'https://instagram.com/enclope' }
109109
].map((item) => (
110110
<li key={item.name}>
111-
<a href="#" className="group flex items-center gap-2 text-white/70 hover:text-white transition-colors text-sm">
111+
<a href={item.href} target="_blank" rel="noopener noreferrer" className="group flex items-center gap-2 text-white/70 hover:text-white transition-colors text-sm">
112112
<item.icon size={16} className="group-hover:text-accent transition-colors" />
113113
{item.name}
114114
</a>
@@ -123,7 +123,7 @@ export default function Footer() {
123123
<ul className="space-y-4">
124124
<li><Link to="/privacy" className="text-white/70 hover:text-white transition-colors text-sm">Privacy Policy</Link></li>
125125
<li><Link to="/terms" className="text-white/70 hover:text-white transition-colors text-sm">Terms of Service</Link></li>
126-
<li><a href="#" className="text-white/70 hover:text-white transition-colors text-sm">Code of Conduct</a></li>
126+
<li><Link to="/code-of-conduct" className="text-white/70 hover:text-white transition-colors text-sm">Code of Conduct</Link></li>
127127
</ul>
128128
</div>
129129

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Navigate, useLocation } from 'react-router-dom';
2+
import { useAuth } from '../context/AuthContext';
3+
import { Loader2 } from 'lucide-react';
4+
5+
export default function ProtectedRoute({ children }) {
6+
const { user, loading } = useAuth();
7+
const location = useLocation();
8+
9+
// Show loading spinner while checking auth
10+
if (loading) {
11+
return (
12+
<div className="min-h-screen bg-[#050505] flex items-center justify-center">
13+
<div className="text-center">
14+
<Loader2 className="w-8 h-8 text-orange-500 animate-spin mx-auto mb-4" />
15+
<p className="text-white/50 text-sm font-mono">Verifying credentials...</p>
16+
</div>
17+
</div>
18+
);
19+
}
20+
21+
// Redirect to login if not authenticated
22+
if (!user) {
23+
return <Navigate to="/admin/login" state={{ from: location }} replace />;
24+
}
25+
26+
return children;
27+
}

0 commit comments

Comments
 (0)