Skip to content

Commit 339ed2d

Browse files
📝 Add docstrings to feat/docs-and-branding
Docstrings generation was requested by @yash-pouranik. * #37 (comment) The following files were modified: * `frontend/src/components/Layout/Footer.jsx` * `frontend/src/components/Layout/MainLayout.jsx` * `frontend/src/components/Layout/Sidebar.jsx` * `frontend/src/pages/LandingPage/index.jsx`
1 parent 03a8b93 commit 339ed2d

4 files changed

Lines changed: 54 additions & 25 deletions

File tree

frontend/src/components/Layout/Footer.jsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { Link } from 'react-router-dom';
22
import { Github, ArrowRight, Database } from 'lucide-react';
33
import { ADMIN_EMAIL } from '../../config';
44

5+
/**
6+
* Renders the site footer with branding, product/connect navigation, a newsletter input, social links, legal text, and a large decorative background wordmark.
7+
*
8+
* The component is presentational and includes responsive styles for desktop and mobile layouts.
9+
* @returns {JSX.Element} The footer element containing the footer layout and embedded styles.
10+
*/
511
export default function Footer() {
612
return (
713
<footer className="modern-footer">
@@ -12,9 +18,8 @@ export default function Footer() {
1218

1319
{/* Brand / Newsletter Column */}
1420
<div className="footer-brand-col">
15-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '1rem' }}>
16-
<Database size={24} color="var(--color-primary)" />
17-
<span style={{ fontSize: '1.2rem', fontWeight: 700, color: '#fff' }}>urBackend</span>
21+
<div style={{ display: 'flex', alignItems: 'center', marginBottom: '1rem' }}>
22+
<img src="/urBACKEND_NAV_LOGO (2).png" alt="urBackend Logo" style={{ height: '80px', width: 'auto' }} />
1823
</div>
1924
<p style={{ color: 'var(--color-text-muted)', marginBottom: '1.5rem', maxWidth: '300px' }}>
2025
The instant Backend-as-a-Service for frontend developers. Ship faster.

frontend/src/components/Layout/MainLayout.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ import { useLocation, matchPath } from 'react-router-dom';
33
import Sidebar from './Sidebar';
44
import Header from './Header';
55
import ProjectNavbar from './ProjectNavbar';
6-
import logoImage from '../../assets/logo_u.png';
6+
// Use the new official logo from public directory
7+
const logoImage = "/urBACKEND_NAV_LOGO (2).png";
78

9+
/**
10+
* App shell that renders the global sidebar, header, or a project-specific navbar and places page content.
11+
*
12+
* Renders a mobile overlay and global sidebar/header when not on a project route; renders a project navbar and a full-width main area when the current path matches `/project/:projectId/*`. Adjusts top padding and content padding for project routes and for paths that include `/database`.
13+
*
14+
* @param {object} props - Component props.
15+
* @param {import('react').ReactNode} props.children - The page content to render inside the layout.
16+
* @returns {JSX.Element} The composed layout element containing navigation and the provided children.
17+
*/
818
function MainLayout({ children }) {
919
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
1020
const location = useLocation();

frontend/src/components/Layout/Sidebar.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import {
55
ArrowLeft, FileText, UserCog, LogOut, X, Rocket // Import Rocket
66
} from 'lucide-react';
77

8+
/**
9+
* Render the application's sidebar with navigation links for either project-specific modules or general pages.
10+
*
11+
* @param {Object} props
12+
* @param {string} props.logo - URL or import for the logo image shown when no project is selected.
13+
* @param {boolean} props.isOpen - Whether the sidebar is open on mobile (adds mobile-open class when true).
14+
* @param {Function} props.onClose - Callback invoked to close the sidebar (used for mobile navigation and the header close button).
15+
* @returns {JSX.Element} The sidebar React element.
16+
*/
817
function Sidebar({ logo, isOpen, onClose }) { // Props received
918
const location = useLocation();
1019
const { projectId } = useParams();
@@ -27,8 +36,7 @@ function Sidebar({ logo, isOpen, onClose }) { // Props received
2736
</Link>
2837
) : (
2938
<div style={{ display: 'flex', alignItems: 'center' }}>
30-
<img src={logo} alt="Logo" style={{ height: '24px' }} />
31-
<span className="sidebar-logo-text">urBackend</span>
39+
<img src={logo} alt="urBackend Logo" style={{ height: '32px', width: 'auto' }} />
3240
</div>
3341
)}
3442

frontend/src/pages/LandingPage/index.jsx

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ import { motion as Motion } from 'framer-motion';
2626
import Footer from '../../components/Layout/Footer';
2727
import './style.css';
2828

29+
/**
30+
* Render the full landing page UI for the product, including responsive navigation, hero, demo panel, feature and pricing sections, BYO infrastructure content, FAQ, and footer.
31+
*
32+
* The component manages UI state for the mobile menu, scroll-based nav visibility, a simulated demo request, and FAQ expansion. It adapts navigation and CTAs based on authentication and provides a lightweight demo that simulates an API response.
33+
*
34+
* @returns {JSX.Element} The rendered landing page element.
35+
*/
2936
function LandingPage() {
3037
const { isAuthenticated } = useAuth();
3138
const navigate = useNavigate();
@@ -114,9 +121,8 @@ function LandingPage() {
114121

115122
<nav className={`nav-glass ${!isNavVisible ? 'nav-hidden' : ''} ${scrolled ? 'nav-scrolled' : ''}`}>
116123
<div className="nav-container">
117-
<div style={{ display: 'flex', alignItems: 'center', gap: '12px', fontWeight: 800, fontSize: '1.2rem', flex: 1 }}>
118-
<img src="/logo_u.png" alt="urBackend Logo" style={{ height: '32px', width: 'auto' }} />
119-
<span style={{ letterSpacing: '-0.5px' }}>urBackend</span>
124+
<div style={{ display: 'flex', alignItems: 'center', flex: 1 }}>
125+
<img src="/urBACKEND_NAV_LOGO (2).png" alt="urBackend Logo" style={{ height: '40px', width: 'auto' }} />
120126
</div>
121127

122128
<div className="nav-links" style={{ display: window.innerWidth > 768 ? 'flex' : 'none', gap: '32px', alignItems: 'center', fontSize: '0.95rem', color: '#888', fontWeight: 500 }}>
@@ -157,8 +163,8 @@ function LandingPage() {
157163
animate={{ opacity: 1, y: 0 }}
158164
transition={{ duration: 0.6, ease: "easeOut" }}
159165
>
160-
Instant Backend.<br />
161-
<span className="text-gradient-primary">Just for Frontend Devs.</span>
166+
Bring your own MongoDB.<br />
167+
<span className="text-gradient-primary">Get a production-ready backend in 60 seconds.</span>
162168
</Motion.h1>
163169

164170
<Motion.p
@@ -167,7 +173,7 @@ function LandingPage() {
167173
animate={{ opacity: 1, y: 0 }}
168174
transition={{ duration: 0.6, delay: 0.2, ease: "easeOut" }}
169175
>
170-
No boilerplate. No servers. Get Database, Auth, and Storage APIs in seconds.
176+
your backend — your database — your rules.
171177
</Motion.p>
172178

173179
<Motion.div
@@ -284,7 +290,7 @@ function LandingPage() {
284290
</div>
285291

286292
<div id="features" style={{ padding: '8rem 0', background: '#030303', borderTop: '1px solid rgba(255, 255, 255, 0.05)', position: 'relative', overflow: 'hidden' }}>
287-
<div className="section-glow" style={{ bottom: '-10%', left: '-10%', background: 'radial-gradient(circle, rgba(62,207,142,0.06) 0%, transparent 70%)' }}></div>
293+
<div className="section-glow" style={{ bottom: '-10%', left: '-10%', background: 'radial-gradient(circle, rgba(0, 245, 212, 0.06) 0%, transparent 70%)' }}></div>
288294
<div style={{ textAlign: 'center', marginBottom: '5rem', position: 'relative', zIndex: 1 }}>
289295
<h2 className="section-title">Complete Backend Suite</h2>
290296
<p className="section-desc">Enterprise-grade tools packaged for individual developers.</p>
@@ -293,7 +299,7 @@ function LandingPage() {
293299
<div className="bento-grid">
294300
<div className="bento-item bento-span-8">
295301
<div>
296-
<div className="bento-icon" style={{ background: 'rgba(62, 207, 142, 0.1)', color: '#3ECF8E', boxShadow: '0 0 20px rgba(62, 207, 142, 0.2)' }}>
302+
<div className="bento-icon" style={{ background: 'rgba(0, 245, 212, 0.1)', color: '#00f5d4', boxShadow: '0 0 20px rgba(0, 245, 212, 0.2)' }}>
297303
<Database strokeWidth={1.5} />
298304
</div>
299305
<h3 className="bento-title">Managed NoSQL Database</h3>
@@ -302,9 +308,9 @@ function LandingPage() {
302308
Scale from 10 to 10M records without managing servers.
303309
</p>
304310
<ul style={{ marginTop: '1rem', color: '#666', listStyle: 'none', padding: 0, display: 'grid', gap: '8px' }}>
305-
<li style={{ display: 'flex', alignItems: 'center', gap: '8px' }}><CheckCircle size={14} color="#3ECF8E" /> Strict Type Validation</li>
306-
<li style={{ display: 'flex', alignItems: 'center', gap: '8px' }}><CheckCircle size={14} color="#3ECF8E" /> Auto-generated API Endpoints</li>
307-
<li style={{ display: 'flex', alignItems: 'center', gap: '8px' }}><CheckCircle size={14} color="#3ECF8E" /> Real-time Indexing</li>
311+
<li style={{ display: 'flex', alignItems: 'center', gap: '8px' }}><CheckCircle size={14} color="#00f5d4" /> Strict Type Validation</li>
312+
<li style={{ display: 'flex', alignItems: 'center', gap: '8px' }}><CheckCircle size={14} color="#00f5d4" /> Auto-generated API Endpoints</li>
313+
<li style={{ display: 'flex', alignItems: 'center', gap: '8px' }}><CheckCircle size={14} color="#00f5d4" /> Real-time Indexing</li>
308314
</ul>
309315
</div>
310316
</div>
@@ -363,7 +369,7 @@ function LandingPage() {
363369
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(400px, 1fr))', gap: '2rem' }}>
364370
<div className="card" style={{ background: 'rgba(255,255,255,0.02)', border: '1px solid rgba(255,255,255,0.08)', borderRadius: '12px', padding: '3rem', boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.02)' }}>
365371
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', marginBottom: '1.5rem' }}>
366-
<div style={{ padding: '12px', background: 'rgba(62, 207, 142, 0.1)', borderRadius: '12px', color: '#3ECF8E', boxShadow: '0 0 20px rgba(62, 207, 142, 0.2)' }}>
372+
<div style={{ padding: '12px', background: 'rgba(0, 245, 212, 0.1)', borderRadius: '12px', color: '#00f5d4', boxShadow: '0 0 20px rgba(0, 245, 212, 0.2)' }}>
367373
<Database strokeWidth={1.5} size={32} />
368374
</div>
369375
<h3 style={{ fontSize: '1.5rem', fontWeight: 600, color: '#fff' }}>BYO Database</h3>
@@ -404,7 +410,7 @@ function LandingPage() {
404410

405411
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '2rem', marginBottom: '6rem' }}>
406412
<div className="use-case-card">
407-
<Layers strokeWidth={1.5} size={32} color="#3ECF8E" style={{ marginBottom: '1.5rem' }} />
413+
<Layers strokeWidth={1.5} size={32} color="#facc15" style={{ marginBottom: '1.5rem' }} />
408414
<h3 style={{ fontSize: '1.25rem', fontWeight: 600, marginBottom: '0.5rem', color: '#fff' }}>SaaS Platforms</h3>
409415
<p style={{ color: '#a1a1aa', lineHeight: 1.6 }}>Handle complex data relationships, multi-tenant auth, and subscriptions securely.</p>
410416
</div>
@@ -433,15 +439,15 @@ function LandingPage() {
433439

434440
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '2rem', maxWidth: '900px', margin: '0 auto' }}>
435441
<div className="pricing-card" style={{ background: 'rgba(255,255,255,0.02)', border: '1px solid rgba(255,255,255,0.08)', padding: '3rem', borderRadius: '16px', position: 'relative' }}>
436-
<div style={{ position: 'absolute', top: '1.5rem', right: '1.5rem', background: 'rgba(62, 207, 142, 0.1)', color: '#3ECF8E', padding: '4px 12px', borderRadius: '99px', fontSize: '0.75rem', fontWeight: 700 }}>ACTIVE</div>
442+
<div style={{ position: 'absolute', top: '1.5rem', right: '1.5rem', background: 'rgba(0, 245, 212, 0.1)', color: '#00f5d4', padding: '4px 12px', borderRadius: '99px', fontSize: '0.75rem', fontWeight: 700 }}>ACTIVE</div>
437443
<h3 style={{ fontSize: '1.25rem', fontWeight: 600, color: '#fff', marginBottom: '0.5rem' }}>Developer Beta</h3>
438444
<div style={{ fontSize: '3rem', fontWeight: 800, color: '#fff', marginBottom: '1rem' }}>$0<span style={{ fontSize: '1rem', color: '#666', fontWeight: 400 }}>/mo</span></div>
439445
<p style={{ color: '#888', marginBottom: '2rem', fontSize: '0.95rem' }}>Perfect for side projects, MVPs, and learning.</p>
440446
<ul style={{ listStyle: 'none', padding: 0, margin: '0 0 2rem 0', display: 'grid', gap: '12px' }}>
441-
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#3ECF8E" /> Unlimited Projects</li>
442-
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#3ECF8E" /> 500MB Storage</li>
443-
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#3ECF8E" /> Community Support</li>
444-
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#3ECF8E" /> BYO Infrastructure</li>
447+
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#00f5d4" /> Unlimited Projects</li>
448+
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#00f5d4" /> 500MB Storage</li>
449+
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#00f5d4" /> Community Support</li>
450+
<li style={{ display: 'flex', alignItems: 'center', gap: '10px', color: '#ccc' }}><CheckCircle size={16} color="#00f5d4" /> BYO Infrastructure</li>
445451
</ul>
446452
<Link to="/signup" className="btn btn-primary" style={{ width: '100%', textAlign: 'center', padding: '12px', fontWeight: 600 }}>Get Started Now</Link>
447453
</div>
@@ -461,7 +467,7 @@ function LandingPage() {
461467
</div>
462468
</div>
463469

464-
<div className="cta-section" style={{ padding: '8rem 0', background: 'radial-gradient(circle at 50% 50%, rgba(62, 207, 142, 0.05) 0%, transparent 70%)', textAlign: 'center' }}>
470+
<div className="cta-section" style={{ padding: '8rem 0', background: 'radial-gradient(circle at 50% 50%, rgba(0, 245, 212, 0.05) 0%, transparent 70%)', textAlign: 'center' }}>
465471
<div style={{ maxWidth: '800px', margin: '0 auto', padding: '0 1.5rem' }}>
466472
<h2 style={{ fontSize: '3rem', fontWeight: 800, marginBottom: '1.5rem', letterSpacing: '-0.04em' }}>Ready to ship?</h2>
467473
<p style={{ fontSize: '1.25rem', color: '#a1a1aa', marginBottom: '3rem' }}>Join hundreds of developers building the future without the backend headaches.</p>

0 commit comments

Comments
 (0)